ethdev: add mbuf fast free Tx offload
PMDs which expose this offload cap supports optimization for fast release of mbufs following successful Tx. Such optimization requires that per queue, all mbufs come from the same mempool and has refcnt = 1. Signed-off-by: Shahaf Shuler <shahafs@mellanox.com> Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
This commit is contained in:
parent
cba7f53b71
commit
d6f90afd30
@ -628,6 +628,15 @@ Supports packet type parsing and returns a list of supported types.
|
||||
|
||||
.. _nic_features_timesync:
|
||||
|
||||
Mbuf fast free
|
||||
--------------
|
||||
|
||||
Supports optimization for fast release of mbufs following successful Tx.
|
||||
Requires that per queue, all mbufs come from the same mempool and has refcnt = 1.
|
||||
|
||||
* **[uses] rte_eth_txconf,rte_eth_txmode**: ``offloads:DEV_TX_OFFLOAD_MBUF_FAST_FREE``.
|
||||
* **[provides] rte_eth_dev_info**: ``tx_offload_capa,tx_queue_offload_capa:DEV_TX_OFFLOAD_MBUF_FAST_FREE``.
|
||||
|
||||
Timesync
|
||||
--------
|
||||
|
||||
|
@ -75,3 +75,4 @@ x86-64 =
|
||||
Usage doc =
|
||||
Design doc =
|
||||
Perf doc =
|
||||
Mbuf fast free =
|
||||
|
@ -1232,6 +1232,9 @@ rte_eth_convert_txq_flags(const uint32_t txq_flags, uint64_t *tx_offloads)
|
||||
offloads |= DEV_TX_OFFLOAD_UDP_CKSUM;
|
||||
if (!(txq_flags & ETH_TXQ_FLAGS_NOXSUMTCP))
|
||||
offloads |= DEV_TX_OFFLOAD_TCP_CKSUM;
|
||||
if ((txq_flags & ETH_TXQ_FLAGS_NOREFCOUNT) &&
|
||||
(txq_flags & ETH_TXQ_FLAGS_NOMULTMEMP))
|
||||
offloads |= DEV_TX_OFFLOAD_MBUF_FAST_FREE;
|
||||
|
||||
*tx_offloads = offloads;
|
||||
}
|
||||
@ -1254,6 +1257,8 @@ rte_eth_convert_txq_offloads(const uint64_t tx_offloads, uint32_t *txq_flags)
|
||||
flags |= ETH_TXQ_FLAGS_NOXSUMUDP;
|
||||
if (!(tx_offloads & DEV_TX_OFFLOAD_TCP_CKSUM))
|
||||
flags |= ETH_TXQ_FLAGS_NOXSUMTCP;
|
||||
if (tx_offloads & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
|
||||
flags |= (ETH_TXQ_FLAGS_NOREFCOUNT | ETH_TXQ_FLAGS_NOMULTMEMP);
|
||||
|
||||
*txq_flags = flags;
|
||||
}
|
||||
|
@ -991,6 +991,11 @@ struct rte_eth_conf {
|
||||
*/
|
||||
#define DEV_TX_OFFLOAD_MULTI_SEGS 0x00008000
|
||||
/**< Device supports multi segment send. */
|
||||
#define DEV_TX_OFFLOAD_MBUF_FAST_FREE 0x00010000
|
||||
/**< Device supports optimization for fast release of mbufs.
|
||||
* When set application must guarantee that per-queue all mbufs comes from
|
||||
* the same mempool and has refcnt = 1.
|
||||
*/
|
||||
|
||||
struct rte_pci_device;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user