diff options
author | Arnd Bergmann <arnd@arndb.de> | 2023-07-18 21:38:09 +0200 |
---|---|---|
committer | Leon Romanovsky <leon@kernel.org> | 2023-07-19 09:13:10 +0200 |
commit | b3d2b014b259ba758d72d7026685091bde1cf2d6 (patch) | |
tree | 8b0de6aa2adb2d4fb0b402727a9939d57d9d9f73 /drivers/infiniband | |
parent | RDMA/irdma: Implement egress VLAN priority (diff) | |
download | linux-b3d2b014b259ba758d72d7026685091bde1cf2d6.tar.xz linux-b3d2b014b259ba758d72d7026685091bde1cf2d6.zip |
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: f877f22ac1e9b ("RDMA/irdma: Implement egress VLAN priority")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20230718193835.3546684-1-arnd@kernel.org
Acked-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/irdma/cm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/irdma/cm.c b/drivers/infiniband/hw/irdma/cm.c index 6b71b67ce9ff..8ea55c6a3fba 100644 --- a/drivers/infiniband/hw/irdma/cm.c +++ b/drivers/infiniband/hw/irdma/cm.c @@ -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; |