From: Saeed Mahameed <saeedm@nvidia.com>
Hi Dave, Jakub
This series provides misc updates for mlx5 driver.
v1->v2:
- Drop the +trk+new TC feature for now until we handle the module
dependency issue.
For more information please see tag log below.
Please pull and let me know if there is any problem.
Thanks,
Saeed.
---
The following changes since commit c73a45965dd54a10c368191804b9de661eee1007:
net: mvpp2: prs: improve ipv4 parse flow (2021-01-11 17:46:21 -0800)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git tags/mlx5-updates-2021-01-07
for you to fetch changes up to 85d1f989d2ed1462a21364e3b8f685e513dab645:
net/mlx5e: IPsec, Remove unnecessary config flag usage (2021-01-11 23:02:28 -0800)
----------------------------------------------------------------
mlx5-updates-2021-01-07
Misc updates series for mlx5 driver:
1) From Eli and Jianbo, E-Switch cleanups and usage of new
FW capability for mpls over udp
2) Paul Blakey, Adds support for mirroring with Connection tracking
by splitting rules to pre and post Connection tracking to perform the
mirroring.
3) Roi Dayan, cleanups for connection tracking
4) From Tariq, Cleanups and improvements to IPSec
----------------------------------------------------------------
Eli Cohen (2):
net/mlx5e: Simplify condition on esw_vport_enable_qos()
net/mlx5: E-Switch, use new cap as condition for mpls over udp
Jianbo Liu (1):
net/mlx5e: E-Switch, Offload all chain 0 priorities when modify header and forward action is not supported
Paul Blakey (1):
net/mlx5: Add HW definition of reg_c_preserve
Roi Dayan (3):
net/mlx5e: CT: Pass null instead of zero spec
net/mlx5e: Remove redundant initialization to null
net/mlx5e: CT: Remove redundant usage of zone mask
Tariq Toukan (4):
net/mlx5e: IPsec, Enclose csum logic under ipsec config
net/mlx5e: IPsec, Avoid unreachable return
net/mlx5e: IPsec, Inline feature_check fast-path function
net/mlx5e: IPsec, Remove unnecessary config flag usage
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c | 7 ++----
.../mellanox/mlx5/core/en/tc_tun_mplsoudp.c | 4 +--
.../mellanox/mlx5/core/en_accel/en_accel.h | 4 +--
.../mellanox/mlx5/core/en_accel/ipsec_rxtx.c | 14 -----------
.../mellanox/mlx5/core/en_accel/ipsec_rxtx.h | 29 ++++++++++++++++++++--
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 4 ---
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 2 --
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 6 -----
drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 3 +--
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 3 +--
.../ethernet/mellanox/mlx5/core/lib/fs_chains.c | 7 ++----
include/linux/mlx5/mlx5_ifc.h | 4 ++-
12 files changed, 40 insertions(+), 47 deletions(-)
From: Paul Blakey <redacted>
Add capability bit to test whether reg_c value is preserved on
recirculation.
Signed-off-by: Paul Blakey <redacted>
Signed-off-by: Maor Dickman <redacted>
Reviewed-by: Roi Dayan <redacted>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
include/linux/mlx5/mlx5_ifc.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
From: Eli Cohen <redacted>
esw->qos.enabled will only be true if both MLX5_CAP_GEN(dev, qos) and
MLX5_CAP_QOS(dev, esw_scheduling) are true. Therefore, remove them from
the condition in and rely only on esw->qos.enabled.
Fixes: 1bd27b11c1df ("net/mlx5: Introduce E-switch QoS management")
Signed-off-by: Eli Cohen <redacted>
Reviewed-by: Roi Dayan <redacted>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
From: Eli Cohen <redacted>
Use tunnel_stateless_mpls_over_udp instead of
MLX5_FLEX_PROTO_CW_MPLS_UDP since new devices have native support for
mpls over udp and do not rely on flex parser.
Signed-off-by: Eli Cohen <redacted>
Reviewed-by: Roi Dayan <redacted>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_mplsoudp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
From: Jianbo Liu <redacted>
Miss path handling of tc multi chain filters (i.e. filters that are
defined on chain > 0) requires the hardware to communicate to the
driver the last chain that was processed. This is possible only when
the hardware is capable of performing the combination of modify header
and forward to table actions. Currently, if the hardware is missing
this capability then the driver only offloads rules that are defined
on tc chain 0 prio 1. However, this restriction can be relaxed because
packets that miss from chain 0 are processed through all the
priorities by tc software.
Allow the offload of all the supported priorities for chain 0 even
when the hardware is not capable to perform modify header and goto
table actions.
Fixes: 0b3a8b6b5340 ("net/mlx5: E-Switch: Fix using fwd and modify when firmware doesn't support it")
Signed-off-by: Jianbo Liu <redacted>
Reviewed-by: Oz Shlomo <redacted>
Reviewed-by: Roi Dayan <redacted>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 6 ------
drivers/net/ethernet/mellanox/mlx5/core/lib/fs_chains.c | 3 ---
2 files changed, 9 deletions(-)
@@ -1317,12 +1317,6 @@ mlx5e_tc_add_fdb_flow(struct mlx5e_priv *priv,interr=0;intout_index;-if(!mlx5_chains_prios_supported(esw_chains(esw))&&attr->prio!=1){-NL_SET_ERR_MSG_MOD(extack,-"E-switch priorities unsupported, upgrade FW");-return-EOPNOTSUPP;-}-/* We check chain range only for tc flows.*Forftflows,wecheckedattr->chainwasoriginally0andsetitto*FDB_FT_CHAINwhichisoutsidetcrange.
From: Roi Dayan <redacted>
No need to pass zero spec to mlx5_add_flow_rules() as the
function can handle null spec.
Signed-off-by: Roi Dayan <redacted>
Reviewed-by: Oz Shlomo <redacted>
Reviewed-by: Paul Blakey <redacted>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
@@ -1241,9 +1241,8 @@ static int tc_ct_pre_ct_add_rules(struct mlx5_ct_ft *ct_ft,pre_ct->flow_rule=rule;/* add miss rule */-memset(spec,0,sizeof(*spec));dest.ft=nat?ct_priv->ct_nat:ct_priv->ct;-rule=mlx5_add_flow_rules(ft,spec,&flow_act,&dest,1);+rule=mlx5_add_flow_rules(ft,NULL,&flow_act,&dest,1);if(IS_ERR(rule)){err=PTR_ERR(rule);ct_dbg("Failed to add pre ct miss rule zone %d",zone);
From: Tariq Toukan <tariqt@nvidia.com>
All IPsec logic should be wrapped under the compile flag,
including its checksum logic.
Introduce an inline function in ipsec datapath header,
with a corresponding stub.
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Raed Salem <redacted>
Reviewed-by: Huy Nguyen <redacted>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
.../ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.h | 10 ++++++++++
drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 3 +--
2 files changed, 11 insertions(+), 2 deletions(-)
From: Tariq Toukan <tariqt@nvidia.com>
Feature check functions are in the TX fast-path of all SKBs, not only
IPsec traffic.
Move the IPsec feature check function into a header and turn it inline.
Use a stub and clean the config flag condition in Eth main driver file.
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Raed Salem <redacted>
Reviewed-by: Huy Nguyen <redacted>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
.../mellanox/mlx5/core/en_accel/ipsec_rxtx.c | 14 --------------
.../mellanox/mlx5/core/en_accel/ipsec_rxtx.h | 19 +++++++++++++++++--
.../net/ethernet/mellanox/mlx5/core/en_main.c | 2 --
3 files changed, 17 insertions(+), 18 deletions(-)
@@ -4376,10 +4376,8 @@ netdev_features_t mlx5e_features_check(struct sk_buff *skb,features=vlan_features_check(skb,features);features=vxlan_features_check(skb,features);-#ifdef CONFIG_MLX5_EN_IPSECif(mlx5e_ipsec_feature_check(skb,netdev,features))returnfeatures;-#endif/* Validate if the tunneled packet is being offloaded by HW */if(skb->encapsulation&&
@@ -1786,12 +1786,10 @@ int mlx5e_rq_set_handlers(struct mlx5e_rq *rq, struct mlx5e_params *params, boolrq->dealloc_wqe=mlx5e_dealloc_rx_mpwqe;rq->handle_rx_cqe=priv->profile->rx_handlers->handle_rx_cqe_mpwqe;-#ifdef CONFIG_MLX5_EN_IPSECif(MLX5_IPSEC_DEV(mdev)){netdev_err(netdev,"MPWQE RQ with IPSec offload not supported\n");return-EINVAL;}-#endifif(!rq->handle_rx_cqe){netdev_err(netdev,"RX handler of MPWQE RQ is not set\n");return-EINVAL;
From: Roi Dayan <redacted>
miss_rule and prio_s args are not being referenced before assigned
so there is no need to init them.
Signed-off-by: Roi Dayan <redacted>
Reviewed-by: Oz Shlomo <redacted>
Reviewed-by: Paul Blakey <redacted>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
drivers/net/ethernet/mellanox/mlx5/core/lib/fs_chains.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
From: Roi Dayan <redacted>
The zone member is of type u16 so there is no reason to apply
the zone mask on it. This is also matching the call to set a
match in other places which don't need and don't apply the mask.
Signed-off-by: Roi Dayan <redacted>
Reviewed-by: Paul Blakey <redacted>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
On Wed, 2021-01-13 at 15:41 -0800, Jakub Kicinski wrote:
On Mon, 11 Jan 2021 23:05:23 -0800 Saeed Mahameed wrote:
quoted
From: Saeed Mahameed <saeedm@nvidia.com>
Hi Dave, Jakub
This series provides misc updates for mlx5 driver.
v1->v2:
- Drop the +trk+new TC feature for now until we handle the module
dependency issue.
For more information please see tag log below.
Please pull and let me know if there is any problem.
The PR lacks sign-offs, I can apply from the list but what's the
story
Sing-off where ? the tag ?
with the fixes tags on the patches for -next?
the patch got migrated from net to net-next as it wasn't deemed to be a
critical bug fix but it is a bug fix ..
do you want me to remove it ?
thanks.
From: Jakub Kicinski <kuba@kernel.org> Date: 2021-01-14 01:40:42
On Wed, 13 Jan 2021 16:01:57 -0800 Saeed Mahameed wrote:
On Wed, 2021-01-13 at 15:41 -0800, Jakub Kicinski wrote:
quoted
On Mon, 11 Jan 2021 23:05:23 -0800 Saeed Mahameed wrote:
quoted
From: Saeed Mahameed <saeedm@nvidia.com>
Hi Dave, Jakub
This series provides misc updates for mlx5 driver.
v1->v2:
- Drop the +trk+new TC feature for now until we handle the module
dependency issue.
For more information please see tag log below.
Please pull and let me know if there is any problem.
The PR lacks sign-offs, I can apply from the list but what's the
story
From: Jakub Kicinski <kuba@kernel.org> Date: 2021-01-14 01:59:05
On Mon, 11 Jan 2021 23:05:23 -0800 Saeed Mahameed wrote:
From: Saeed Mahameed <saeedm@nvidia.com>
Hi Dave, Jakub
This series provides misc updates for mlx5 driver.
v1->v2:
- Drop the +trk+new TC feature for now until we handle the module
dependency issue.
For more information please see tag log below.
Please pull and let me know if there is any problem.
The PR lacks sign-offs, I can apply from the list but what's the story
with the fixes tags on the patches for -next?