All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: mlx5e: fix fs_tcp.c build when IPV6 is not enabled
@ 2020-11-22 21:12 Randy Dunlap
  2020-11-23 10:08 ` Tariq Toukan
  0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2020-11-22 21:12 UTC (permalink / raw)
  To: netdev
  Cc: Randy Dunlap, kernel test robot, Saeed Mahameed, Boris Pismenny,
	Tariq Toukan, David S. Miller, Jakub Kicinski

Fix build when CONFIG_IPV6 is not enabled by making a function
be built conditionally.

Fixes these build errors and warnings:

../drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c: In function 'accel_fs_tcp_set_ipv6_flow':
../include/net/sock.h:380:34: error: 'struct sock_common' has no member named 'skc_v6_daddr'; did you mean 'skc_daddr'?
  380 | #define sk_v6_daddr  __sk_common.skc_v6_daddr
      |                                  ^~~~~~~~~~~~
../drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:55:14: note: in expansion of macro 'sk_v6_daddr'
   55 |         &sk->sk_v6_daddr, 16);
      |              ^~~~~~~~~~~
At top level:
../drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:47:13: warning: 'accel_fs_tcp_set_ipv6_flow' defined but not used [-Wunused-function]
   47 | static void accel_fs_tcp_set_ipv6_flow(struct mlx5_flow_spec *spec, struct sock *sk)

Fixes: 5229a96e59ec ("net/mlx5e: Accel, Expose flow steering API for rules add/del")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Cc: Saeed Mahameed <saeedm@nvidia.com>
Cc: Boris Pismenny <borisp@nvidia.com>
Cc: Tariq Toukan <tariqt@mellanox.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c |    2 ++
 1 file changed, 2 insertions(+)

--- linux-next-20201120.orig/drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c
+++ linux-next-20201120/drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c
@@ -44,6 +44,7 @@ static void accel_fs_tcp_set_ipv4_flow(s
 			 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(s
 			    outer_headers.dst_ipv4_dst_ipv6.ipv6_layout.ipv6),
 	       0xff, 16);
 }
+#endif
 
 void mlx5e_accel_fs_del_sk(struct mlx5_flow_handle *rule)
 {

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: mlx5e: fix fs_tcp.c build when IPV6 is not enabled
  2020-11-22 21:12 [PATCH] net: mlx5e: fix fs_tcp.c build when IPV6 is not enabled Randy Dunlap
@ 2020-11-23 10:08 ` Tariq Toukan
  2020-11-23 21:19   ` Saeed Mahameed
  0 siblings, 1 reply; 3+ messages in thread
From: Tariq Toukan @ 2020-11-23 10:08 UTC (permalink / raw)
  To: Randy Dunlap, netdev
  Cc: kernel test robot, Saeed Mahameed, Boris Pismenny, Tariq Toukan,
	David S. Miller, Jakub Kicinski



On 11/22/2020 11:12 PM, Randy Dunlap wrote:
> Fix build when CONFIG_IPV6 is not enabled by making a function
> be built conditionally.
> 
> Fixes these build errors and warnings:
> 
> ../drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c: In function 'accel_fs_tcp_set_ipv6_flow':
> ../include/net/sock.h:380:34: error: 'struct sock_common' has no member named 'skc_v6_daddr'; did you mean 'skc_daddr'?
>    380 | #define sk_v6_daddr  __sk_common.skc_v6_daddr
>        |                                  ^~~~~~~~~~~~
> ../drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:55:14: note: in expansion of macro 'sk_v6_daddr'
>     55 |         &sk->sk_v6_daddr, 16);
>        |              ^~~~~~~~~~~
> At top level:
> ../drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:47:13: warning: 'accel_fs_tcp_set_ipv6_flow' defined but not used [-Wunused-function]
>     47 | static void accel_fs_tcp_set_ipv6_flow(struct mlx5_flow_spec *spec, struct sock *sk)
> 
> Fixes: 5229a96e59ec ("net/mlx5e: Accel, Expose flow steering API for rules add/del")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: kernel test robot <lkp@intel.com>
> Cc: Saeed Mahameed <saeedm@nvidia.com>
> Cc: Boris Pismenny <borisp@nvidia.com>
> Cc: Tariq Toukan <tariqt@mellanox.com>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Jakub Kicinski <kuba@kernel.org>
> ---

Reviewed-by: Tariq Toukan <tariqt@nvidia.com>

Thanks for your patch.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: mlx5e: fix fs_tcp.c build when IPV6 is not enabled
  2020-11-23 10:08 ` Tariq Toukan
@ 2020-11-23 21:19   ` Saeed Mahameed
  0 siblings, 0 replies; 3+ messages in thread
From: Saeed Mahameed @ 2020-11-23 21:19 UTC (permalink / raw)
  To: Tariq Toukan, Randy Dunlap, netdev
  Cc: kernel test robot, Boris Pismenny, Tariq Toukan, David S. Miller,
	Jakub Kicinski

On Mon, 2020-11-23 at 12:08 +0200, Tariq Toukan wrote:
> 
> On 11/22/2020 11:12 PM, Randy Dunlap wrote:
> > Fix build when CONFIG_IPV6 is not enabled by making a function
> > be built conditionally.
> > 
> > Fixes these build errors and warnings:
> > 
> > ../drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c: In
> > function 'accel_fs_tcp_set_ipv6_flow':
> > ../include/net/sock.h:380:34: error: 'struct sock_common' has no
> > member named 'skc_v6_daddr'; did you mean 'skc_daddr'?
> >    380 | #define sk_v6_daddr  __sk_common.skc_v6_daddr
> >        |                                  ^~~~~~~~~~~~
> > ../drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:55:14:
> > note: in expansion of macro 'sk_v6_daddr'
> >     55 |         &sk->sk_v6_daddr, 16);
> >        |              ^~~~~~~~~~~
> > At top level:
> > ../drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:47:13:
> > warning: 'accel_fs_tcp_set_ipv6_flow' defined but not used [-
> > Wunused-function]
> >     47 | static void accel_fs_tcp_set_ipv6_flow(struct
> > mlx5_flow_spec *spec, struct sock *sk)
> > 
> > Fixes: 5229a96e59ec ("net/mlx5e: Accel, Expose flow steering API
> > for rules add/del")
> > Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> > Reported-by: kernel test robot <lkp@intel.com>
> > Cc: Saeed Mahameed <saeedm@nvidia.com>
> > Cc: Boris Pismenny <borisp@nvidia.com>
> > Cc: Tariq Toukan <tariqt@mellanox.com>
> > Cc: "David S. Miller" <davem@davemloft.net>
> > Cc: Jakub Kicinski <kuba@kernel.org>
> > ---
> 
> Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
> 
> 
Applied to net-mlx5,
Thanks!


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-23 21:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-22 21:12 [PATCH] net: mlx5e: fix fs_tcp.c build when IPV6 is not enabled Randy Dunlap
2020-11-23 10:08 ` Tariq Toukan
2020-11-23 21:19   ` Saeed Mahameed

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.