From: Leon Romanovsky <leon@kernel.org> Date: 2024-12-19 12:37:37
From: Jianbo Liu <redacted>
Previously xfrm_dev_state_advance_esn() was added for RX only. But
it's possible that ESN context also need to be synced to hardware for
TX, so call it for outbound in this patch.
Signed-off-by: Jianbo Liu <redacted>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
Documentation/networking/xfrm_device.rst | 3 ++-
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 3 +++
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 3 +++
net/xfrm/xfrm_replay.c | 1 +
4 files changed, 9 insertions(+), 1 deletion(-)
@@ -169,7 +169,8 @@ the stack in xfrm_input(). hand the packet to napi_gro_receive() as usual-In ESN mode, xdo_dev_state_advance_esn() is called from xfrm_replay_advance_esn().+In ESN mode, xdo_dev_state_advance_esn() is called from+xfrm_replay_advance_esn() for RX, and xfrm_replay_overflow_offload_esn for TX. Driver will check packet seq number and update HW ESN state machine if needed. Packet offload mode:
From: Leon Romanovsky <leon@kernel.org> Date: 2024-12-19 12:37:42
From: Jianbo Liu <redacted>
ESN context must be synced between software and hardware for both RX
and TX. As the call to xfrm_dev_state_advance_esn() is added for TX,
this patch add the missing logic for TX. So the update is also checked
on every packet sent, to see if need to trigger ESN update worker.
Signed-off-by: Jianbo Liu <redacted>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
.../mellanox/mlx5/core/en_accel/ipsec.c | 40 +++++++------------
1 file changed, 15 insertions(+), 25 deletions(-)
From: Leon Romanovsky <leon@kernel.org> Date: 2025-01-07 10:22:09
On Thu, Dec 19, 2024 at 02:37:29PM +0200, Leon Romanovsky wrote:
From: Jianbo Liu <redacted>
Previously xfrm_dev_state_advance_esn() was added for RX only. But
it's possible that ESN context also need to be synced to hardware for
TX, so call it for outbound in this patch.
Signed-off-by: Jianbo Liu <redacted>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
Documentation/networking/xfrm_device.rst | 3 ++-
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 3 +++
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 3 +++
net/xfrm/xfrm_replay.c | 1 +
4 files changed, 9 insertions(+), 1 deletion(-)
@@ -169,7 +169,8 @@ the stack in xfrm_input(). hand the packet to napi_gro_receive() as usual-In ESN mode, xdo_dev_state_advance_esn() is called from xfrm_replay_advance_esn().+In ESN mode, xdo_dev_state_advance_esn() is called from+xfrm_replay_advance_esn() for RX, and xfrm_replay_overflow_offload_esn for TX. Driver will check packet seq number and update HW ESN state machine if needed. Packet offload mode:
On Tue, Jan 07, 2025 at 12:22:04PM +0200, Leon Romanovsky wrote:
On Thu, Dec 19, 2024 at 02:37:29PM +0200, Leon Romanovsky wrote:
quoted
From: Jianbo Liu <redacted>
Previously xfrm_dev_state_advance_esn() was added for RX only. But
it's possible that ESN context also need to be synced to hardware for
TX, so call it for outbound in this patch.
Signed-off-by: Jianbo Liu <redacted>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
Documentation/networking/xfrm_device.rst | 3 ++-
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 3 +++
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 3 +++
net/xfrm/xfrm_replay.c | 1 +
4 files changed, 9 insertions(+), 1 deletion(-)
Steffen,
This is kindly reminder.
Sorry for the dealy, the holidays came faster than expected :)
This is the only line of code that this patchset adds
to the xfrm stack, so merging this through mlx5 might
create less conflicts.
In case you want to do that, you can add my 'Acked-by'
to this patch. Otherwise I'll pull it into the ipsec-next
tree tomorrow.
From: Leon Romanovsky <leon@kernel.org> Date: 2025-01-07 12:09:14
On Tue, Jan 07, 2025 at 12:56:33PM +0100, Steffen Klassert wrote:
On Tue, Jan 07, 2025 at 12:22:04PM +0200, Leon Romanovsky wrote:
quoted
On Thu, Dec 19, 2024 at 02:37:29PM +0200, Leon Romanovsky wrote:
quoted
From: Jianbo Liu <redacted>
Previously xfrm_dev_state_advance_esn() was added for RX only. But
it's possible that ESN context also need to be synced to hardware for
TX, so call it for outbound in this patch.
Signed-off-by: Jianbo Liu <redacted>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
Documentation/networking/xfrm_device.rst | 3 ++-
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 3 +++
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 3 +++
net/xfrm/xfrm_replay.c | 1 +
4 files changed, 9 insertions(+), 1 deletion(-)
Steffen,
This is kindly reminder.
Sorry for the dealy, the holidays came faster than expected :)
This is the only line of code that this patchset adds
to the xfrm stack, so merging this through mlx5 might
create less conflicts.
In case you want to do that, you can add my 'Acked-by'
to this patch. Otherwise I'll pull it into the ipsec-next
tree tomorrow.
Let's do it through your tree, please. IMHO, it is more appropriate.
Thanks
On Tue, Jan 07, 2025 at 02:09:05PM +0200, Leon Romanovsky wrote:
On Tue, Jan 07, 2025 at 12:56:33PM +0100, Steffen Klassert wrote:
quoted
On Tue, Jan 07, 2025 at 12:22:04PM +0200, Leon Romanovsky wrote:
quoted
On Thu, Dec 19, 2024 at 02:37:29PM +0200, Leon Romanovsky wrote:
quoted
From: Jianbo Liu <redacted>
Previously xfrm_dev_state_advance_esn() was added for RX only. But
it's possible that ESN context also need to be synced to hardware for
TX, so call it for outbound in this patch.
Signed-off-by: Jianbo Liu <redacted>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
Documentation/networking/xfrm_device.rst | 3 ++-
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 3 +++
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 3 +++
net/xfrm/xfrm_replay.c | 1 +
4 files changed, 9 insertions(+), 1 deletion(-)
Steffen,
This is kindly reminder.
Sorry for the dealy, the holidays came faster than expected :)
This is the only line of code that this patchset adds
to the xfrm stack, so merging this through mlx5 might
create less conflicts.
In case you want to do that, you can add my 'Acked-by'
to this patch. Otherwise I'll pull it into the ipsec-next
tree tomorrow.
Let's do it through your tree, please. IMHO, it is more appropriate.
Ok, series applied to ipsec-next, thanks everyone!