Skip to contentSkip to conversation

RDMA/irdma: fix building without IPv6

PATCH Applied Arnd Bergmann 3 participants 3 messages Jul 18, 2023 – Jul 19, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 RDMA/irdma: fix building without IPv6

From: Arnd Bergmann <[email protected]>

The new irdma_iw_get_vlan_prio() function requires IPv6 support to build:

x86_64-linux-ld: drivers/infiniband/hw/irdma/cm.o: in function `irdma_iw_get_vlan_prio':
cm.c:(.text+0x2832): undefined reference to `ipv6_chk_addr'

Add a compile-time check in the same way as elsewhere in this file to avoid this by conditionally leaving out the ipv6 specific bits.

Fixes f877f22ac1e9b ("RDMA/irdma: Implement egress VLAN priority")
---
 drivers/infiniband/hw/irdma/cm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/irdma/cm.c +1 -1
index 6b71b67ce9ff0..8ea55c6a3fba5 100644
@@ -1562,7 +1562,7 @@ static u8 irdma_iw_get_vlan_prio(u32 *loc_addr, u8 prio, bool ipv4)
 	rcu_read_lock();
 	if (ipv4) {
 		ndev = ip_dev_find(&init_net, htonl(loc_addr[0]));
-	} else {
+	} else if (IS_ENABLED(CONFIG_IPV6)) {
 		struct net_device *ip_dev;
 		struct in6_addr laddr6;
 
Signature · 1 line
2.39.2
Acked-by on v1 1/1
#1 lore raw
Quoted 34 lines

Subject: [PATCH] RDMA/irdma: fix building without IPv6

From: Arnd Bergmann <[email protected]>

The new irdma_iw_get_vlan_prio() function requires IPv6 support to build:

x86_64-linux-ld: drivers/infiniband/hw/irdma/cm.o: in function `irdma_iw_get_vlan_prio':
cm.c:(.text+0x2832): undefined reference to `ipv6_chk_addr'

Add a compile-time check in the same way as elsewhere in this file to avoid this by conditionally leaving out the ipv6 specific bits.

Fixes f877f22ac1e9b ("RDMA/irdma: Implement egress VLAN priority")
---
 drivers/infiniband/hw/irdma/cm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/irdma/cm.c +1 -2
index 6b71b67ce9ff0..8ea55c6a3fba5 100644
@@ -1562,7 +1562,7 @@ static u8 irdma_iw_get_vlan_prio(u32 *loc_addr, u8
 prio, bool ipv4)
 	rcu_read_lock();
 	if (ipv4) {
 		ndev = ip_dev_find(&init_net, htonl(loc_addr[0]));
-	} else {
+	} else if (IS_ENABLED(CONFIG_IPV6)) {
 		struct net_device *ip_dev;
 		struct in6_addr laddr6;
 
--
Quoted 1 line

2.39.2

#2 lore raw
In reply to Arnd Bergmann
Quoted 9 lines · Arnd Bergmann

The new irdma_iw_get_vlan_prio() function requires IPv6 support to build:

x86_64-linux-ld: drivers/infiniband/hw/irdma/cm.o: in function `irdma_iw_get_vlan_prio':
cm.c:(.text+0x2832): undefined reference to `ipv6_chk_addr'

Add a compile-time check in the same way as elsewhere in this file to avoid this by conditionally leaving out the ipv6 specific bits.

[...]

Applied, thanks!

[1/1] RDMA/irdma: fix building without IPv6

      https://git.kernel.org/rdma/rdma/c/b3d2b014b259ba

Best regards,

Signature · 1 line
Leon Romanovsky <[email protected]>