Commit b3d2b014 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Leon Romanovsky

RDMA/irdma: Fix building without IPv6

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: f877f22a ("RDMA/irdma: Implement egress VLAN priority")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20230718193835.3546684-1-arnd@kernel.orgAcked-by: default avatarShiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
parent f877f22a
...@@ -1562,7 +1562,7 @@ static u8 irdma_iw_get_vlan_prio(u32 *loc_addr, u8 prio, bool ipv4) ...@@ -1562,7 +1562,7 @@ static u8 irdma_iw_get_vlan_prio(u32 *loc_addr, u8 prio, bool ipv4)
rcu_read_lock(); rcu_read_lock();
if (ipv4) { if (ipv4) {
ndev = ip_dev_find(&init_net, htonl(loc_addr[0])); ndev = ip_dev_find(&init_net, htonl(loc_addr[0]));
} else { } else if (IS_ENABLED(CONFIG_IPV6)) {
struct net_device *ip_dev; struct net_device *ip_dev;
struct in6_addr laddr6; struct in6_addr laddr6;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment