[PATCH net-next 0/4] psp: make tx key ops optional for drivers
From: Daniel Zahka <daniel.zahka@gmail.com>
Date: 2026-09-04 01:34:17
Also in:
lkml
This is the first of two series which together implement rekeying PSP protected tcp connections. Here are both series together on github: https://github.com/danieldzahka/linux/commits/psp-rekey-split/ This first series is mostly non-functional changes, except for the minor difference that netdevsim driver implements tx key ops. Its tx key ops were basically NOPs, and in the future PSP core can subsume the assoc counting that it was doing. The purpose of the refactors is to make code reusable from paths that will be added to the code in the rekeying series. Patch 1 exists to setup two paths for tx key deletion, one where keys are deleted as they are now in psp_assoc_free() when the assoc refcount drops to 0, and a different path in series two, where the keys will get put onto a queue for deferred deletion. Patch 2 exists to allow tx assoc state to be set either from the connection setup path, or in series two, from a tx rekeying path. Patch 3 makes implementing tx_key_add and tx_key_del optional for drivers. These callbacks only make sense for devices that utilize a tx SADB. This distinction is important once rekeying is involved, because an SADB implies a race between in flight tx packets and key deletion, that does not exist for non-SADB implementations. Patch 4 removes the unnecessary tx key ops in netdevsim. No new tests are added to this series. There is no real user visible change of behavior. Signed-off-by: Daniel Zahka <daniel.zahka@gmail.com> --- Daniel Zahka (4): psp: refactor psp_dev_tx_key_del() psp: move code from psp_sock_assoc_set_tx() into helper functions psp: allow drivers to omit tx key add/del ops netdevsim: psp: drop tx key ops drivers/net/netdevsim/netdevsim.h | 1 - drivers/net/netdevsim/psp.c | 33 ----------- include/net/psp/functions.h | 5 -- include/net/psp/types.h | 4 ++ net/psp/psp.h | 12 ++++ net/psp/psp_main.c | 13 +++-- net/psp/psp_sock.c | 115 ++++++++++++++++++++++++-------------- 7 files changed, 97 insertions(+), 86 deletions(-) --- base-commit: 6ebcf5074cff0402730c6981d2397139fee6322d change-id: 20260903-psp-prep-8c6b0e4108e9 Best regards, -- Daniel Zahka [off-list ref]