RDMA/irdma: Fix building without IPv6
authorArnd Bergmann <arnd@arndb.de>
Tue, 18 Jul 2023 19:38:09 +0000 (21:38 +0200)
committerLeon Romanovsky <leon@kernel.org>
Wed, 19 Jul 2023 07:13:10 +0000 (10:13 +0300)
commitb3d2b014b259ba758d72d7026685091bde1cf2d6
tree8b0de6aa2adb2d4fb0b402727a9939d57d9d9f73
parentf877f22ac1e9bf1f9aded3765b0012851e1dc4c5
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>
drivers/infiniband/hw/irdma/cm.c