Skip to content

mlx5 IPsec replay window enhancement and XFRM core statistics

Leon Romanovsky netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9xfrm: generalize xdo_dev_state_update_curlft to allow statistics updateDocumentation/networking/xfrm_device.rst drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c include/linux/netdevice.h +3 more+15 -160 replies
2/9xfrm: get global statistics from the offloaded devicedrivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c include/net/xfrm.h net/xfrm/xfrm_proc.c +1 more+19 -10 replies
3/9net/mlx5e: Honor user choice of IPsec replay window sizedrivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_offload.c include/linux/mlx5/mlx5_ifc.h+29 -10 replies
4/9net/mlx5e: Ensure that IPsec sequence packet number starts from 1drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c+8 -10 replies
5/9net/mlx5e: Unify esw and normal IPsec status table creation/destructiondrivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c drivers/net/ethernet/mellanox/mlx5/core/esw/ipsec_fs.c drivers/net/ethernet/mellanox/mlx5/core/esw/ipsec_fs.h+141 -2135 replies
6/9net/mlx5e: Remove exposure of IPsec RX flow steering structdrivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.h drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c drivers/net/ethernet/mellanox/mlx5/core/esw/ipsec_fs.c+19 -190 replies
7/9net/mlx5e: Add IPsec and ASO syndromes check in HWdrivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.h drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c+223 -200 replies
8/9net/mlx5e: Connect mlx5 IPsec statistics with XFRM coredrivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c+20 -20 replies
9/9net/mlx5e: Delete obsolete IPsec codedrivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.h drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.h +1 more+2 -260 replies

Reviews trailers per patch

1 of 9 patches has a Reviewed-by or Acked-by.

PatchPatrisious Haddad
1/9
2/9
3/9R-b
4/9
5/9
6/9
7/9
8/9
9/9

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH xfrm-next 0/9] mlx5 IPsec replay window enhancement and XFRM core statistics

From: Leon Romanovsky <[email protected]>

Hi,

This series does two things at the same time, but they are connected together:
* Rewrite and fix mlx5 IPsec replay window implementation.
* Connect XFRM statistics with offloaded counters to report replay window reason statistics.

First two patches are XFRM core changes to allow reuse of already existing callback to fill all statistics.

Next two patches are fixes to replay window and sequence packet number misconfiguration. They are not urgent and can go to -next.

Rest of the patches are rewrite of mlx5 replay window implementation.

As an example, the end result, after simulating replay window attack with 5 packets:
[leonro@c ~]$ grep XfrmInStateSeqError /proc/net/xfrm_stat
XfrmInStateSeqError 5
[leonro@c ~]$ sudo ip -s x s
<...>
stats:
replay-window 0 replay 5 failed 0

Thanks

Leon Romanovsky (7):
xfrm: generalize xdo_dev_state_update_curlft to allow statistics
update
xfrm: get global statistics from the offloaded device net/mlx5e: Honor user choice of IPsec replay window size net/mlx5e: Ensure that IPsec sequence packet number starts from 1 net/mlx5e: Remove exposure of IPsec RX flow steering struct net/mlx5e: Connect mlx5 IPsec statistics with XFRM core net/mlx5e: Delete obsolete IPsec code

Patrisious Haddad (2):
net/mlx5e: Unify esw and normal IPsec status table
creation/destruction
net/mlx5e: Add IPsec and ASO syndromes check in HW

 Documentation/networking/xfrm_device.rst      |   4 +-
 .../mellanox/mlx5/core/en_accel/ipsec.c       |  57 ++-
 .../mellanox/mlx5/core/en_accel/ipsec.h       |  23 +-
 .../mellanox/mlx5/core/en_accel/ipsec_fs.c    | 410 +++++++++++++++---
 .../mlx5/core/en_accel/ipsec_offload.c        |   2 +-
 .../mellanox/mlx5/core/en_accel/ipsec_rxtx.c  |  25 +-
 .../mellanox/mlx5/core/en_accel/ipsec_rxtx.h  |   1 -
 .../mellanox/mlx5/core/en_accel/ipsec_stats.c |   1 -
 .../mellanox/mlx5/core/esw/ipsec_fs.c         | 160 +------
 .../mellanox/mlx5/core/esw/ipsec_fs.h         |  15 -
 include/linux/mlx5/mlx5_ifc.h                 |   7 +
 include/linux/netdevice.h                     |   2 +-
 include/net/xfrm.h                            |  14 +-
 net/xfrm/xfrm_proc.c                          |   1 +
 net/xfrm/xfrm_state.c                         |  17 +-
 net/xfrm/xfrm_user.c                          |   2 +-
 16 files changed, 459 insertions(+), 282 deletions(-)
Signature · 1 line
2.41.0