get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/121844/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 121844,
    "url": "https://patches.dpdk.org/api/patches/121844/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20230111205608.87953-3-cristian.dumitrescu@intel.com/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20230111205608.87953-3-cristian.dumitrescu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230111205608.87953-3-cristian.dumitrescu@intel.com",
    "date": "2023-01-11T20:55:59",
    "name": "[02/11] examples/pipeline: rework memory pool support",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "583b089ff579c2ab5702f11bd6b88a01b6d15084",
    "submitter": {
        "id": 19,
        "url": "https://patches.dpdk.org/api/people/19/?format=api",
        "name": "Cristian Dumitrescu",
        "email": "cristian.dumitrescu@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20230111205608.87953-3-cristian.dumitrescu@intel.com/mbox/",
    "series": [
        {
            "id": 26482,
            "url": "https://patches.dpdk.org/api/series/26482/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=26482",
            "date": "2023-01-11T20:55:57",
            "name": "pipeline: add IPsec support",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/26482/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/121844/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/121844/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 2B4CB423AF;\n\tWed, 11 Jan 2023 21:56:30 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 625E442D3E;\n\tWed, 11 Jan 2023 21:56:17 +0100 (CET)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by mails.dpdk.org (Postfix) with ESMTP id B1AA142D33\n for <dev@dpdk.org>; Wed, 11 Jan 2023 21:56:13 +0100 (CET)",
            "from orsmga003.jf.intel.com ([10.7.209.27])\n by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 11 Jan 2023 12:56:12 -0800",
            "from silpixa00400573.ir.intel.com (HELO\n silpixa00400573.ger.corp.intel.com) ([10.237.222.53])\n by orsmga003.jf.intel.com with ESMTP; 11 Jan 2023 12:56:11 -0800"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1673470573; x=1705006573;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=JeIxI2EX7t0uaqwuydCObieL88k6xd9M4KVJ6JqHd/g=;\n b=U3jADPJtA6CpkrCiy9QV/4JnWS3neGXmjikE02YtsECnlQ5vd/N7lQ2+\n MquGJT+CXKXNmOAsRBZhYw+BDJwN/IsrcUAiY2kzyckQEsjBLxSk3O6IQ\n I9LBga3WIQuRlV28KEia/Ec24m4C/KmQQR2Dv5OqEkEH2vBivjcE+oFTF\n mT26PemSrjiU6afNYsXXcl3aPa5SWTPrH2/E/Yx5lqp0t0L76aB5EJYOt\n kTwGkdA8fYRejF8U1ECFynkYBo/nofTpz3qw3AcYM+DrZOQ0h0NZCLAS1\n MYVh5MQbEgc44C3m6ZB4sBqi7qz2jLB9XbASjzHyC5nG2fkuqGk8FYxcw A==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6500,9779,10586\"; a=\"303229769\"",
            "E=Sophos;i=\"5.96,317,1665471600\"; d=\"scan'208\";a=\"303229769\"",
            "E=McAfee;i=\"6500,9779,10586\"; a=\"607518837\"",
            "E=Sophos;i=\"5.96,317,1665471600\"; d=\"scan'208\";a=\"607518837\""
        ],
        "X-ExtLoop1": "1",
        "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",
        "Message-Id": "<20230111205608.87953-3-cristian.dumitrescu@intel.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20230111205608.87953-1-cristian.dumitrescu@intel.com>",
        "References": "<20230111205608.87953-1-cristian.dumitrescu@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "Rework the memory pool CLI command to accommodate the MBUF private\nmeta-data area size parameter.\n\nSigned-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>\nSigned-off-by: Kamalakannan R <kamalakannan.r@intel.com>\n---\n examples/pipeline/cli.c                       | 72 ++++++++++-------\n examples/pipeline/examples/fib.cli            |  2 +-\n examples/pipeline/examples/hash_func.cli      |  2 +-\n examples/pipeline/examples/l2fwd.cli          |  2 +-\n examples/pipeline/examples/l2fwd_macswp.cli   |  2 +-\n .../pipeline/examples/l2fwd_macswp_pcap.cli   |  2 +-\n examples/pipeline/examples/l2fwd_pcap.cli     |  2 +-\n examples/pipeline/examples/learner.cli        |  2 +-\n examples/pipeline/examples/meter.cli          |  2 +-\n examples/pipeline/examples/mirroring.cli      |  2 +-\n examples/pipeline/examples/recirculation.cli  |  2 +-\n examples/pipeline/examples/registers.cli      |  2 +-\n examples/pipeline/examples/selector.cli       |  2 +-\n examples/pipeline/examples/varbit.cli         |  2 +-\n examples/pipeline/examples/vxlan.cli          |  2 +-\n examples/pipeline/examples/vxlan_pcap.cli     |  2 +-\n examples/pipeline/obj.c                       | 80 +------------------\n examples/pipeline/obj.h                       | 27 -------\n 18 files changed, 63 insertions(+), 146 deletions(-)",
    "diff": "diff --git a/examples/pipeline/cli.c b/examples/pipeline/cli.c\nindex 8013541c4b..c014598cf1 100644\n--- a/examples/pipeline/cli.c\n+++ b/examples/pipeline/cli.c\n@@ -192,72 +192,88 @@ parse_table_entry(struct rte_swx_ctl_pipeline *p,\n }\n \n static const char cmd_mempool_help[] =\n-\"mempool <mempool_name>\\n\"\n-\"   buffer <buffer_size>\\n\"\n-\"   pool <pool_size>\\n\"\n-\"   cache <cache_size>\\n\"\n-\"   cpu <cpu_id>\\n\";\n+\"mempool <mempool_name> \"\n+\"meta <mbuf_private_size> \"\n+\"pkt <pkt_buffer_size> \"\n+\"pool <pool_size> \"\n+\"cache <cache_size> \"\n+\"numa <numa_node>\\n\";\n \n static void\n cmd_mempool(char **tokens,\n-\tuint32_t n_tokens,\n-\tchar *out,\n-\tsize_t out_size,\n-\tvoid *obj)\n+\t    uint32_t n_tokens,\n+\t    char *out,\n+\t    size_t out_size,\n+\t    void *obj __rte_unused)\n {\n-\tstruct mempool_params p;\n-\tchar *name;\n-\tstruct mempool *mempool;\n+\tstruct rte_mempool *mp;\n+\tchar *mempool_name;\n+\tuint32_t mbuf_private_size, pkt_buffer_size, pool_size, cache_size, numa_node;\n \n-\tif (n_tokens != 10) {\n+\tif (n_tokens != 12) {\n \t\tsnprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]);\n \t\treturn;\n \t}\n \n-\tname = tokens[1];\n+\tmempool_name = tokens[1];\n+\n+\tif (strcmp(tokens[2], \"meta\")) {\n+\t\tsnprintf(out, out_size, MSG_ARG_NOT_FOUND, \"meta\");\n+\t\treturn;\n+\t}\n \n-\tif (strcmp(tokens[2], \"buffer\") != 0) {\n-\t\tsnprintf(out, out_size, MSG_ARG_NOT_FOUND, \"buffer\");\n+\tif (parser_read_uint32(&mbuf_private_size, tokens[3])) {\n+\t\tsnprintf(out, out_size, MSG_ARG_INVALID, \"mbuf_private_size\");\n \t\treturn;\n \t}\n \n-\tif (parser_read_uint32(&p.buffer_size, tokens[3]) != 0) {\n-\t\tsnprintf(out, out_size, MSG_ARG_INVALID, \"buffer_size\");\n+\tif (strcmp(tokens[4], \"pkt\")) {\n+\t\tsnprintf(out, out_size, MSG_ARG_NOT_FOUND, \"pkt\");\n \t\treturn;\n \t}\n \n-\tif (strcmp(tokens[4], \"pool\") != 0) {\n+\tif (parser_read_uint32(&pkt_buffer_size, tokens[5])) {\n+\t\tsnprintf(out, out_size, MSG_ARG_INVALID, \"pkt_buffer_size\");\n+\t\treturn;\n+\t}\n+\n+\tif (strcmp(tokens[6], \"pool\")) {\n \t\tsnprintf(out, out_size, MSG_ARG_NOT_FOUND, \"pool\");\n \t\treturn;\n \t}\n \n-\tif (parser_read_uint32(&p.pool_size, tokens[5]) != 0) {\n+\tif (parser_read_uint32(&pool_size, tokens[7])) {\n \t\tsnprintf(out, out_size, MSG_ARG_INVALID, \"pool_size\");\n \t\treturn;\n \t}\n \n-\tif (strcmp(tokens[6], \"cache\") != 0) {\n+\tif (strcmp(tokens[8], \"cache\")) {\n \t\tsnprintf(out, out_size, MSG_ARG_NOT_FOUND, \"cache\");\n \t\treturn;\n \t}\n \n-\tif (parser_read_uint32(&p.cache_size, tokens[7]) != 0) {\n+\tif (parser_read_uint32(&cache_size, tokens[9])) {\n \t\tsnprintf(out, out_size, MSG_ARG_INVALID, \"cache_size\");\n \t\treturn;\n \t}\n \n-\tif (strcmp(tokens[8], \"cpu\") != 0) {\n-\t\tsnprintf(out, out_size, MSG_ARG_NOT_FOUND, \"cpu\");\n+\tif (strcmp(tokens[10], \"numa\")) {\n+\t\tsnprintf(out, out_size, MSG_ARG_NOT_FOUND, \"numa\");\n \t\treturn;\n \t}\n \n-\tif (parser_read_uint32(&p.cpu_id, tokens[9]) != 0) {\n-\t\tsnprintf(out, out_size, MSG_ARG_INVALID, \"cpu_id\");\n+\tif (parser_read_uint32(&numa_node, tokens[11])) {\n+\t\tsnprintf(out, out_size, MSG_ARG_INVALID, \"numa_node\");\n \t\treturn;\n \t}\n \n-\tmempool = mempool_create(obj, name, &p);\n-\tif (mempool == NULL) {\n+\tmp = rte_pktmbuf_pool_create(mempool_name,\n+\t\t\t\t     pool_size,\n+\t\t\t\t     cache_size,\n+\t\t\t\t     mbuf_private_size,\n+\t\t\t\t     pkt_buffer_size,\n+\t\t\t\t     numa_node);\n+\tif (!mp) {\n \t\tsnprintf(out, out_size, MSG_CMD_FAIL, tokens[0]);\n \t\treturn;\n \t}\ndiff --git a/examples/pipeline/examples/fib.cli b/examples/pipeline/examples/fib.cli\nindex 4e30c1320f..2450dc9ca4 100644\n--- a/examples/pipeline/examples/fib.cli\n+++ b/examples/pipeline/examples/fib.cli\n@@ -18,7 +18,7 @@ pipeline libbuild /tmp/fib.c /tmp/fib.so\n ;\n ; Note: Customize the parameters below to match your setup.\n ;\n-mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0\n+mempool MEMPOOL0 meta 0 pkt 2176 pool 32K cache 256 numa 0\n ethdev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\n ethdev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\n ethdev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\ndiff --git a/examples/pipeline/examples/hash_func.cli b/examples/pipeline/examples/hash_func.cli\nindex b2e219e4c9..3840e47a2b 100644\n--- a/examples/pipeline/examples/hash_func.cli\n+++ b/examples/pipeline/examples/hash_func.cli\n@@ -18,7 +18,7 @@ pipeline libbuild /tmp/hash_func.c /tmp/hash_func.so\n ;\n ; Note: Customize the parameters below to match your setup.\n ;\n-mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0\n+mempool MEMPOOL0 meta 0 pkt 2176 pool 32K cache 256 numa 0\n ethdev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\n ethdev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\n ethdev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\ndiff --git a/examples/pipeline/examples/l2fwd.cli b/examples/pipeline/examples/l2fwd.cli\nindex 27e37021b9..c5505df296 100644\n--- a/examples/pipeline/examples/l2fwd.cli\n+++ b/examples/pipeline/examples/l2fwd.cli\n@@ -18,7 +18,7 @@ pipeline libbuild /tmp/l2fwd.c /tmp/l2fwd.so\n ;\n ; Note: Customize the parameters below to match your setup.\n ;\n-mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0\n+mempool MEMPOOL0 meta 0 pkt 2176 pool 32K cache 256 numa 0\n ethdev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\n ethdev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\n ethdev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\ndiff --git a/examples/pipeline/examples/l2fwd_macswp.cli b/examples/pipeline/examples/l2fwd_macswp.cli\nindex 11bb4543b9..bd700707f5 100644\n--- a/examples/pipeline/examples/l2fwd_macswp.cli\n+++ b/examples/pipeline/examples/l2fwd_macswp.cli\n@@ -18,7 +18,7 @@ pipeline libbuild /tmp/l2fwd_macswp.c /tmp/l2fwd_macswp.so\n ;\n ; Note: Customize the parameters below to match your setup.\n ;\n-mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0\n+mempool MEMPOOL0 meta 0 pkt 2176 pool 32K cache 256 numa 0\n ethdev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\n ethdev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\n ethdev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\ndiff --git a/examples/pipeline/examples/l2fwd_macswp_pcap.cli b/examples/pipeline/examples/l2fwd_macswp_pcap.cli\nindex 8724dae3b0..aa64b32ab2 100644\n--- a/examples/pipeline/examples/l2fwd_macswp_pcap.cli\n+++ b/examples/pipeline/examples/l2fwd_macswp_pcap.cli\n@@ -18,7 +18,7 @@ pipeline libbuild /tmp/l2fwd_macswp.c /tmp/l2fwd_macswp.so\n ;\n ; Note: Customize the parameters below to match your setup.\n ;\n-mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0\n+mempool MEMPOOL0 meta 0 pkt 2176 pool 32K cache 256 numa 0\n \n ;\n ; List of pipelines.\ndiff --git a/examples/pipeline/examples/l2fwd_pcap.cli b/examples/pipeline/examples/l2fwd_pcap.cli\nindex 4db0a0dc56..619d17474f 100644\n--- a/examples/pipeline/examples/l2fwd_pcap.cli\n+++ b/examples/pipeline/examples/l2fwd_pcap.cli\n@@ -18,7 +18,7 @@ pipeline libbuild /tmp/l2fwd.c /tmp/l2fwd.so\n ;\n ; Note: Customize the parameters below to match your setup.\n ;\n-mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0\n+mempool MEMPOOL0 meta 0 pkt 2176 pool 32K cache 256 numa 0\n \n ;\n ; List of pipelines.\ndiff --git a/examples/pipeline/examples/learner.cli b/examples/pipeline/examples/learner.cli\nindex 6c8aa3921e..42184be1c8 100644\n--- a/examples/pipeline/examples/learner.cli\n+++ b/examples/pipeline/examples/learner.cli\n@@ -18,7 +18,7 @@ pipeline libbuild /tmp/learner.c /tmp/learner.so\n ;\n ; Note: Customize the parameters below to match your setup.\n ;\n-mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0\n+mempool MEMPOOL0 meta 0 pkt 2176 pool 32K cache 256 numa 0\n ethdev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\n ethdev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\n ethdev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\ndiff --git a/examples/pipeline/examples/meter.cli b/examples/pipeline/examples/meter.cli\nindex 21582554b9..0fa38b16b8 100644\n--- a/examples/pipeline/examples/meter.cli\n+++ b/examples/pipeline/examples/meter.cli\n@@ -18,7 +18,7 @@ pipeline libbuild /tmp/meter.c /tmp/meter.so\n ;\n ; Note: Customize the parameters below to match your setup.\n ;\n-mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0\n+mempool MEMPOOL0 meta 0 pkt 2176 pool 32K cache 256 numa 0\n ethdev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\n ethdev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\n ethdev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\ndiff --git a/examples/pipeline/examples/mirroring.cli b/examples/pipeline/examples/mirroring.cli\nindex 1d439e04d3..e7391de74b 100644\n--- a/examples/pipeline/examples/mirroring.cli\n+++ b/examples/pipeline/examples/mirroring.cli\n@@ -18,7 +18,7 @@ pipeline libbuild /tmp/mirroring.c /tmp/mirroring.so\n ;\n ; Note: Customize the parameters below to match your setup.\n ;\n-mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0\n+mempool MEMPOOL0 meta 0 pkt 2176 pool 32K cache 256 numa 0\n ethdev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\n ethdev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\n ethdev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\ndiff --git a/examples/pipeline/examples/recirculation.cli b/examples/pipeline/examples/recirculation.cli\nindex 52d0894f12..965c870fd4 100644\n--- a/examples/pipeline/examples/recirculation.cli\n+++ b/examples/pipeline/examples/recirculation.cli\n@@ -18,7 +18,7 @@ pipeline libbuild /tmp/recirculation.c /tmp/recirculation.so\n ;\n ; Note: Customize the parameters below to match your setup.\n ;\n-mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0\n+mempool MEMPOOL0 meta 0 pkt 2176 pool 32K cache 256 numa 0\n ethdev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\n ethdev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\n ethdev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\ndiff --git a/examples/pipeline/examples/registers.cli b/examples/pipeline/examples/registers.cli\nindex 3516f76a5b..aa775f71e5 100644\n--- a/examples/pipeline/examples/registers.cli\n+++ b/examples/pipeline/examples/registers.cli\n@@ -18,7 +18,7 @@ pipeline libbuild /tmp/registers.c /tmp/registers.so\n ;\n ; Note: Customize the parameters below to match your setup.\n ;\n-mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0\n+mempool MEMPOOL0 meta 0 pkt 2176 pool 32K cache 256 numa 0\n ethdev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\n ethdev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\n ethdev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\ndiff --git a/examples/pipeline/examples/selector.cli b/examples/pipeline/examples/selector.cli\nindex f0e251b657..f0608de184 100644\n--- a/examples/pipeline/examples/selector.cli\n+++ b/examples/pipeline/examples/selector.cli\n@@ -18,7 +18,7 @@ pipeline libbuild /tmp/selector.c /tmp/selector.so\n ;\n ; Note: Customize the parameters below to match your setup.\n ;\n-mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0\n+mempool MEMPOOL0 meta 0 pkt 2176 pool 32K cache 256 numa 0\n ethdev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\n ethdev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\n ethdev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\ndiff --git a/examples/pipeline/examples/varbit.cli b/examples/pipeline/examples/varbit.cli\nindex 0f89990471..648b8882c3 100644\n--- a/examples/pipeline/examples/varbit.cli\n+++ b/examples/pipeline/examples/varbit.cli\n@@ -18,7 +18,7 @@ pipeline libbuild /tmp/varbit.c /tmp/varbit.so\n ;\n ; Note: Customize the parameters below to match your setup.\n ;\n-mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0\n+mempool MEMPOOL0 meta 0 pkt 2176 pool 32K cache 256 numa 0\n ethdev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\n ethdev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\n ethdev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\ndiff --git a/examples/pipeline/examples/vxlan.cli b/examples/pipeline/examples/vxlan.cli\nindex 1fbd1be6e4..4565adfaea 100644\n--- a/examples/pipeline/examples/vxlan.cli\n+++ b/examples/pipeline/examples/vxlan.cli\n@@ -18,7 +18,7 @@ pipeline libbuild /tmp/vxlan.c /tmp/vxlan.so\n ;\n ; Note: Customize the parameters below to match your setup.\n ;\n-mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0\n+mempool MEMPOOL0 meta 0 pkt 2176 pool 32K cache 256 numa 0\n ethdev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\n ethdev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\n ethdev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\ndiff --git a/examples/pipeline/examples/vxlan_pcap.cli b/examples/pipeline/examples/vxlan_pcap.cli\nindex adc7f73312..510c2ad870 100644\n--- a/examples/pipeline/examples/vxlan_pcap.cli\n+++ b/examples/pipeline/examples/vxlan_pcap.cli\n@@ -18,7 +18,7 @@ pipeline libbuild /tmp/vxlan.c /tmp/vxlan.so\n ;\n ; Note: Customize the parameters below to match your setup.\n ;\n-mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0\n+mempool MEMPOOL0 meta 0 pkt 2176 pool 32K cache 256 numa 0\n \n ;\n ; List of pipelines.\ndiff --git a/examples/pipeline/obj.c b/examples/pipeline/obj.c\nindex b7e2316eec..4aaec02d9c 100644\n--- a/examples/pipeline/obj.c\n+++ b/examples/pipeline/obj.c\n@@ -13,18 +13,12 @@\n #include <fcntl.h>\n #include <unistd.h>\n \n-#include <rte_mempool.h>\n #include <rte_mbuf.h>\n #include <rte_ethdev.h>\n #include <rte_swx_ctl.h>\n \n #include \"obj.h\"\n \n-/*\n- * mempool\n- */\n-TAILQ_HEAD(mempool_list, mempool);\n-\n /*\n  * link\n  */\n@@ -39,75 +33,10 @@ TAILQ_HEAD(ring_list, ring);\n  * obj\n  */\n struct obj {\n-\tstruct mempool_list mempool_list;\n \tstruct link_list link_list;\n \tstruct ring_list ring_list;\n };\n \n-/*\n- * mempool\n- */\n-#define BUFFER_SIZE_MIN (sizeof(struct rte_mbuf) + RTE_PKTMBUF_HEADROOM)\n-\n-struct mempool *\n-mempool_create(struct obj *obj, const char *name, struct mempool_params *params)\n-{\n-\tstruct mempool *mempool;\n-\tstruct rte_mempool *m;\n-\n-\t/* Check input params */\n-\tif ((name == NULL) ||\n-\t\tmempool_find(obj, name) ||\n-\t\t(params == NULL) ||\n-\t\t(params->buffer_size < BUFFER_SIZE_MIN) ||\n-\t\t(params->pool_size == 0))\n-\t\treturn NULL;\n-\n-\t/* Resource create */\n-\tm = rte_pktmbuf_pool_create(\n-\t\tname,\n-\t\tparams->pool_size,\n-\t\tparams->cache_size,\n-\t\t0,\n-\t\tparams->buffer_size - sizeof(struct rte_mbuf),\n-\t\tparams->cpu_id);\n-\n-\tif (m == NULL)\n-\t\treturn NULL;\n-\n-\t/* Node allocation */\n-\tmempool = calloc(1, sizeof(struct mempool));\n-\tif (mempool == NULL) {\n-\t\trte_mempool_free(m);\n-\t\treturn NULL;\n-\t}\n-\n-\t/* Node fill in */\n-\tstrlcpy(mempool->name, name, sizeof(mempool->name));\n-\tmempool->m = m;\n-\tmempool->buffer_size = params->buffer_size;\n-\n-\t/* Node add to list */\n-\tTAILQ_INSERT_TAIL(&obj->mempool_list, mempool, node);\n-\n-\treturn mempool;\n-}\n-\n-struct mempool *\n-mempool_find(struct obj *obj, const char *name)\n-{\n-\tstruct mempool *mempool;\n-\n-\tif (!obj || !name)\n-\t\treturn NULL;\n-\n-\tTAILQ_FOREACH(mempool, &obj->mempool_list, node)\n-\t\tif (strcmp(mempool->name, name) == 0)\n-\t\t\treturn mempool;\n-\n-\treturn NULL;\n-}\n-\n /*\n  * link\n  */\n@@ -172,7 +101,7 @@ link_create(struct obj *obj, const char *name, struct link_params *params)\n \tstruct rte_eth_conf port_conf;\n \tstruct link *link;\n \tstruct link_params_rss *rss;\n-\tstruct mempool *mempool;\n+\tstruct rte_mempool *mempool;\n \tuint32_t cpu_id, i;\n \tint status;\n \tuint16_t port_id = 0;\n@@ -194,8 +123,8 @@ link_create(struct obj *obj, const char *name, struct link_params *params)\n \tif (rte_eth_dev_info_get(port_id, &port_info) != 0)\n \t\treturn NULL;\n \n-\tmempool = mempool_find(obj, params->rx.mempool_name);\n-\tif (mempool == NULL)\n+\tmempool = rte_mempool_lookup(params->rx.mempool_name);\n+\tif (!mempool)\n \t\treturn NULL;\n \n \trss = params->rx.rss;\n@@ -252,7 +181,7 @@ link_create(struct obj *obj, const char *name, struct link_params *params)\n \t\t\tparams->rx.queue_size,\n \t\t\tcpu_id,\n \t\t\tNULL,\n-\t\t\tmempool->m);\n+\t\t\tmempool);\n \n \t\tif (status < 0)\n \t\t\treturn NULL;\n@@ -422,7 +351,6 @@ obj_init(void)\n \tif (!obj)\n \t\treturn NULL;\n \n-\tTAILQ_INIT(&obj->mempool_list);\n \tTAILQ_INIT(&obj->link_list);\n \tTAILQ_INIT(&obj->ring_list);\n \ndiff --git a/examples/pipeline/obj.h b/examples/pipeline/obj.h\nindex 8ea1c414c2..4ea610ceed 100644\n--- a/examples/pipeline/obj.h\n+++ b/examples/pipeline/obj.h\n@@ -8,7 +8,6 @@\n #include <stdint.h>\n #include <sys/queue.h>\n \n-#include <rte_mempool.h>\n #include <rte_swx_pipeline.h>\n #include <rte_swx_ctl.h>\n \n@@ -24,32 +23,6 @@ struct obj;\n struct obj *\n obj_init(void);\n \n-/*\n- * mempool\n- */\n-struct mempool_params {\n-\tuint32_t buffer_size;\n-\tuint32_t pool_size;\n-\tuint32_t cache_size;\n-\tuint32_t cpu_id;\n-};\n-\n-struct mempool {\n-\tTAILQ_ENTRY(mempool) node;\n-\tchar name[NAME_SIZE];\n-\tstruct rte_mempool *m;\n-\tuint32_t buffer_size;\n-};\n-\n-struct mempool *\n-mempool_create(struct obj *obj,\n-\t       const char *name,\n-\t       struct mempool_params *params);\n-\n-struct mempool *\n-mempool_find(struct obj *obj,\n-\t     const char *name);\n-\n /*\n  * link\n  */\n",
    "prefixes": [
        "02/11"
    ]
}