Re: [PATCH net-next v2 4/7] psp: add core tracked stat for outstanding tx keys
From: Jakub Kicinski
Date: Wed Oct 28 2026 - 18:31:46 EST
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..