DPDK patches and discussions
 help / color / mirror / Atom feed
From: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
To: dev@dpdk.org
Cc: Kamalakannan R <kamalakannan.r@intel.com>
Subject: [PATCH 02/11] examples/pipeline: rework memory pool support
Date: Wed, 11 Jan 2023 20:55:59 +0000	[thread overview]
Message-ID: <20230111205608.87953-3-cristian.dumitrescu@intel.com> (raw)
In-Reply-To: <20230111205608.87953-1-cristian.dumitrescu@intel.com>

Rework the memory pool CLI command to accommodate the MBUF private
meta-data area size parameter.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Kamalakannan R <kamalakannan.r@intel.com>
---
 examples/pipeline/cli.c                       | 72 ++++++++++-------
 examples/pipeline/examples/fib.cli            |  2 +-
 examples/pipeline/examples/hash_func.cli      |  2 +-
 examples/pipeline/examples/l2fwd.cli          |  2 +-
 examples/pipeline/examples/l2fwd_macswp.cli   |  2 +-
 .../pipeline/examples/l2fwd_macswp_pcap.cli   |  2 +-
 examples/pipeline/examples/l2fwd_pcap.cli     |  2 +-
 examples/pipeline/examples/learner.cli        |  2 +-
 examples/pipeline/examples/meter.cli          |  2 +-
 examples/pipeline/examples/mirroring.cli      |  2 +-
 examples/pipeline/examples/recirculation.cli  |  2 +-
 examples/pipeline/examples/registers.cli      |  2 +-
 examples/pipeline/examples/selector.cli       |  2 +-
 examples/pipeline/examples/varbit.cli         |  2 +-
 examples/pipeline/examples/vxlan.cli          |  2 +-
 examples/pipeline/examples/vxlan_pcap.cli     |  2 +-
 examples/pipeline/obj.c                       | 80 +------------------
 examples/pipeline/obj.h                       | 27 -------
 18 files changed, 63 insertions(+), 146 deletions(-)

diff --git a/examples/pipeline/cli.c b/examples/pipeline/cli.c
index 8013541c4b..c014598cf1 100644
--- a/examples/pipeline/cli.c
+++ b/examples/pipeline/cli.c
@@ -192,72 +192,88 @@ parse_table_entry(struct rte_swx_ctl_pipeline *p,
 }
 
 static const char cmd_mempool_help[] =
-"mempool <mempool_name>\n"
-"   buffer <buffer_size>\n"
-"   pool <pool_size>\n"
-"   cache <cache_size>\n"
-"   cpu <cpu_id>\n";
+"mempool <mempool_name> "
+"meta <mbuf_private_size> "
+"pkt <pkt_buffer_size> "
+"pool <pool_size> "
+"cache <cache_size> "
+"numa <numa_node>\n";
 
 static void
 cmd_mempool(char **tokens,
-	uint32_t n_tokens,
-	char *out,
-	size_t out_size,
-	void *obj)
+	    uint32_t n_tokens,
+	    char *out,
+	    size_t out_size,
+	    void *obj __rte_unused)
 {
-	struct mempool_params p;
-	char *name;
-	struct mempool *mempool;
+	struct rte_mempool *mp;
+	char *mempool_name;
+	uint32_t mbuf_private_size, pkt_buffer_size, pool_size, cache_size, numa_node;
 
-	if (n_tokens != 10) {
+	if (n_tokens != 12) {
 		snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]);
 		return;
 	}
 
-	name = tokens[1];
+	mempool_name = tokens[1];
+
+	if (strcmp(tokens[2], "meta")) {
+		snprintf(out, out_size, MSG_ARG_NOT_FOUND, "meta");
+		return;
+	}
 
