* [PATCH net-next 1/3] net/mlx5e: Fix compilation error in TLS code
2019-07-11 19:39 [PATCH net-next 0/3] Mellanox, mlx5 build fixes Saeed Mahameed
@ 2019-07-11 19:39 ` Saeed Mahameed
2019-07-11 19:39 ` [PATCH net-next 2/3] net/mlx5e: Fix unused variable warning when CONFIG_MLX5_ESWITCH is off Saeed Mahameed
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Saeed Mahameed @ 2019-07-11 19:39 UTC (permalink / raw)
To: David S. Miller
Cc: netdev@vger.kernel.org, Tariq Toukan, Saeed Mahameed, Mao Wenan
From: Tariq Toukan <tariqt@mellanox.com>
In the cited patch below, the Kconfig flags combination of:
CONFIG_MLX5_FPGA is not set
CONFIG_MLX5_TLS=y
CONFIG_MLX5_EN_TLS=y
leads to the compilation error:
./include/linux/mlx5/device.h:61:39: error: invalid application of
sizeof to incomplete type struct mlx5_ifc_tls_flow_bits.
Fix it.
Fixes: 90687e1a9a50 ("net/mlx5: Kconfig, Better organize compilation flags")
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
CC: Mao Wenan <maowenan@huawei.com>
---
drivers/net/ethernet/mellanox/mlx5/core/accel/tls.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/accel/tls.h b/drivers/net/ethernet/mellanox/mlx5/core/accel/tls.h
index 879321b21616..d787bc0a4155 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/accel/tls.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/accel/tls.h
@@ -81,7 +81,6 @@ mlx5e_ktls_type_check(struct mlx5_core_dev *mdev,
struct tls_crypto_info *crypto_info) { return false; }
#endif
-#ifdef CONFIG_MLX5_FPGA_TLS
enum {
MLX5_ACCEL_TLS_TX = BIT(0),
MLX5_ACCEL_TLS_RX = BIT(1),
@@ -103,6 +102,7 @@ struct mlx5_ifc_tls_flow_bits {
u8 reserved_at_2[0x1e];
};
+#ifdef CONFIG_MLX5_FPGA_TLS
int mlx5_accel_tls_add_flow(struct mlx5_core_dev *mdev, void *flow,
struct tls_crypto_info *crypto_info,
u32 start_offload_tcp_sn, u32 *p_swid,
--
2.21.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH net-next 2/3] net/mlx5e: Fix unused variable warning when CONFIG_MLX5_ESWITCH is off
2019-07-11 19:39 [PATCH net-next 0/3] Mellanox, mlx5 build fixes Saeed Mahameed
2019-07-11 19:39 ` [PATCH net-next 1/3] net/mlx5e: Fix compilation error in TLS code Saeed Mahameed
@ 2019-07-11 19:39 ` Saeed Mahameed
2019-07-11 19:39 ` [PATCH net-next 3/3] net/mlx5: E-Switch, Reduce ingress acl modify metadata stack usage Saeed Mahameed
2019-07-11 22:05 ` [PATCH net-next 0/3] Mellanox, mlx5 build fixes David Miller
3 siblings, 0 replies; 5+ messages in thread
From: Saeed Mahameed @ 2019-07-11 19:39 UTC (permalink / raw)
To: David S. Miller
Cc: netdev@vger.kernel.org, Saeed Mahameed, Mark Bloch, Tariq Toukan,
Nathan Chancellor
In mlx5e_setup_tc "priv" variable is not being used if
CONFIG_MLX5_ESWITCH is off, one way to fix this is to actually use it.
mlx5e_setup_tc_mqprio also needs the "priv" variable and it extracts it
on its own. We can simply pass priv to mlx5e_setup_tc_mqprio instead of
netdev and avoid extracting the priv var, which will also resolve the
compiler warning.
Fixes: 4e95bc268b91 ("net: flow_offload: add flow_block_cb_setup_simple()")
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
CC: Nathan Chancellor <natechancellor@gmail.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index 6d0ae87c8ded..9163d6904741 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -3390,10 +3390,9 @@ static int mlx5e_modify_channels_vsd(struct mlx5e_channels *chs, bool vsd)
return 0;
}
-static int mlx5e_setup_tc_mqprio(struct net_device *netdev,
+static int mlx5e_setup_tc_mqprio(struct mlx5e_priv *priv,
struct tc_mqprio_qopt *mqprio)
{
- struct mlx5e_priv *priv = netdev_priv(netdev);
struct mlx5e_channels new_channels = {};
u8 tc = mqprio->num_tc;
int err = 0;
@@ -3475,7 +3474,7 @@ static int mlx5e_setup_tc(struct net_device *dev, enum tc_setup_type type,
priv, priv, true);
#endif
case TC_SETUP_QDISC_MQPRIO:
- return mlx5e_setup_tc_mqprio(dev, type_data);
+ return mlx5e_setup_tc_mqprio(priv, type_data);
default:
return -EOPNOTSUPP;
}
--
2.21.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH net-next 3/3] net/mlx5: E-Switch, Reduce ingress acl modify metadata stack usage
2019-07-11 19:39 [PATCH net-next 0/3] Mellanox, mlx5 build fixes Saeed Mahameed
2019-07-11 19:39 ` [PATCH net-next 1/3] net/mlx5e: Fix compilation error in TLS code Saeed Mahameed
2019-07-11 19:39 ` [PATCH net-next 2/3] net/mlx5e: Fix unused variable warning when CONFIG_MLX5_ESWITCH is off Saeed Mahameed
@ 2019-07-11 19:39 ` Saeed Mahameed
2019-07-11 22:05 ` [PATCH net-next 0/3] Mellanox, mlx5 build fixes David Miller
3 siblings, 0 replies; 5+ messages in thread
From: Saeed Mahameed @ 2019-07-11 19:39 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev@vger.kernel.org, Saeed Mahameed, Jianbo Liu
Fix the following compiler warning:
In function ‘esw_vport_add_ingress_acl_modify_metadata’:
the frame size of 1084 bytes is larger than 1024 bytes [-Wframe-larger-than=]
Since the structure is never written to, we can statically allocate
it to avoid the stack usage.
Fixes: 7445cfb1169c ("net/mlx5: E-Switch, Tag packet with vport number in VF vports and uplink ingress ACLs")
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Reviewed-by: Jianbo Liu <jianbol@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
index 8ed4497929b9..5f78e76019c5 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
@@ -1785,8 +1785,8 @@ static int esw_vport_add_ingress_acl_modify_metadata(struct mlx5_eswitch *esw,
struct mlx5_vport *vport)
{
u8 action[MLX5_UN_SZ_BYTES(set_action_in_add_action_in_auto)] = {};
+ static const struct mlx5_flow_spec spec = {};
struct mlx5_flow_act flow_act = {};
- struct mlx5_flow_spec spec = {};
int err = 0;
MLX5_SET(set_action_in, action, action_type, MLX5_ACTION_TYPE_SET);
--
2.21.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH net-next 0/3] Mellanox, mlx5 build fixes
2019-07-11 19:39 [PATCH net-next 0/3] Mellanox, mlx5 build fixes Saeed Mahameed
` (2 preceding siblings ...)
2019-07-11 19:39 ` [PATCH net-next 3/3] net/mlx5: E-Switch, Reduce ingress acl modify metadata stack usage Saeed Mahameed
@ 2019-07-11 22:05 ` David Miller
3 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2019-07-11 22:05 UTC (permalink / raw)
To: saeedm; +Cc: netdev
From: Saeed Mahameed <saeedm@mellanox.com>
Date: Thu, 11 Jul 2019 19:39:53 +0000
> I know net-next is closed but these patches are fixing some compiler
> build and warnings issues people have been complaining about.
>
> I hope it is not too late, but in case it is a lot of trouble for
> you, I guess they can wait.
Never too late to submit build fixes :-)
Series applied, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread