DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] mempool: introduce flag to indicate hw mempool
@ 2017-04-03  9:12 Hemant Agrawal
  2017-04-03 15:19 ` Olivier Matz
  0 siblings, 1 reply; 7+ messages in thread
From: Hemant Agrawal @ 2017-04-03  9:12 UTC (permalink / raw)
  To: olivier.matz; +Cc: dev, shreyansh.jain

Hardware pools need to distinguish between buffers allocated using
software or hardware backed pools.

Some HW NICs may choose to autonomously free the pickets during
transmit if the packet is from HW pool. While they should not do
it for software backed pools.

Such flag would also help when multiple pools are being handled by
a PMD, saving costly compare operations for any internal marker.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 lib/librte_mempool/rte_mempool.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h
index 991feaa..91dbd21 100644
--- a/lib/librte_mempool/rte_mempool.h
+++ b/lib/librte_mempool/rte_mempool.h
@@ -263,6 +263,11 @@ struct rte_mempool {
 #define MEMPOOL_F_SC_GET         0x0008 /**< Default get is "single-consumer".*/
 #define MEMPOOL_F_POOL_CREATED   0x0010 /**< Internal: pool is created. */
 #define MEMPOOL_F_NO_PHYS_CONTIG 0x0020 /**< Don't need physically contiguous objs. */
+#define MEMPOOL_F_HW_POOL        (1 << ((sizeof(int) * 8) - 1)) /**< Internal:
+	* Hardware offloaded pool. This information may be used by the
+	* NIC or other hw. Some NICs autonomously free the HW backed pool packets. */
+
+/**< Don't need physically contiguous objs. */
 
 /**
  * @internal When debug is enabled, store some statistics.
-- 
1.9.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-04-04  9:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-03  9:12 [dpdk-dev] [PATCH] mempool: introduce flag to indicate hw mempool Hemant Agrawal
2017-04-03 15:19 ` Olivier Matz
2017-04-04  5:35   ` Hemant Agrawal
2017-04-04  6:58     ` Thomas Monjalon
2017-04-04  7:29       ` Hemant Agrawal
2017-04-04  9:13         ` Olivier MATZ
2017-04-04  7:48       ` Olivier MATZ

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).