-	if (strcmp(tokens[2], "buffer") != 0) {
-		snprintf(out, out_size, MSG_ARG_NOT_FOUND, "buffer");
+	if (parser_read_uint32(&mbuf_private_size, tokens[3])) {
+		snprintf(out, out_size, MSG_ARG_INVALID, "mbuf_private_size");
 		return;
 	}
 
-	if (parser_read_uint32(&p.buffer_size, tokens[3]) != 0) {
-		snprintf(out, out_size, MSG_ARG_INVALID, "buffer_size");
+	if (strcmp(tokens[4], "pkt")) {
+		snprintf(out, out_size, MSG_ARG_NOT_FOUND, "pkt");
 		return;
 	}
 
-	if (strcmp(tokens[4], "pool") != 0) {
+	if (parser_read_uint32(&pkt_buffer_size, tokens[5])) {
+		snprintf(out, out_size, MSG_ARG_INVALID, "pkt_buffer_size");
+		return;
+	}
+
+	if (strcmp(tokens[6], "pool")) {
 		snprintf(out, out_size, MSG_ARG_NOT_FOUND, "pool");
 		return;
 	}
 
-	if (parser_read_uint32(&p.pool_size, tokens[5]) != 0) {
+	if (parser_read_uint32(&pool_size, tokens[7])) {
 		snprintf(out, out_size, MSG_ARG_INVALID, "pool_size");
 		return;
 	}
 
-	if (strcmp(tokens[6], "cache") != 0) {
+	if (strcmp(tokens[8], "cache")) {
 		snprintf(out, out_size, MSG_ARG_NOT_FOUND, "cache");
 		return;
 	}
 
-	if (parser_read_uint32(&p.cache_size, tokens[7]) != 0) {
+	if (parser_read_uint32(&cache_size, tokens[9])) {
 		snprintf(out, out_size, MSG_ARG_INVALID, "cache_size");
 		return;
 	}
 
-	if (strcmp(tokens[8], "cpu") != 0) {
-		snprintf(out, out_size, MSG_ARG_NOT_FOUND, "cpu");
+	if (strcmp(tokens[10], "numa")) {
+		snprintf(out, out_size, MSG_ARG_NOT_FOUND, "numa");
 		return;
 	}
 
-	if (parser_read_uint32(&p.cpu_id, tokens[9]) != 0) {
-		snprintf(out, out_size, MSG_ARG_INVALID, "cpu_id");
+	if (parser_read_uint32(&numa_node, tokens[11])) {
+		snprintf(out, out_size, MSG_ARG_INVALID, "numa_node");
 		return;
 	}
 
-	mempool = mempool_create(obj, name, &p);
-	if (mempool == NULL) {
+	mp = rte_pktmbuf_pool_create(mempool_name,
+				     pool_size,
+				     cache_size,
+				     mbuf_private_size,
+				     pkt_buffer_size,
+				     numa_node);
+	if (!mp) {
 		snprintf(out, out_size, MSG_CMD_FAIL, tokens[0]);
 		return;
 	}
diff --git a/examples/pipeline/examples/fib.cli b/examples/pipeline/examples/fib.cli
index 4e30c1320f..2450dc9ca4 100644
--- a/examples/pipeline/examples/fib.cli
+++ b/examples/pipeline/examples/fib.cli
@@ -18,7 +18,7 @@ pipeline libbuild /tmp/fib.c /tmp/fib.so
 ;
 ; Note: Customize the parameters below to match your setup.
 ;
-mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0
+mempool MEMPOOL0 meta 0 pkt 2176 pool 32K cache 256 numa 0
 ethdev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
 ethdev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
 ethdev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
diff --git a/examples/pipeline/examples/hash_func.cli b/examples/pipeline/examples/hash_func.cli
index b2e219e4c9..3840e47a2b 100644
--- a/examples/pipeline/examples/hash_func.cli
+++ b/examples/pipeline/examples/hash_func.cli
@@ -18,7 +18,7 @@ pipeline libbuild /tmp/hash_func.c /tmp/hash_func.so
 ;
 ; Note: Customize the parameters below to match your setup.
 ;
-mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0
+mempool MEMPOOL0 meta 0 pkt 2176 pool 32K cache 256 numa 0
 ethdev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
 ethdev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
 ethdev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
diff --git a/examples/pipeline/examples/l2fwd.cli b/examples/pipeline/examples/l2fwd.cli
index 27e37021b9..c5505df296 100644
--- a/examples/pipeline/examples/l2fwd.cli
+++ b/examples/pipeline/examples/l2fwd.cli
@@ -18,7 +18,7 @@ pipeline libbuild /tmp/l2fwd.c /tmp/l2fwd.so
 ;
 ; Note: Customize the parameters below to match your setup.
 ;
-mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0
+mempool MEMPOOL0 meta 0 pkt 2176 pool 32K cache 256 numa 0
 ethdev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
 ethdev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
 ethdev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
diff --git a/examples/pipeline/examples/l2fwd_macswp.cli b/examples/pipeline/examples/l2fwd_macswp.cli
index 11bb4543b9..bd700707f5 100644
--- a/examples/pipeline/examples/l2fwd_macswp.cli
+++ b/examples/pipeline/examples/l2fwd_macswp.cli
@@ -18,7 +18,7 @@ pipeline libbuild /tmp/l2fwd_macswp.c /tmp/l2fwd_macswp.so
 ;
 ; Note: Customize the parameters below to match your setup.
 ;
-mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0
+mempool MEMPOOL0 meta 0 pkt 2176 pool 32K cache 256 numa 0
 ethdev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
 ethdev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
 ethdev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
diff --git a/examples/pipeline/examples/l2fwd_macswp_pcap.cli b/examples/pipeline/examples/l2fwd_macswp_pcap.cli
index 8724dae3b0..aa64b32ab2 100644
--- a/examples/pipeline/examples/l2fwd_macswp_pcap.cli
+++ b/examples/pipeline/examples/l2fwd_macswp_pcap.cli
@@ -18,7 +18,7 @@ pipeline libbuild /tmp/l2fwd_macswp.c /tmp/l2fwd_macswp.so
 ;
 ; Note: Customize the parameters below to match your setup.
 ;
-mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0
+mempool MEMPOOL0 meta 0 pkt 2176 pool 32K cache 256 numa 0
 
 ;
 ; List of pipelines.
diff --git a/examples/pipeline/examples/l2fwd_pcap.cli b/examples/pipeline/examples/l2fwd_pcap.cli
index 4db0a0dc56..619d17474f 100644
--- a/examples/pipeline/examples/l2fwd_pcap.cli
+++ b/examples/pipeline/examples/l2fwd_pcap.cli
@@ -18,7 +18,7 @@ pipeline libbuild /tmp/l2fwd.c /tmp/l2fwd.so
 ;
 ; Note: Customize the parameters below to match your setup.
 ;
-mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0
+mempool MEMPOOL0 meta 0 pkt 2176 pool 32K cache 256 numa 0
 
 ;
 ; List of pipelines.
diff --git a/examples/pipeline/examples/learner.cli b/examples/pipeline/examples/learner.cli
index 6c8aa3921e..42184be1c8 100644
--- a/examples/pipeline/examples/learner.cli
+++ b/examples/pipeline/examples/learner.cli
@@ -18,7 +18,7 @@ pipeline libbuild /tmp/learner.c /tmp/learner.so
 ;
 ; Note: Customize the parameters below to match your setup.
 ;
-mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0
+mempool MEMPOOL0 meta 0 pkt 2176 pool 32K cache 256 numa 0
 ethdev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
 ethdev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
 ethdev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
diff --git a/examples/pipeline/examples/meter.cli b/examples/pipeline/examples/meter.cli
index 21582554b9..0fa38b16b8 100644
--- a/examples/pipeline/examples/meter.cli
+++ b/examples/pipeline/examples/meter.cli
@@ -18,7 +18,7 @@ pipeline libbuild /tmp/meter.c /tmp/meter.so
 ;
 ; Note: Customize the parameters below to match your setup.
 ;
-mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0
+mempool MEMPOOL0 meta 0 pkt 2176 pool 32K cache 256 numa 0
 ethdev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
 ethdev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
 ethdev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
diff --git a/examples/pipeline/examples/mirroring.cli b/examples/pipeline/examples/mirroring.cli
index 1d439e04d3..e7391de74b 100644
--- a/examples/pipeline/examples/mirroring.cli
+++ b/examples/pipeline/examples/mirroring.cli
@@ -18,7 +18,7 @@ pipeline libbuild /tmp/mirroring.c /tmp/mirroring.so
 ;
 ; Note: Customize the parameters below to match your setup.
 ;
-mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0
+mempool MEMPOOL0 meta 0 pkt 2176 pool 32K cache 256 numa 0
 ethdev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
 ethdev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
 ethdev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
diff --git a/examples/pipeline/examples/recirculation.cli b/examples/pipeline/examples/recirculation.cli
index 52d0894f12..965c870fd4 100644
--- a/examples/pipeline/examples/recirculation.cli
+++ b/examples/pipeline/examples/recirculation.cli
@@ -18,7 +18,7 @@ pipeline libbuild /tmp/recirculation.c /tmp/recirculation.so
 ;
 ; Note: Customize the parameters below to match your setup.
 ;
-mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0
+mempool MEMPOOL0 meta 0 pkt 2176 pool 32K cache 256 numa 0
 ethdev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
 ethdev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
 ethdev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
diff --git a/examples/pipeline/examples/registers.cli b/examples/pipeline/examples/registers.cli
index 3516f76a5b..aa775f71e5 100644
--- a/examples/pipeline/examples/registers.cli
+++ b/examples/pipeline/examples/registers.cli
@@ -18,7 +18,7 @@ pipeline libbuild /tmp/registers.c /tmp/registers.so
 ;
 ; Note: Customize the parameters below to match your setup.
 ;
-mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0
+mempool MEMPOOL0 meta 0 pkt 2176 pool 32K cache 256 numa 0
 ethdev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
 ethdev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
 ethdev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
diff --git a/examples/pipeline/examples/selector.cli b/examples/pipeline/examples/selector.cli
index f0e251b657..f0608de184 100644
--- a/examples/pipeline/examples/selector.cli
+++ b/examples/pipeline/examples/selector.cli
@@ -18,7 +18,7 @@ pipeline libbuild /tmp/selector.c /tmp/selector.so
 ;
 ; Note: Customize the parameters below to match your setup.
 ;
-mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0
+mempool MEMPOOL0 meta 0 pkt 2176 pool 32K cache 256 numa 0
 ethdev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
 ethdev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
 ethdev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
diff --git a/examples/pipeline/examples/varbit.cli b/examples/pipeline/examples/varbit.cli
index 0f89990471..648b8882c3 100644
--- a/examples/pipeline/examples/varbit.cli
+++ b/examples/pipeline/examples/varbit.cli
@@ -18,7 +18,7 @@ pipeline libbuild /tmp/varbit.c /tmp/varbit.so
 ;
 ; Note: Customize the parameters below to match your setup.
 ;
-mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0
+mempool MEMPOOL0 meta 0 pkt 2176 pool 32K cache 256 numa 0
 ethdev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
 ethdev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
 ethdev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
diff --git a/examples/pipeline/examples/vxlan.cli b/examples/pipeline/examples/vxlan.cli
index 1fbd1be6e4..4565adfaea 100644
--- a/examples/pipeline/examples/vxlan.cli
+++ b/examples/pipeline/examples/vxlan.cli
@@ -18,7 +18,7 @@ pipeline libbuild /tmp/vxlan.c /tmp/vxlan.so
 ;
 ; Note: Customize the parameters below to match your setup.
 ;
-mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0
+mempool MEMPOOL0 meta 0 pkt 2176 pool 32K cache 256 numa 0
 ethdev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
 ethdev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
 ethdev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on
diff --git a/examples/pipeline/examples/vxlan_pcap.cli b/examples/pipeline/examples/vxlan_pcap.cli
index adc7f73312..510c2ad870 100644
--- a/examples/pipeline/examples/vxlan_pcap.cli
+++ b/examples/pipeline/examples/vxlan_pcap.cli
@@ -18,7 +18,7 @@ pipeline libbuild /tmp/vxlan.c /tmp/vxlan.so
 ;
 ; Note: Customize the parameters below to match your setup.
 ;
-mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0
+mempool MEMPOOL0 meta 0 pkt 2176 pool 32K cache 256 numa 0
 
 ;
 ; List of pipelines.
diff --git a/examples/pipeline/obj.c b/examples/pipeline/obj.c
index b7e2316eec..4aaec02d9c 100644
--- a/examples/pipeline/obj.c
+++ b/examples/pipeline/obj.c
@@ -13,18 +13,12 @@
 #include <fcntl.h>
 #include <unistd.h>
 
-#include <rte_mempool.h>
 #include <rte_mbuf.h>
 #include <rte_ethdev.h>
 #include <rte_swx_ctl.h>
 
 #include "obj.h"
 
-/*
- * mempool
- */
-TAILQ_HEAD(mempool_list, mempool);
-
 /*
  * link
  */
@@ -39,75 +33,10 @@ TAILQ_HEAD(ring_list, ring);
  * obj
  */
 struct obj {
-	struct mempool_list mempool_list;
 	struct link_list link_list;
 	struct ring_list ring_list;
 };
 
-/*
- * mempool
- */
-#define BUFFER_SIZE_MIN (sizeof(struct rte_mbuf) + RTE_PKTMBUF_HEADROOM)
-
-struct mempool *
-mempool_create(struct obj *obj, const char *name, struct mempool_params *params)
-{
-	struct mempool *mempool;
-	struct rte_mempool *m;
-
-	/* Check input params */
-	if ((name == NULL) ||
-		mempool_find(obj, name) ||
-		(params == NULL) ||
-		(params->buffer_size < BUFFER_SIZE_MIN) ||
-		(params->pool_size == 0))
-		return NULL;
-
-	/* Resource create */
-	m = rte_pktmbuf_pool_create(
-		name,
-		params->pool_size,
-		params->cache_size,
-		0,
-		params->buffer_size - sizeof(struct rte_mbuf),
-		params->cpu_id);
-
-	if (m == NULL)
-		return NULL;
-
-	/* Node allocation */
-	mempool = calloc(1, sizeof(struct mempool));
-	if (mempool == NULL) {
-		rte_mempool_free(m);
-		return NULL;
-	}
-
-	/* Node fill in */
-	strlcpy(mempool->name, name, sizeof(mempool->name));
-	mempool->m = m;
-	mempool->buffer_size = params->buffer_size;
-
-	/* Node add to list */
-	TAILQ_INSERT_TAIL(&obj->mempool_list, mempool, node);
-
-	return mempool;
-}
-
-struct mempool *
-mempool_find(struct obj *obj, const char *name)
-{
-	struct mempool *mempool;
-
-	if (!obj || !name)
-		return NULL;
-
-	TAILQ_FOREACH(mempool, &obj->mempool_list, node)
-		if (strcmp(mempool->name, name) == 0)
-			return mempool;
-
-	return NULL;
-}
-
 /*
  * link
  */
@@ -172,7 +101,7 @@ link_create(struct obj *obj, const char *name, struct link_params *params)
 	struct rte_eth_conf port_conf;
 	struct link *link;
 	struct link_params_rss *rss;
-	struct mempool *mempool;
+	struct rte_mempool *mempool;
 	uint32_t cpu_id, i;
 	int status;
 	uint16_t port_id = 0;
@@ -194,8 +123,8 @@ link_create(struct obj *obj, const char *name, struct link_params *params)
 	if (rte_eth_dev_info_get(port_id, &port_info) != 0)
 		return NULL;
 
-	mempool = mempool_find(obj, params->rx.mempool_name);
-	if (mempool == NULL)
+	mempool = rte_mempool_lookup(params->rx.mempool_name);
+	if (!mempool)
 		return NULL;
 
 	rss = params->rx.rss;
@@ -252,7 +181,7 @@ link_create(struct obj *obj, const char *name, struct link_params *params)
 			params->rx.queue_size,
 			cpu_id,
 			NULL,
-			mempool->m);
+			mempool);
 
 		if (status < 0)
 			return NULL;
@@ -422,7 +351,6 @@ obj_init(void)
 	if (!obj)
 		return NULL;
 
-	TAILQ_INIT(&obj->mempool_list);
 	TAILQ_INIT(&obj->link_list);
 	TAILQ_INIT(&obj->ring_list);
 
diff --git a/examples/pipeline/obj.h b/examples/pipeline/obj.h
index 8ea1c414c2..4ea610ceed 100644
--- a/examples/pipeline/obj.h
+++ b/examples/pipeline/obj.h
@@ -8,7 +8,6 @@
 #include <stdint.h>
 #include <sys/queue.h>
 
-#include <rte_mempool.h>
 #include <rte_swx_pipeline.h>
 #include <rte_swx_ctl.h>
 
@@ -24,32 +23,6 @@ struct obj;
 struct obj *
 obj_init(void);
 
-/*
- * mempool
- */
-struct mempool_params {
-	uint32_t buffer_size;
-	uint32_t pool_size;
-	uint32_t cache_size;
-	uint32_t cpu_id;
-};
-
-struct mempool {
-	TAILQ_ENTRY(mempool) node;
-	char name[NAME_SIZE];
-	struct rte_mempool *m;
-	uint32_t buffer_size;
-};
-
-struct mempool *
-mempool_create(struct obj *obj,
-	       const char *name,
-	       struct mempool_params *params);
-
-struct mempool *
-mempool_find(struct obj *obj,
-	     const char *name);
-
 /*
  * link
  */
-- 
2.34.1


  parent reply	other threads:[~2023-01-11 20:56 UTC|newest]

Thread overview: 87+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-11 20:55 [PATCH 00/11] pipeline: add IPsec support Cristian Dumitrescu
2023-01-11 20:55 ` [PATCH 01/11] " Cristian Dumitrescu
2023-01-11 20:55 ` Cristian Dumitrescu [this message]
2023-01-11 20:56 ` [PATCH 03/11] examples/pipeline: streamline ring support Cristian Dumitrescu
2023-01-11 20:56 ` [PATCH 04/11] examples/pipeline: streamline the Ethernet device support Cristian Dumitrescu
2023-01-11 20:56 ` [PATCH 05/11] examples/pipeline: support crypto devices Cristian Dumitrescu
2023-01-11 20:56 ` [PATCH 06/11] examples/pipeline: add CLI command for crypto device Cristian Dumitrescu
2023-01-11 20:56 ` [PATCH 07/11] examples/pipeline: add IPsec CLI commands Cristian Dumitrescu
2023-01-11 20:56 ` [PATCH 08/11] examples/pipeline: rework the thread configuration updates Cristian Dumitrescu
2023-01-11 20:56 ` [PATCH 09/11] examples/pipeline: support blocks other than pipelines Cristian Dumitrescu
2023-01-11 20:56 ` [PATCH 10/11] examples/pipeline: add block enable/disable CLI commands Cristian Dumitrescu
2023-01-11 20:56 ` [PATCH 11/11] examples/pipeline: add IPsec example Cristian Dumitrescu
2023-01-11 23:43 ` [PATCH V2 00/11] pipeline: add IPsec support Cristian Dumitrescu
2023-01-11 23:43   ` [PATCH V2 01/11] " Cristian Dumitrescu
2023-01-11 23:43   ` [PATCH V2 02/11] examples/pipeline: rework memory pool support Cristian Dumitrescu
2023-01-11 23:43   ` [PATCH V2 03/11] examples/pipeline: streamline ring support Cristian Dumitrescu
2023-01-11 23:43   ` [PATCH V2 04/11] examples/pipeline: streamline the Ethernet device support Cristian Dumitrescu
2023-01-11 23:43   ` [PATCH V2 05/11] examples/pipeline: support crypto devices Cristian Dumitrescu
2023-01-11 23:43   ` [PATCH V2 06/11] examples/pipeline: add CLI command for crypto device Cristian Dumitrescu
2023-01-11 23:43   ` [PATCH V2 07/11] examples/pipeline: add IPsec CLI commands Cristian Dumitrescu
2023-01-11 23:43   ` [PATCH V2 08/11] examples/pipeline: rework the thread configuration updates Cristian Dumitrescu
2023-01-11 23:43   ` [PATCH V2 09/11] examples/pipeline: support blocks other than pipelines Cristian Dumitrescu
2023-01-11 23:43   ` [PATCH V2 10/11] examples/pipeline: add block enable/disable CLI commands Cristian Dumitrescu
2023-01-11 23:43   ` [PATCH V2 11/11] examples/pipeline: add IPsec example Cristian Dumitrescu
2023-01-12 15:45 ` [PATCH V3 00/11] pipeline: add IPsec support Cristian Dumitrescu
2023-01-12 15:45   ` [PATCH V3 01/11] " Cristian Dumitrescu
2023-01-12 15:45   ` [PATCH V3 02/11] examples/pipeline: rework memory pool support Cristian Dumitrescu
2023-01-12 15:45   ` [PATCH V3 03/11] examples/pipeline: streamline ring support Cristian Dumitrescu
2023-01-12 15:45   ` [PATCH V3 04/11] examples/pipeline: streamline the Ethernet device support Cristian Dumitrescu
2023-01-12 15:45   ` [PATCH V3 05/11] examples/pipeline: support crypto devices Cristian Dumitrescu
2023-01-12 15:45   ` [PATCH V3 06/11] examples/pipeline: add CLI command for crypto device Cristian Dumitrescu
2023-01-12 15:45   ` [PATCH V3 07/11] examples/pipeline: add IPsec CLI commands Cristian Dumitrescu
2023-01-12 15:45   ` [PATCH V3 08/11] examples/pipeline: rework the thread configuration updates Cristian Dumitrescu
2023-01-12 15:45   ` [PATCH V3 09/11] examples/pipeline: support blocks other than pipelines Cristian Dumitrescu
2023-01-12 15:45   ` [PATCH V3 10/11] examples/pipeline: add block enable/disable CLI commands Cristian Dumitrescu
2023-01-12 15:45   ` [PATCH V3 11/11] examples/pipeline: add IPsec example Cristian Dumitrescu
2023-01-12 15:49 ` [PATCH V3 00/11] pipeline: add IPsec support Cristian Dumitrescu
2023-01-12 15:49   ` [PATCH V3 01/11] " Cristian Dumitrescu
2023-01-12 15:49   ` [PATCH V3 02/11] examples/pipeline: rework memory pool support Cristian Dumitrescu
2023-01-12 15:49   ` [PATCH V3 03/11] examples/pipeline: streamline ring support Cristian Dumitrescu
2023-01-12 15:49   ` [PATCH V3 04/11] examples/pipeline: streamline the Ethernet device support Cristian Dumitrescu
2023-01-12 15:49   ` [PATCH V3 05/11] examples/pipeline: support crypto devices Cristian Dumitrescu
2023-01-12 15:49   ` [PATCH V3 06/11] examples/pipeline: add CLI command for crypto device Cristian Dumitrescu
2023-01-12 15:49   ` [PATCH V3 07/11] examples/pipeline: add IPsec CLI commands Cristian Dumitrescu
2023-01-12 15:49   ` [PATCH V3 08/11] examples/pipeline: rework the thread configuration updates Cristian Dumitrescu
2023-01-12 15:49   ` [PATCH V3 09/11] examples/pipeline: support blocks other than pipelines Cristian Dumitrescu
2023-01-12 15:49   ` [PATCH V3 10/11] examples/pipeline: add block enable/disable CLI commands Cristian Dumitrescu
2023-01-12 15:49   ` [PATCH V3 11/11] examples/pipeline: add IPsec example Cristian Dumitrescu
2023-01-12 18:53 ` [PATCH V4 00/11] pipeline: add IPsec support Cristian Dumitrescu
2023-01-12 18:53   ` [PATCH V4 01/11] " Cristian Dumitrescu
2023-01-12 18:53   ` [PATCH V4 02/11] examples/pipeline: rework memory pool support Cristian Dumitrescu
2023-01-12 18:53   ` [PATCH V4 03/11] examples/pipeline: streamline ring support Cristian Dumitrescu
2023-01-12 18:53   ` [PATCH V4 04/11] examples/pipeline: streamline the Ethernet device support Cristian Dumitrescu
2023-01-12 18:53   ` [PATCH V4 05/11] examples/pipeline: support crypto devices Cristian Dumitrescu
2023-01-12 18:53   ` [PATCH V4 06/11] examples/pipeline: add CLI command for crypto device Cristian Dumitrescu
2023-01-12 18:53   ` [PATCH V4 07/11] examples/pipeline: add IPsec CLI commands Cristian Dumitrescu
2023-01-12 18:53   ` [PATCH V4 08/11] examples/pipeline: rework the thread configuration updates Cristian Dumitrescu
2023-01-12 18:53   ` [PATCH V4 09/11] examples/pipeline: support blocks other than pipelines Cristian Dumitrescu
2023-01-12 18:53   ` [PATCH V4 10/11] examples/pipeline: add block enable/disable CLI commands Cristian Dumitrescu
2023-01-12 18:53   ` [PATCH V4 11/11] examples/pipeline: add IPsec example Cristian Dumitrescu
2023-01-26  9:17   ` [PATCH V4 00/11] pipeline: add IPsec support Thomas Monjalon
2023-01-26 13:11     ` Dumitrescu, Cristian
2023-01-26 13:34 ` [PATCH V5 " Cristian Dumitrescu
2023-01-26 13:34   ` [PATCH V5 01/11] " Cristian Dumitrescu
2023-01-26 13:34   ` [PATCH V5 02/11] examples/pipeline: rework memory pool support Cristian Dumitrescu
2023-01-26 13:34   ` [PATCH V5 03/11] examples/pipeline: streamline ring support Cristian Dumitrescu
2023-01-26 13:34   ` [PATCH V5 04/11] examples/pipeline: streamline the Ethernet device support Cristian Dumitrescu
2023-01-26 13:34   ` [PATCH V5 05/11] examples/pipeline: support crypto devices Cristian Dumitrescu
2023-01-26 13:34   ` [PATCH V5 06/11] examples/pipeline: add CLI command for crypto device Cristian Dumitrescu
2023-01-26 13:34   ` [PATCH V5 07/11] examples/pipeline: add IPsec CLI commands Cristian Dumitrescu
2023-01-26 13:34   ` [PATCH V5 08/11] examples/pipeline: rework the thread configuration updates Cristian Dumitrescu
2023-01-26 13:34   ` [PATCH V5 09/11] examples/pipeline: support blocks other than pipelines Cristian Dumitrescu
2023-01-26 13:34   ` [PATCH V5 10/11] examples/pipeline: add block enable/disable CLI commands Cristian Dumitrescu
2023-01-26 13:34   ` [PATCH V5 11/11] examples/pipeline: add IPsec example Cristian Dumitrescu
2023-01-26 14:12 ` [PATCH V6 00/11] pipeline: add IPsec support Cristian Dumitrescu
2023-01-26 14:12   ` [PATCH V6 01/11] " Cristian Dumitrescu
2023-01-26 14:12   ` [PATCH V6 02/11] examples/pipeline: rework memory pool support Cristian Dumitrescu
2023-01-26 14:12   ` [PATCH V6 03/11] examples/pipeline: streamline ring support Cristian Dumitrescu
2023-01-26 14:12   ` [PATCH V6 04/11] examples/pipeline: streamline the Ethernet device support Cristian Dumitrescu
2023-01-26 14:12   ` [PATCH V6 05/11] examples/pipeline: support crypto devices Cristian Dumitrescu
2023-01-26 14:12   ` [PATCH V6 06/11] examples/pipeline: add CLI command for crypto device Cristian Dumitrescu
2023-01-26 14:12   ` [PATCH V6 07/11] examples/pipeline: add IPsec CLI commands Cristian Dumitrescu
2023-01-26 14:12   ` [PATCH V6 08/11] examples/pipeline: rework the thread configuration updates Cristian Dumitrescu
2023-01-26 14:12   ` [PATCH V6 09/11] examples/pipeline: support blocks other than pipelines Cristian Dumitrescu
2023-01-26 14:12   ` [PATCH V6 10/11] examples/pipeline: add block enable/disable CLI commands Cristian Dumitrescu
2023-01-26 14:12   ` [PATCH V6 11/11] examples/pipeline: add IPsec example Cristian Dumitrescu
2023-02-05 16:13   ` [PATCH V6 00/11] pipeline: add IPsec support Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230111205608.87953-3-cristian.dumitrescu@intel.com \
    --to=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=kamalakannan.r@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).