Skip to contentSkip to conversation

net/mlx5e: fix non-IPV6 build

PATCH Applied Arnd Bergmann 4 participants 4 messages Dec 3, 2020 – Dec 4, 2020

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

PATCH 1/1 net/mlx5e: fix non-IPV6 build

From: Arnd Bergmann <[email protected]>

When IPv6 is disabled, the flow steering code causes a build failure:

drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:55:14: error: no member named 'skc_v6_daddr' in 'struct sock_common'; did you mean 'skc_daddr'?

               &sk->sk_v6_daddr, 16);
                    ^

include/net/sock.h:380:34: note: expanded from macro 'sk_v6_daddr'
#define sk_v6_daddr __sk_common.skc_v6_daddr

Hide the newly added function in an #ifdef that matches its callers and the struct member definition.

Fixes 5229a96e59ec ("net/mlx5e: Accel, Expose flow steering API for rules add/del")
---
 drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c +2 -0
index 97f1594cee11..e51f60b55daa 100644
@@ -44,6 +44,7 @@ static void accel_fs_tcp_set_ipv4_flow(struct mlx5_flow_spec *spec, struct sock
 			 outer_headers.dst_ipv4_dst_ipv6.ipv4_layout.ipv4);
 }
 
+#if IS_ENABLED(CONFIG_IPV6)
 static void accel_fs_tcp_set_ipv6_flow(struct mlx5_flow_spec *spec, struct sock *sk)
 {
 	MLX5_SET_TO_ONES(fte_match_param, spec->match_criteria, outer_headers.ip_protocol);
@@ -63,6 +64,7 @@ static void accel_fs_tcp_set_ipv6_flow(struct mlx5_flow_spec *spec, struct sock
 			    outer_headers.dst_ipv4_dst_ipv6.ipv6_layout.ipv6),
 	       0xff, 16);
 }
+#endif
 
 void mlx5e_accel_fs_del_sk(struct mlx5_flow_handle *rule)
 {
Signature · 1 line
2.27.0
#1 lore raw
Quoted 33 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

When IPv6 is disabled, the flow steering code causes a build failure:

drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:55:14: error: no member named 'skc_v6_daddr' in 'struct sock_common'; did you mean 'skc_daddr'?

               &sk->sk_v6_daddr, 16);
                    ^

include/net/sock.h:380:34: note: expanded from macro 'sk_v6_daddr'
#define sk_v6_daddr __sk_common.skc_v6_daddr

Hide the newly added function in an #ifdef that matches its callers and the struct member definition.

Fixes 5229a96e59ec ("net/mlx5e: Accel, Expose flow steering API for rules add/del")
---
 drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c +1 -0
index 97f1594cee11..e51f60b55daa 100644
@@ -44,6 +44,7 @@ static void accel_fs_tcp_set_ipv4_flow(struct mlx5_flow_spec *spec, struct sock
 			 outer_headers.dst_ipv4_dst_ipv6.ipv4_layout.ipv4);
 }
 
+#if IS_ENABLED(CONFIG_IPV6)
 static void accel_fs_tcp_set_ipv6_flow(struct mlx5_flow_spec *spec, struct sock *sk)
 {
 	MLX5_SET_TO_ONES(fte_match_param, spec->match_criteria, outer_headers.ip_protocol);

drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c static void accel_fs_tcp_set_ipv6_flow(struct mlx5_flow_spec *spec, struct sock · line 70

Quoted 7 lines
drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c +1 -0
@@ -63,6 +64,7 @@ static void accel_fs_tcp_set_ipv6_flow(struct mlx5_flow_spec *spec, struct sock
 			    outer_headers.dst_ipv4_dst_ipv6.ipv6_layout.ipv6),
 	       0xff, 16);
 }
+#endif
 
 void mlx5e_accel_fs_del_sk(struct mlx5_flow_handle *rule)
 {

Fix for this was just merged by Linus [NETWORKING PR].

thanks.

Signature · 1 line
~Randy
#2 lore raw
In reply to Arnd Bergmann
This patch was applied to netdev/net-next.git (refs/heads/master):

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

Quoted 11 lines · On Fri, 4 Dec 2020 00:12:59 +0100 you wrote:

From: Arnd Bergmann <[email protected]>

When IPv6 is disabled, the flow steering code causes a build failure:

drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:55:14: error: no member named 'skc_v6_daddr' in 'struct sock_common'; did you mean 'skc_daddr'?

               &sk->sk_v6_daddr, 16);
                    ^

include/net/sock.h:380:34: note: expanded from macro 'sk_v6_daddr'
#define sk_v6_daddr __sk_common.skc_v6_daddr

[...]

Here is the summary with links:
- net/mlx5e: fix non-IPV6 build

    https://git.kernel.org/netdev/net-next/c/8a78a440108e

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

maintainer
#3 lore raw
Quoted 17 lines · On Fri, 04 Dec 2020 01:20:15 +0000 [email protected] wrote:

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

Quoted 11 lines · On Fri, 4 Dec 2020 00:12:59 +0100 you wrote:

From: Arnd Bergmann <[email protected]>

When IPv6 is disabled, the flow steering code causes a build failure:

drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:55:14: error: no member named 'skc_v6_daddr' in 'struct sock_common'; did you mean 'skc_daddr'?

               &sk->sk_v6_daddr, 16);
                    ^

include/net/sock.h:380:34: note: expanded from macro 'sk_v6_daddr'
#define sk_v6_daddr __sk_common.skc_v6_daddr

[...]

Quoted 8 lines

Here is the summary with links:
- net/mlx5e: fix non-IPV6 build

    https://git.kernel.org/netdev/net-next/c/8a78a440108e

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

Heh, it appears you managed to create a similar enough patch for the patchwork bot to confuse the two :)

So to be clear this was not applied :)