Thread (29 messages) 29 messages, 5 authors, 4d ago

Re: [PATCH net-next 00/15] net/mlx5e: PSP cleanups and improvements

From: Daniel Zahka <daniel.zahka@gmail.com>
Date: 2026-07-07 18:30:02
Also in: linux-rdma, lkml

On 7/7/26 9:08 AM, Tariq Toukan wrote:
Hi,

This series by Cosmin refactors mlx5 PSP support in preparation for
HW-GRO support.
There are almost no functionality changes in all but the last two
patches, which address a long-standing TODO in mlx5e_psp_set_config().

Regards,
Tariq

Cosmin Ratiu (15):
   net/mlx5e: psp: Rename the saved psp_dev to 'psd'
   net/mlx5e: psp: Remove PSP steering mutexes
   net/mlx5e: psp: Remove unneeded ref counting for PSP steering
   net/mlx5e: psp: Merge rx_err rule add/delete with ft create/delete
   net/mlx5e: psp: Use helpers for steering object manipulation
   net/mlx5e: psp: Factor out drop rule creation code
   net/mlx5e: psp: Remove unused PSP syndrome copy action
   net/mlx5e: psp: Rename and consolidate steering functions
   net/mlx5e: psp: Adjust rx_check FT size and use a drop_group
   net/mlx5e: psp: Add an RX steering table
   net/mlx5e: psp: Use a single rx_check table
   net/mlx5e: psp: Flatten steering structures
   net/mlx5e: psp: Make PSP steering config dynamic
   net/mlx5e: Return errors from profile->enable
   net/mlx5e: psp: Report PSP dev registration errors

  drivers/net/ethernet/mellanox/mlx5/core/en.h  |    2 +-
  .../net/ethernet/mellanox/mlx5/core/en/fs.h   |    7 +-
  .../mellanox/mlx5/core/en_accel/en_accel.h    |   19 +-
  .../mellanox/mlx5/core/en_accel/psp.c         | 1007 ++++++++---------
  .../mellanox/mlx5/core/en_accel/psp.h         |   18 +-
  .../mellanox/mlx5/core/en_accel/psp_rxtx.c    |   13 +-
  .../mellanox/mlx5/core/en_accel/psp_rxtx.h    |    3 +-
  .../net/ethernet/mellanox/mlx5/core/en_main.c |   23 +-
  .../net/ethernet/mellanox/mlx5/core/en_rep.c  |    8 +-
  9 files changed, 516 insertions(+), 584 deletions(-)


base-commit: 31816fc5d9acf8cdf226cdd0dc296e8cf15cc033
Thanks. Excited about the support for mlx5e_psp_set_config(). Jakub and 
I had a test case for psp_dev_ops::set_config() that we were waiting to 
upstream. I just rebased it onto net-next here: 
https://github.com/danieldzahka/linux/commit/b58e9a99573cf6b884e5fe3227c9af7a1f0d80b0

I ran it with the series but am seeing an error trying to catch 
undecrypted PSP-UDP packets after disabling all versions with set_config()

TAP version 13
1..30
ok 1 psp.data_basic_send.v0_ip4 # SKIP Test requires IPv4 connectivity
ok 2 psp.data_basic_send.v0_ip6
ok 3 psp.data_basic_send.v1_ip4 # SKIP Test requires IPv4 connectivity
ok 4 psp.data_basic_send.v1_ip6
ok 5 psp.data_basic_send.v2_ip4 # SKIP Test requires IPv4 connectivity
ok 6 psp.data_basic_send.v2_ip6 # SKIP ('PSP version not supported', 
'hdr0-aes-gmac-128')
ok 7 psp.data_basic_send.v3_ip4 # SKIP Test requires IPv4 connectivity
ok 8 psp.data_basic_send.v3_ip6 # SKIP ('PSP version not supported', 
'hdr0-aes-gmac-256')
ok 9 psp.data_mss_adjust.ip4 # SKIP Test requires IPv4 connectivity
ok 10 psp.data_mss_adjust.ip6
ok 11 psp.data_send_off.ip4 # SKIP Test requires IPv4 connectivity
# Exception| Traceback (most recent call last):
# Exception|   File "/root/ksft-psp-set-config/net/lib/py/ksft.py", line 
420, in ksft_run
# Exception|     func(*args)
# Exception|   File "/root/./ksft-psp-set-config/drivers/net/psp.py", 
line 608, in data_send_off
# Exception|     udps.recv(8192, socket.MSG_DONTWAIT)
# Exception| BlockingIOError: [Errno 11] Resource temporarily unavailable
# Exception|
not ok 12 psp.data_send_off.ip6
ok 13 psp.dev_list_devices
ok 14 psp.dev_get_device
ok 15 psp.dev_get_device_bad
ok 16 psp.dev_rotate
ok 17 psp.dev_rotate_spi
ok 18 psp.assoc_basic
ok 19 psp.assoc_bad_dev
ok 20 psp.assoc_sk_only_conn
ok 21 psp.assoc_sk_only_mismatch
ok 22 psp.assoc_sk_only_mismatch_tx
ok 23 psp.assoc_sk_only_unconn
ok 24 psp.assoc_version_mismatch
ok 25 psp.assoc_twice
ok 26 psp.data_send_bad_key
ok 27 psp.data_send_disconnect
ok 28 psp.data_stale_key
ok 29 psp.removal_device_rx # XFAIL Test only works on netdevsim
ok 30 psp.removal_device_bi # XFAIL Test only works on netdevsim
# Totals: pass:19 fail:1 xfail:2 xpass:0 skip:8 error:0
#
# Responder logs (0):
# STDERR:
# #  Set PSP enable on device 1 to 0x3
# #  Set PSP enable on device 1 to 0x0

I recall this working on an earlier prototype of this feature for mlx5. 
Are the steering rules setup to drop PSP-UDP packets when the 
corresponding psp version is disabled?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help