> From: Wathsala Vithanage [mailto:wathsala.vithan...@arm.com] > Sent: Tuesday, 3 June 2025 00.38 > > Extend the ethdev library to enable the stashing of different data > objects, such as the ones listed below, into CPU caches directly > from the NIC. > > - Rx/Tx queue descriptors > - Rx packets > - Packet headers > - packet payloads > - Data of a packet at an offset from the start of the packet > > The APIs are designed in a hardware/vendor agnostic manner such that > supporting PMDs could use any capabilities available in the underlying > hardware for fine-grained stashing of data objects into a CPU cache > > The API provides an interface to query the availability of stashing > capabilities, i.e., platform/NIC support, stashable object types, etc, > via the rte_eth_dev_stashing_capabilities_get interface. > > The function pair rte_eth_dev_stashing_rx_config_set and > rte_eth_dev_stashing_tx_config_set sets the stashing hint (the CPU, > cache level, and data object types) on the Rx and Tx queues. > > PMDs that support stashing must register their implementations with the > following eth_dev_ops callbacks, which are invoked by the ethdev > functions listed above. > > - stashing_capabilities_get > - stashing_rx_hints_set > - stashing_tx_hints_set > > Signed-off-by: Wathsala Vithanage <wathsala.vithan...@arm.com> > Reviewed-by: Honnappa Nagarahalli <honnappa.nagaraha...@arm.com> > Reviewed-by: Dhruv Tripathi <dhruv.tripa...@arm.com>
Nitpicking: In DPDK, "objects" usually refer to mbufs, mempool elements or similar. So please use the term "flags" instead of "objects". Also in the macros, definitions and comments. And DPDK usually uses 64 bit for flags, so they should be uint64_t. Unless there is a fast path performance related reason to make them shorter. If you use the same flags for both RX and TX, instead of providing separate definitions for TX flags, the descriptions of the flags should reflect this. The capabilities APIs should output the list/range of valid "offset" values for RX and TX. And if the offset cannot be negative, please use an unsigned type for it. The lib/ethdev/rte_ethdev.c follows the design pattern of setting rte_errno and returning -1 on error. Please follow the same design pattern in the new functions added to the rte_ethdev library.