Re: [PATCH net-next v2 4/7] psp: add core tracked stat for outstanding tx keys
From: Kiran Kella
Date: Thu Oct 29 2026 - 03:20:10 EST
On Thu, Oct 29, 2026 at 3:59 AM Jakub Kicinski <kuba@xxxxxxxxxx> wrote:
>
> On Wed, 28 Oct 2026 17:16:17 +0530 Kiran Kella wrote:
> > > + -
> > > + name: tx-key-count
> > > + type: uint
> > > + doc: |
> > > + Current number of Tx keys installed on the device.
> > > + Only visible if the driver stores keys on device.
> > > + Kernel statistic.
> > >
> >
> > Maybe it is good to have a counter that denotes the number of PSP
> > sessions set up on a device, which is managed in
> > psp_dev_tx_key_add/psp_dev_tx_key_del operations similar to the
> > tx-key-count. That way, even in non-SADB drivers the user can know the
> > scale of the PSP sessions set up on a device at any time.
>
> AFAIR the thinking was to also implicitly flag that the device has
> an SADB here. So this stat should probably be called tx-sadb-key-count.
> We couldn't think of a reason to count the tx keys when SADB is not
> present. Rx keys? maybe, because of SPI exhaustion. Tx keys - why..
Tx keys to just provide info to the user about the scale of active PSP
bidirectional sessions (after the key exchange) for debuggability and
for any other derived scaling/performance metrics.
Especially for non-SADB drivers, where there is no device limit on the
Tx keys that can be created (of course limited by the SPI exhaustion
on the peer).
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature