summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc
diff options
context:
space:
mode:
authorCosmin Ratiu <cratiu@nvidia.com>2026-11-11 10:13:37 +0200
committerJakub Kicinski <kuba@kernel.org>2026-11-12 10:54:23 -0800
commit5ed47bd79cebee8429d06c6640aac7ac7c4805ca (patch)
tree2c2c9293e2b705ff455d5a46977ef050b989e06b /rust/kernel/alloc
parent62754aad50d0b30938bd8ce30b43474ce502a2af (diff)
net/mlx5e: IPsec, don't match upper proto selectors in crypto offload TX
The mentioned commit introduced support for upper protocol selectors (protocol & ports) to mlx5 IPsec offload. In crypto offload mode this causes offloaded TX SAs to stop matching traffic. In tx_add_rule(), setup_fte_upper_proto_match() is called for all offload types and programs a match on the upper protocol (TCP/UDP) and ports. For crypto offload, setup_fte_esp() is then called and sets ip_protocol to ESP. The resulting rule requires both ESP as the IP protocol and TCP/UDP ports, which no packet can satisfy, so TX crypto offload silently stops working for such SAs. In crypto offload mode the stack builds the ESP packet and the HW only encrypts it, so the SA rule should only match on the SPI. Move the setup_fte_upper_proto_match() call under the XFRM_DEV_OFFLOAD_PACKET case, where the rule matches the plaintext packet and upper protocol selectors apply. The other three callers are unaffected: rx_add_rule_sa_selector() is already only invoked for packet offload, and tx_add_policy() / rx_add_policy() are only reachable in packet offload mode, since xfrm policy offload is exclusively of type XFRM_DEV_OFFLOAD_PACKET. Fixes: a7385187a386 ("net/mlx5e: IPsec, support upper protocol selector field offload") Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com> Reviewed-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20261111081337.3129580-1-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'rust/kernel/alloc')
0 files changed, 0 insertions, 0 deletions