* [PATCH] RDMA/irdma: fix building without IPv6
@ 2023-07-18 19:38 Arnd Bergmann
2023-07-18 21:17 ` Saleem, Shiraz
2023-07-19 7:13 ` Leon Romanovsky
0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2023-07-18 19:38 UTC (permalink / raw)
To: Mustafa Ismail, Shiraz Saleem, Jason Gunthorpe, Leon Romanovsky
Cc: Arnd Bergmann, Sindhu Devale, linux-rdma, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
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>
---
drivers/infiniband/hw/irdma/cm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/irdma/cm.c b/drivers/infiniband/hw/irdma/cm.c
index 6b71b67ce9ff0..8ea55c6a3fba5 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;
--
2.39.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH] RDMA/irdma: fix building without IPv6
2023-07-18 19:38 [PATCH] RDMA/irdma: fix building without IPv6 Arnd Bergmann
@ 2023-07-18 21:17 ` Saleem, Shiraz
2023-07-19 7:13 ` Leon Romanovsky
1 sibling, 0 replies; 3+ messages in thread
From: Saleem, Shiraz @ 2023-07-18 21:17 UTC (permalink / raw)
To: Arnd Bergmann, Ismail, Mustafa, Jason Gunthorpe, Leon Romanovsky
Cc: Arnd Bergmann, Devale, Sindhu, linux-rdma@vger.kernel.org,
linux-kernel@vger.kernel.org
> Subject: [PATCH] RDMA/irdma: fix building without IPv6
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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>
> ---
> drivers/infiniband/hw/irdma/cm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/hw/irdma/cm.c b/drivers/infiniband/hw/irdma/cm.c
> index 6b71b67ce9ff0..8ea55c6a3fba5 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;
>
> --
> 2.39.2
Acked-by: Shiraz Saleem <shiraz.saleem@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] RDMA/irdma: fix building without IPv6
2023-07-18 19:38 [PATCH] RDMA/irdma: fix building without IPv6 Arnd Bergmann
2023-07-18 21:17 ` Saleem, Shiraz
@ 2023-07-19 7:13 ` Leon Romanovsky
1 sibling, 0 replies; 3+ messages in thread
From: Leon Romanovsky @ 2023-07-19 7:13 UTC (permalink / raw)
To: Mustafa Ismail, Shiraz Saleem, Jason Gunthorpe, Arnd Bergmann
Cc: Arnd Bergmann, Sindhu Devale, linux-rdma, linux-kernel
On Tue, 18 Jul 2023 21:38:09 +0200, Arnd Bergmann wrote:
> 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,
--
Leon Romanovsky <leon@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-07-19 7:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-18 19:38 [PATCH] RDMA/irdma: fix building without IPv6 Arnd Bergmann
2023-07-18 21:17 ` Saleem, Shiraz
2023-07-19 7:13 ` Leon Romanovsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox