On Tue, Jan 20, 2026 at 05:07:49PM -0800, Jakub Kicinski wrote: > On Thu, 15 Jan 2026 21:02:11 -0800 Bobby Eshleman wrote: > > This series improves the CPU cost of RX token management by adding an > > attribute to NETDEV_CMD_BIND_RX that configures sockets using the > > binding to avoid the xarray allocator and instead use a per-binding niov > > array and a uref field in niov. > > > > Improvement is ~13% cpu util per RX user thread. > > > > Using kperf, the following results were observed: > > > > Before: > > Average RX worker idle %: 13.13, flows 4, test runs 11 > > After: > > Average RX worker idle %: 26.32, flows 4, test runs 11 > > > > Two other approaches were tested, but with no improvement. Namely, 1) > > using a hashmap for tokens and 2) keeping an xarray of atomic counters > > but using RCU so that the hotpath could be mostly lockless. Neither of > > these approaches proved better than the simple array in terms of CPU. > > > > The attribute NETDEV_A_DMABUF_AUTORELEASE is added to toggle the > > optimization. It is an optional attribute and defaults to 0 (i.e., > > optimization on). > > IDK if the cmsg approach is still right for this flow TBH. > IIRC when Stan talked about this a while back we were considering doing > this via Netlink. Anything that proves that the user owns the binding > would work. IIUC the TCP socket in this design just proves that socket > has received a token from a given binding right?
In both designs the owner of the binding starts of as the netlink opener, and then ownership spreads out to TCP sockets as packets are steered to them. Tokens are received by the user which gives them a share in the form of references on the pp and binding. This design follows the same approach... but I may be misinterpreting what you mean by ownership? Best, Bobby
