get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 56190,
    "url": "http://patchwork.dpdk.org/api/patches/56190/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/fd0ceb39597870a720fbf57462991e2bdd77dd2b.1562347546.git.anatoly.burakov@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<fd0ceb39597870a720fbf57462991e2bdd77dd2b.1562347546.git.anatoly.burakov@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/fd0ceb39597870a720fbf57462991e2bdd77dd2b.1562347546.git.anatoly.burakov@intel.com",
    "date": "2019-07-05T17:26:22",
    "name": "[v5,4/9] eal: hide shared memory config",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "b0b8d7dfd7a6b33c7290f53e2e0aa384d9725dca",
    "submitter": {
        "id": 4,
        "url": "http://patchwork.dpdk.org/api/people/4/?format=api",
        "name": "Anatoly Burakov",
        "email": "anatoly.burakov@intel.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/fd0ceb39597870a720fbf57462991e2bdd77dd2b.1562347546.git.anatoly.burakov@intel.com/mbox/",
    "series": [
        {
            "id": 5379,
            "url": "http://patchwork.dpdk.org/api/series/5379/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=5379",
            "date": "2019-07-05T17:26:18",
            "name": "Make shared memory config non-public",
            "version": 5,
            "mbox": "http://patchwork.dpdk.org/series/5379/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/56190/comments/",
    "check": "fail",
    "checks": "http://patchwork.dpdk.org/api/patches/56190/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 156091BE7F;\n\tFri,  5 Jul 2019 19:26:45 +0200 (CEST)",
            "from mga17.intel.com (mga17.intel.com [192.55.52.151])\n\tby dpdk.org (Postfix) with ESMTP id 356241BE7F\n\tfor <dev@dpdk.org>; Fri,  5 Jul 2019 19:26:43 +0200 (CEST)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t05 Jul 2019 10:26:42 -0700",
            "from silpixa00399498.ir.intel.com (HELO\n\tsilpixa00399498.ger.corp.intel.com) ([10.237.223.125])\n\tby FMSMGA003.fm.intel.com with ESMTP; 05 Jul 2019 10:26:38 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.63,455,1557212400\"; d=\"scan'208\";a=\"172723272\"",
        "From": "Anatoly Burakov <anatoly.burakov@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Neil Horman <nhorman@tuxdriver.com>,\n\tJohn McNamara <john.mcnamara@intel.com>,\n\tMarko Kovacevic <marko.kovacevic@intel.com>,\n\tKonstantin Ananyev <konstantin.ananyev@intel.com>,\n\tDavid Hunt <david.hunt@intel.com>,\n\tBruce Richardson <bruce.richardson@intel.com>,\n\tByron Marohn <byron.marohn@intel.com>,\n\tPablo de Lara Guarch <pablo.de.lara.guarch@intel.com>,\n\tYipeng Wang <yipeng1.wang@intel.com>,\n\tSameh Gobriel <sameh.gobriel@intel.com>,\n\tVladimir Medvedkin <vladimir.medvedkin@intel.com>,\n\tOlivier Matz <olivier.matz@6wind.com>,\n\tAndrew Rybchenko <arybchenko@solarflare.com>,\n\tHonnappa Nagarahalli <honnappa.nagarahalli@arm.com>,\n\tReshma Pattan <reshma.pattan@intel.com>, thomas@monjalon.net,\n\tdavid.marchand@redhat.com, stephen@networkplumber.org",
        "Date": "Fri,  5 Jul 2019 18:26:22 +0100",
        "Message-Id": "<fd0ceb39597870a720fbf57462991e2bdd77dd2b.1562347546.git.anatoly.burakov@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": [
            "<cover.1562347546.git.anatoly.burakov@intel.com>",
            "<cover.1562347546.git.anatoly.burakov@intel.com>"
        ],
        "References": [
            "<cover.1562347546.git.anatoly.burakov@intel.com>",
            "<cover.1562332112.git.anatoly.burakov@intel.com>\n\t<cover.1562347546.git.anatoly.burakov@intel.com>"
        ],
        "Subject": "[dpdk-dev] [PATCH v5 4/9] eal: hide shared memory config",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Now that everything that has ever accessed the shared memory\nconfig is doing so through the public API's, we can make it\ninternal. Since we're removing quite a few headers from\nrte_eal_memconfig.h, we need to add them back in places\nwhere this header is used.\n\nThis bumps the ABI, so also change all build files and make\nupdate documentation.\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\nAcked-by: Stephen Hemminger <stephen@networkplumber.org>\nAcked-by: David Marchand <david.marchand@redhat.com>\n---\n app/test/test_fbarray.c                       |  1 +\n app/test/test_memzone.c                       |  1 +\n app/test/test_tailq.c                         |  1 +\n doc/guides/rel_notes/deprecation.rst          |  3 -\n doc/guides/rel_notes/release_19_08.rst        |  8 +-\n drivers/bus/pci/linux/pci_vfio.c              |  1 +\n lib/librte_acl/rte_acl.c                      |  2 +\n lib/librte_distributor/rte_distributor.c      |  1 +\n lib/librte_distributor/rte_distributor_v20.c  |  1 +\n lib/librte_eal/common/eal_common_mcfg.c       |  2 +\n lib/librte_eal/common/eal_common_memory.c     |  1 +\n lib/librte_eal/common/eal_common_memzone.c    |  1 +\n lib/librte_eal/common/eal_common_tailqs.c     |  1 +\n lib/librte_eal/common/eal_memcfg.h            | 80 ++++++++++++++++\n .../common/include/rte_eal_memconfig.h        | 95 +------------------\n lib/librte_eal/common/include/rte_fbarray.h   |  1 -\n lib/librte_eal/common/include/rte_memory.h    | 24 ++++-\n lib/librte_eal/common/malloc_heap.c           |  2 +\n lib/librte_eal/common/malloc_mp.c             |  1 +\n lib/librte_eal/common/rte_malloc.c            |  1 +\n lib/librte_eal/freebsd/eal/Makefile           |  2 +-\n lib/librte_eal/freebsd/eal/eal_memory.c       |  1 +\n lib/librte_eal/linux/eal/Makefile             |  2 +-\n lib/librte_eal/linux/eal/eal.c                |  1 +\n lib/librte_eal/linux/eal/eal_memalloc.c       |  1 +\n lib/librte_eal/linux/eal/eal_memory.c         |  1 +\n lib/librte_eal/linux/eal/eal_vfio.c           |  1 +\n lib/librte_eal/meson.build                    |  2 +-\n lib/librte_efd/rte_efd.c                      |  1 +\n lib/librte_hash/rte_cuckoo_hash.c             |  1 +\n lib/librte_hash/rte_fbk_hash.c                |  1 +\n lib/librte_lpm/rte_lpm.c                      |  1 +\n lib/librte_lpm/rte_lpm6.c                     |  1 +\n lib/librte_member/rte_member.c                |  1 +\n lib/librte_mempool/rte_mempool.c              |  1 +\n lib/librte_rcu/rte_rcu_qsbr.h                 |  1 +\n lib/librte_reorder/rte_reorder.c              |  1 +\n lib/librte_ring/rte_ring.c                    |  1 +\n 38 files changed, 148 insertions(+), 101 deletions(-)\n create mode 100644 lib/librte_eal/common/eal_memcfg.h",
    "diff": "diff --git a/app/test/test_fbarray.c b/app/test/test_fbarray.c\nindex d2b041887..a691bf445 100644\n--- a/app/test/test_fbarray.c\n+++ b/app/test/test_fbarray.c\n@@ -2,6 +2,7 @@\n  * Copyright(c) 2010-2014 Intel Corporation\n  */\n \n+#include <stdbool.h>\n #include <stdio.h>\n #include <stdint.h>\n #include <limits.h>\ndiff --git a/app/test/test_memzone.c b/app/test/test_memzone.c\nindex 9fe465e62..7501b63c5 100644\n--- a/app/test/test_memzone.c\n+++ b/app/test/test_memzone.c\n@@ -19,6 +19,7 @@\n #include <rte_errno.h>\n #include <rte_malloc.h>\n #include \"../../lib/librte_eal/common/malloc_elem.h\"\n+#include \"../../lib/librte_eal/common/eal_memcfg.h\"\n \n #include \"test.h\"\n \ndiff --git a/app/test/test_tailq.c b/app/test/test_tailq.c\nindex a4ecea2d8..7c9b69fdb 100644\n--- a/app/test/test_tailq.c\n+++ b/app/test/test_tailq.c\n@@ -12,6 +12,7 @@\n #include <rte_eal.h>\n #include <rte_eal_memconfig.h>\n #include <rte_string_fns.h>\n+#include <rte_tailq.h>\n \n #include \"test.h\"\n \ndiff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst\nindex e2721fad6..583217da8 100644\n--- a/doc/guides/rel_notes/deprecation.rst\n+++ b/doc/guides/rel_notes/deprecation.rst\n@@ -23,9 +23,6 @@ Deprecation Notices\n * eal: The function ``rte_eal_remote_launch`` will return new error codes\n   after read or write error on the pipe, instead of calling ``rte_panic``.\n \n-* eal: the ``rte_mem_config`` struct will be made private to remove it from the\n-  externally visible ABI and allow it to be updated in the future.\n-\n * eal: both declaring and identifying devices will be streamlined in v18.11.\n   New functions will appear to query a specific port from buses, classes of\n   device and device drivers. Device declaration will be made coherent with the\ndiff --git a/doc/guides/rel_notes/release_19_08.rst b/doc/guides/rel_notes/release_19_08.rst\nindex 21934bf01..cc6dfa33f 100644\n--- a/doc/guides/rel_notes/release_19_08.rst\n+++ b/doc/guides/rel_notes/release_19_08.rst\n@@ -172,6 +172,10 @@ API Changes\n    Also, make sure to start the actual text at the margin.\n    =========================================================\n \n+* The ``rte_mem_config`` structure has been made private. The new accessor\n+  ``rte_mcfg_*`` functions were introduced to provide replacement for direct\n+  access to the shared mem config.\n+\n * The network structures, definitions and functions have\n   been prefixed by ``rte_`` to resolve conflicts with libc headers.\n \n@@ -201,6 +205,8 @@ ABI Changes\n    Also, make sure to start the actual text at the margin.\n    =========================================================\n \n+* The ``rte_mem_config`` structure has been made private.\n+\n * eventdev: Event based Rx adapter callback\n \n   The mbuf pointer array in the event eth Rx adapter callback\n@@ -246,7 +252,7 @@ The libraries prepended with a plus sign were incremented in this version.\n      librte_compressdev.so.1\n      librte_cryptodev.so.7\n      librte_distributor.so.1\n-     librte_eal.so.10\n+   + librte_eal.so.11\n      librte_efd.so.1\n      librte_ethdev.so.12\n    + librte_eventdev.so.7\ndiff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c\nindex ebf6ccd3c..1ceb1c07b 100644\n--- a/drivers/bus/pci/linux/pci_vfio.c\n+++ b/drivers/bus/pci/linux/pci_vfio.c\n@@ -20,6 +20,7 @@\n #include <rte_eal.h>\n #include <rte_bus.h>\n #include <rte_spinlock.h>\n+#include <rte_tailq.h>\n \n #include \"eal_filesystem.h\"\n \ndiff --git a/lib/librte_acl/rte_acl.c b/lib/librte_acl/rte_acl.c\nindex 7ff11d25f..bd7247cc3 100644\n--- a/lib/librte_acl/rte_acl.c\n+++ b/lib/librte_acl/rte_acl.c\n@@ -4,6 +4,8 @@\n \n #include <rte_string_fns.h>\n #include <rte_acl.h>\n+#include <rte_tailq.h>\n+\n #include \"acl.h\"\n \n TAILQ_HEAD(rte_acl_list, rte_tailq_entry);\ndiff --git a/lib/librte_distributor/rte_distributor.c b/lib/librte_distributor/rte_distributor.c\nindex 9eb78b330..0a3213bbf 100644\n--- a/lib/librte_distributor/rte_distributor.c\n+++ b/lib/librte_distributor/rte_distributor.c\n@@ -14,6 +14,7 @@\n #include <rte_string_fns.h>\n #include <rte_eal_memconfig.h>\n #include <rte_pause.h>\n+#include <rte_tailq.h>\n \n #include \"rte_distributor_private.h\"\n #include \"rte_distributor.h\"\ndiff --git a/lib/librte_distributor/rte_distributor_v20.c b/lib/librte_distributor/rte_distributor_v20.c\nindex 1fc03b971..cdc0969a8 100644\n--- a/lib/librte_distributor/rte_distributor_v20.c\n+++ b/lib/librte_distributor/rte_distributor_v20.c\n@@ -13,6 +13,7 @@\n #include <rte_string_fns.h>\n #include <rte_eal_memconfig.h>\n #include <rte_pause.h>\n+#include <rte_tailq.h>\n \n #include \"rte_distributor_v20.h\"\n #include \"rte_distributor_private.h\"\ndiff --git a/lib/librte_eal/common/eal_common_mcfg.c b/lib/librte_eal/common/eal_common_mcfg.c\nindex ba2bc37b7..337890a61 100644\n--- a/lib/librte_eal/common/eal_common_mcfg.c\n+++ b/lib/librte_eal/common/eal_common_mcfg.c\n@@ -5,6 +5,8 @@\n #include <rte_config.h>\n #include <rte_eal_memconfig.h>\n \n+#include \"eal_memcfg.h\"\n+\n void\n rte_mcfg_mem_read_lock(void)\n {\ndiff --git a/lib/librte_eal/common/eal_common_memory.c b/lib/librte_eal/common/eal_common_memory.c\nindex fe22b139b..19ea47570 100644\n--- a/lib/librte_eal/common/eal_common_memory.c\n+++ b/lib/librte_eal/common/eal_common_memory.c\n@@ -24,6 +24,7 @@\n #include \"eal_memalloc.h\"\n #include \"eal_private.h\"\n #include \"eal_internal_cfg.h\"\n+#include \"eal_memcfg.h\"\n #include \"malloc_heap.h\"\n \n /*\ndiff --git a/lib/librte_eal/common/eal_common_memzone.c b/lib/librte_eal/common/eal_common_memzone.c\nindex 521ad7ca1..ef6c909cb 100644\n--- a/lib/librte_eal/common/eal_common_memzone.c\n+++ b/lib/librte_eal/common/eal_common_memzone.c\n@@ -24,6 +24,7 @@\n #include \"malloc_heap.h\"\n #include \"malloc_elem.h\"\n #include \"eal_private.h\"\n+#include \"eal_memcfg.h\"\n \n static inline const struct rte_memzone *\n memzone_lookup_thread_unsafe(const char *name)\ndiff --git a/lib/librte_eal/common/eal_common_tailqs.c b/lib/librte_eal/common/eal_common_tailqs.c\nindex dc2c13caa..ead06897b 100644\n--- a/lib/librte_eal/common/eal_common_tailqs.c\n+++ b/lib/librte_eal/common/eal_common_tailqs.c\n@@ -23,6 +23,7 @@\n #include <rte_debug.h>\n \n #include \"eal_private.h\"\n+#include \"eal_memcfg.h\"\n \n TAILQ_HEAD(rte_tailq_elem_head, rte_tailq_elem);\n /* local tailq list */\ndiff --git a/lib/librte_eal/common/eal_memcfg.h b/lib/librte_eal/common/eal_memcfg.h\nnew file mode 100644\nindex 000000000..74f6159c6\n--- /dev/null\n+++ b/lib/librte_eal/common/eal_memcfg.h\n@@ -0,0 +1,80 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2019 Intel Corporation\n+ */\n+\n+#ifndef EAL_MEMCFG_H\n+#define EAL_MEMCFG_H\n+\n+#include <rte_config.h>\n+#include <rte_eal_memconfig.h>\n+#include <rte_malloc_heap.h>\n+#include <rte_memory.h>\n+#include <rte_memzone.h>\n+#include <rte_pause.h>\n+#include <rte_rwlock.h>\n+#include <rte_tailq.h>\n+\n+/**\n+ * Memory configuration shared across multiple processes.\n+ */\n+struct rte_mem_config {\n+\tvolatile uint32_t magic;   /**< Magic number - sanity check. */\n+\n+\t/* memory topology */\n+\tuint32_t nchannel;    /**< Number of channels (0 if unknown). */\n+\tuint32_t nrank;       /**< Number of ranks (0 if unknown). */\n+\n+\t/**\n+\t * current lock nest order\n+\t *  - qlock->mlock (ring/hash/lpm)\n+\t *  - mplock->qlock->mlock (mempool)\n+\t * Notice:\n+\t *  *ALWAYS* obtain qlock first if having to obtain both qlock and mlock\n+\t */\n+\trte_rwlock_t mlock;   /**< used by memzones for thread safety. */\n+\trte_rwlock_t qlock;   /**< used by tailqs for thread safety. */\n+\trte_rwlock_t mplock;  /**< used by mempool library for thread safety. */\n+\n+\trte_rwlock_t memory_hotplug_lock;\n+\t/**< Indicates whether memory hotplug request is in progress. */\n+\n+\t/* memory segments and zones */\n+\tstruct rte_fbarray memzones; /**< Memzone descriptors. */\n+\n+\tstruct rte_memseg_list memsegs[RTE_MAX_MEMSEG_LISTS];\n+\t/**< List of dynamic arrays holding memsegs */\n+\n+\tstruct rte_tailq_head tailq_head[RTE_MAX_TAILQ];\n+\t/**< Tailqs for objects */\n+\n+\tstruct malloc_heap malloc_heaps[RTE_MAX_HEAPS];\n+\t/**< DPDK malloc heaps */\n+\n+\tint next_socket_id; /**< Next socket ID for external malloc heap */\n+\n+\t/* rte_mem_config has to be mapped at the exact same address in all\n+\t * processes, so we need to store it.\n+\t */\n+\tuint64_t mem_cfg_addr; /**< Address of this structure in memory. */\n+\n+\t/* Primary and secondary processes cannot run with different legacy or\n+\t * single file segments options, so to avoid having to specify these\n+\t * options to all processes, store them in shared config and update the\n+\t * internal config at init time.\n+\t */\n+\tuint32_t legacy_mem; /**< stored legacy mem parameter. */\n+\tuint32_t single_file_segments;\n+\t/**< stored single file segments parameter. */\n+\n+\tuint8_t dma_maskbits; /**< Keeps the more restricted dma mask. */\n+} __attribute__((packed));\n+\n+static inline void\n+rte_eal_mcfg_wait_complete(struct rte_mem_config *mcfg)\n+{\n+\t/* wait until shared mem_config finish initialising */\n+\twhile (mcfg->magic != RTE_MAGIC)\n+\t\trte_pause();\n+}\n+\n+#endif /* EAL_MEMCFG_H */\ndiff --git a/lib/librte_eal/common/include/rte_eal_memconfig.h b/lib/librte_eal/common/include/rte_eal_memconfig.h\nindex 58dcbb96d..dc61a6fed 100644\n--- a/lib/librte_eal/common/include/rte_eal_memconfig.h\n+++ b/lib/librte_eal/common/include/rte_eal_memconfig.h\n@@ -5,101 +5,16 @@\n #ifndef _RTE_EAL_MEMCONFIG_H_\n #define _RTE_EAL_MEMCONFIG_H_\n \n-#include <rte_config.h>\n-#include <rte_tailq.h>\n-#include <rte_memory.h>\n-#include <rte_memzone.h>\n-#include <rte_malloc_heap.h>\n-#include <rte_rwlock.h>\n-#include <rte_pause.h>\n-#include <rte_fbarray.h>\n+/**\n+ * @file\n+ *\n+ * This API allows access to EAL shared memory configuration through an API.\n+ */\n \n #ifdef __cplusplus\n extern \"C\" {\n #endif\n \n-/**\n- * memseg list is a special case as we need to store a bunch of other data\n- * together with the array itself.\n- */\n-struct rte_memseg_list {\n-\tRTE_STD_C11\n-\tunion {\n-\t\tvoid *base_va;\n-\t\t/**< Base virtual address for this memseg list. */\n-\t\tuint64_t addr_64;\n-\t\t/**< Makes sure addr is always 64-bits */\n-\t};\n-\tuint64_t page_sz; /**< Page size for all memsegs in this list. */\n-\tint socket_id; /**< Socket ID for all memsegs in this list. */\n-\tvolatile uint32_t version; /**< version number for multiprocess sync. */\n-\tsize_t len; /**< Length of memory area covered by this memseg list. */\n-\tunsigned int external; /**< 1 if this list points to external memory */\n-\tstruct rte_fbarray memseg_arr;\n-};\n-\n-/**\n- * the structure for the memory configuration for the RTE.\n- * Used by the rte_config structure. It is separated out, as for multi-process\n- * support, the memory details should be shared across instances\n- */\n-struct rte_mem_config {\n-\tvolatile uint32_t magic;   /**< Magic number - Sanity check. */\n-\n-\t/* memory topology */\n-\tuint32_t nchannel;    /**< Number of channels (0 if unknown). */\n-\tuint32_t nrank;       /**< Number of ranks (0 if unknown). */\n-\n-\t/**\n-\t * current lock nest order\n-\t *  - qlock->mlock (ring/hash/lpm)\n-\t *  - mplock->qlock->mlock (mempool)\n-\t * Notice:\n-\t *  *ALWAYS* obtain qlock first if having to obtain both qlock and mlock\n-\t */\n-\trte_rwlock_t mlock;   /**< only used by memzone LIB for thread-safe. */\n-\trte_rwlock_t qlock;   /**< used for tailq operation for thread safe. */\n-\trte_rwlock_t mplock;  /**< only used by mempool LIB for thread-safe. */\n-\n-\trte_rwlock_t memory_hotplug_lock;\n-\t/**< indicates whether memory hotplug request is in progress. */\n-\n-\t/* memory segments and zones */\n-\tstruct rte_fbarray memzones; /**< Memzone descriptors. */\n-\n-\tstruct rte_memseg_list memsegs[RTE_MAX_MEMSEG_LISTS];\n-\t/**< list of dynamic arrays holding memsegs */\n-\n-\tstruct rte_tailq_head tailq_head[RTE_MAX_TAILQ]; /**< Tailqs for objects */\n-\n-\t/* Heaps of Malloc */\n-\tstruct malloc_heap malloc_heaps[RTE_MAX_HEAPS];\n-\n-\t/* next socket ID for external malloc heap */\n-\tint next_socket_id;\n-\n-\t/* address of mem_config in primary process. used to map shared config into\n-\t * exact same address the primary process maps it.\n-\t */\n-\tuint64_t mem_cfg_addr;\n-\n-\t/* legacy mem and single file segments options are shared */\n-\tuint32_t legacy_mem;\n-\tuint32_t single_file_segments;\n-\n-\t/* keeps the more restricted dma mask */\n-\tuint8_t dma_maskbits;\n-} __attribute__((__packed__));\n-\n-\n-inline static void\n-rte_eal_mcfg_wait_complete(struct rte_mem_config* mcfg)\n-{\n-\t/* wait until shared mem_config finish initialising */\n-\twhile(mcfg->magic != RTE_MAGIC)\n-\t\trte_pause();\n-}\n-\n /**\n  * Lock the internal EAL shared memory configuration for shared access.\n  */\ndiff --git a/lib/librte_eal/common/include/rte_fbarray.h b/lib/librte_eal/common/include/rte_fbarray.h\nindex d0af2d8c7..6dccdbec9 100644\n--- a/lib/librte_eal/common/include/rte_fbarray.h\n+++ b/lib/librte_eal/common/include/rte_fbarray.h\n@@ -34,7 +34,6 @@\n extern \"C\" {\n #endif\n \n-#include <stdbool.h>\n #include <stdio.h>\n \n #include <rte_compat.h>\ndiff --git a/lib/librte_eal/common/include/rte_memory.h b/lib/librte_eal/common/include/rte_memory.h\nindex 44cbe6fd2..ca34a10c3 100644\n--- a/lib/librte_eal/common/include/rte_memory.h\n+++ b/lib/librte_eal/common/include/rte_memory.h\n@@ -22,9 +22,7 @@ extern \"C\" {\n #include <rte_common.h>\n #include <rte_compat.h>\n #include <rte_config.h>\n-\n-/* forward declaration for pointers */\n-struct rte_memseg_list;\n+#include <rte_fbarray.h>\n \n __extension__\n enum rte_page_sizes {\n@@ -104,6 +102,26 @@ struct rte_memseg {\n \tuint32_t flags;             /**< Memseg-specific flags */\n } __rte_packed;\n \n+/**\n+ * memseg list is a special case as we need to store a bunch of other data\n+ * together with the array itself.\n+ */\n+struct rte_memseg_list {\n+\tRTE_STD_C11\n+\tunion {\n+\t\tvoid *base_va;\n+\t\t/**< Base virtual address for this memseg list. */\n+\t\tuint64_t addr_64;\n+\t\t/**< Makes sure addr is always 64-bits */\n+\t};\n+\tuint64_t page_sz; /**< Page size for all memsegs in this list. */\n+\tint socket_id; /**< Socket ID for all memsegs in this list. */\n+\tvolatile uint32_t version; /**< version number for multiprocess sync. */\n+\tsize_t len; /**< Length of memory area covered by this memseg list. */\n+\tunsigned int external; /**< 1 if this list points to external memory */\n+\tstruct rte_fbarray memseg_arr;\n+};\n+\n /**\n  * Lock page in physical memory and prevent from swapping.\n  *\ndiff --git a/lib/librte_eal/common/malloc_heap.c b/lib/librte_eal/common/malloc_heap.c\nindex f1d31de0d..634ca212f 100644\n--- a/lib/librte_eal/common/malloc_heap.c\n+++ b/lib/librte_eal/common/malloc_heap.c\n@@ -20,11 +20,13 @@\n #include <rte_string_fns.h>\n #include <rte_spinlock.h>\n #include <rte_memcpy.h>\n+#include <rte_memzone.h>\n #include <rte_atomic.h>\n #include <rte_fbarray.h>\n \n #include \"eal_internal_cfg.h\"\n #include \"eal_memalloc.h\"\n+#include \"eal_memcfg.h\"\n #include \"malloc_elem.h\"\n #include \"malloc_heap.h\"\n #include \"malloc_mp.h\"\ndiff --git a/lib/librte_eal/common/malloc_mp.c b/lib/librte_eal/common/malloc_mp.c\nindex 7c6112c4e..1f212f834 100644\n--- a/lib/librte_eal/common/malloc_mp.c\n+++ b/lib/librte_eal/common/malloc_mp.c\n@@ -10,6 +10,7 @@\n #include <rte_string_fns.h>\n \n #include \"eal_memalloc.h\"\n+#include \"eal_memcfg.h\"\n \n #include \"malloc_elem.h\"\n #include \"malloc_mp.h\"\ndiff --git a/lib/librte_eal/common/rte_malloc.c b/lib/librte_eal/common/rte_malloc.c\nindex 2cad7beaa..fecd9a964 100644\n--- a/lib/librte_eal/common/rte_malloc.c\n+++ b/lib/librte_eal/common/rte_malloc.c\n@@ -25,6 +25,7 @@\n #include \"malloc_elem.h\"\n #include \"malloc_heap.h\"\n #include \"eal_memalloc.h\"\n+#include \"eal_memcfg.h\"\n \n \n /* Free the memory space back to heap */\ndiff --git a/lib/librte_eal/freebsd/eal/Makefile b/lib/librte_eal/freebsd/eal/Makefile\nindex eb921275e..89131ea89 100644\n--- a/lib/librte_eal/freebsd/eal/Makefile\n+++ b/lib/librte_eal/freebsd/eal/Makefile\n@@ -22,7 +22,7 @@ LDLIBS += -lrte_kvargs\n \n EXPORT_MAP := ../../rte_eal_version.map\n \n-LIBABIVER := 10\n+LIBABIVER := 11\n \n # specific to freebsd exec-env\n SRCS-$(CONFIG_RTE_EXEC_ENV_FREEBSD) := eal.c\ndiff --git a/lib/librte_eal/freebsd/eal/eal_memory.c b/lib/librte_eal/freebsd/eal/eal_memory.c\nindex 4b092e1f2..9b9a0577a 100644\n--- a/lib/librte_eal/freebsd/eal/eal_memory.c\n+++ b/lib/librte_eal/freebsd/eal/eal_memory.c\n@@ -18,6 +18,7 @@\n #include \"eal_private.h\"\n #include \"eal_internal_cfg.h\"\n #include \"eal_filesystem.h\"\n+#include \"eal_memcfg.h\"\n \n #define EAL_PAGE_SIZE (sysconf(_SC_PAGESIZE))\n \ndiff --git a/lib/librte_eal/linux/eal/Makefile b/lib/librte_eal/linux/eal/Makefile\nindex dfe8e9a49..0f5725e64 100644\n--- a/lib/librte_eal/linux/eal/Makefile\n+++ b/lib/librte_eal/linux/eal/Makefile\n@@ -10,7 +10,7 @@ ARCH_DIR ?= $(RTE_ARCH)\n EXPORT_MAP := ../../rte_eal_version.map\n VPATH += $(RTE_SDK)/lib/librte_eal/common/arch/$(ARCH_DIR)\n \n-LIBABIVER := 10\n+LIBABIVER := 11\n \n VPATH += $(RTE_SDK)/lib/librte_eal/common\n \ndiff --git a/lib/librte_eal/linux/eal/eal.c b/lib/librte_eal/linux/eal/eal.c\nindex 8a0b387ce..f974cec1c 100644\n--- a/lib/librte_eal/linux/eal/eal.c\n+++ b/lib/librte_eal/linux/eal/eal.c\n@@ -57,6 +57,7 @@\n #include \"eal_internal_cfg.h\"\n #include \"eal_filesystem.h\"\n #include \"eal_hugepages.h\"\n+#include \"eal_memcfg.h\"\n #include \"eal_options.h\"\n #include \"eal_vfio.h\"\n #include \"hotplug_mp.h\"\ndiff --git a/lib/librte_eal/linux/eal/eal_memalloc.c b/lib/librte_eal/linux/eal/eal_memalloc.c\nindex 2019636fb..1f6a7c18f 100644\n--- a/lib/librte_eal/linux/eal/eal_memalloc.c\n+++ b/lib/librte_eal/linux/eal/eal_memalloc.c\n@@ -44,6 +44,7 @@\n #include \"eal_filesystem.h\"\n #include \"eal_internal_cfg.h\"\n #include \"eal_memalloc.h\"\n+#include \"eal_memcfg.h\"\n #include \"eal_private.h\"\n \n const int anonymous_hugepages_supported =\ndiff --git a/lib/librte_eal/linux/eal/eal_memory.c b/lib/librte_eal/linux/eal/eal_memory.c\nindex 1853acea5..9c948a374 100644\n--- a/lib/librte_eal/linux/eal/eal_memory.c\n+++ b/lib/librte_eal/linux/eal/eal_memory.c\n@@ -46,6 +46,7 @@\n \n #include \"eal_private.h\"\n #include \"eal_memalloc.h\"\n+#include \"eal_memcfg.h\"\n #include \"eal_internal_cfg.h\"\n #include \"eal_filesystem.h\"\n #include \"eal_hugepages.h\"\ndiff --git a/lib/librte_eal/linux/eal/eal_vfio.c b/lib/librte_eal/linux/eal/eal_vfio.c\nindex 96a03a657..fdc884f70 100644\n--- a/lib/librte_eal/linux/eal/eal_vfio.c\n+++ b/lib/librte_eal/linux/eal/eal_vfio.c\n@@ -15,6 +15,7 @@\n #include <rte_vfio.h>\n \n #include \"eal_filesystem.h\"\n+#include \"eal_memcfg.h\"\n #include \"eal_vfio.h\"\n #include \"eal_private.h\"\n \ndiff --git a/lib/librte_eal/meson.build b/lib/librte_eal/meson.build\nindex ccd5b85b8..2751023a9 100644\n--- a/lib/librte_eal/meson.build\n+++ b/lib/librte_eal/meson.build\n@@ -12,7 +12,7 @@ subdir('common') # defines common_sources, common_objs, etc.\n dpdk_conf.set('RTE_EXEC_ENV_' + exec_env.to_upper(), 1)\n subdir(exec_env + '/eal')\n \n-version = 10  # the version of the EAL API\n+version = 11  # the version of the EAL API\n allow_experimental_apis = true\n deps += 'kvargs'\n if dpdk_conf.has('RTE_USE_LIBBSD')\ndiff --git a/lib/librte_efd/rte_efd.c b/lib/librte_efd/rte_efd.c\nindex b808ce99f..d3d019578 100644\n--- a/lib/librte_efd/rte_efd.c\n+++ b/lib/librte_efd/rte_efd.c\n@@ -20,6 +20,7 @@\n #include <rte_ring.h>\n #include <rte_jhash.h>\n #include <rte_hash_crc.h>\n+#include <rte_tailq.h>\n \n #include \"rte_efd.h\"\n #if defined(RTE_ARCH_X86)\ndiff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c\nindex 47cd0da5b..74d5bbd99 100644\n--- a/lib/librte_hash/rte_cuckoo_hash.c\n+++ b/lib/librte_hash/rte_cuckoo_hash.c\n@@ -27,6 +27,7 @@\n #include <rte_ring.h>\n #include <rte_compat.h>\n #include <rte_vect.h>\n+#include <rte_tailq.h>\n \n #include \"rte_hash.h\"\n #include \"rte_cuckoo_hash.h\"\ndiff --git a/lib/librte_hash/rte_fbk_hash.c b/lib/librte_hash/rte_fbk_hash.c\nindex db118c930..576e8e666 100644\n--- a/lib/librte_hash/rte_fbk_hash.c\n+++ b/lib/librte_hash/rte_fbk_hash.c\n@@ -20,6 +20,7 @@\n #include <rte_cpuflags.h>\n #include <rte_log.h>\n #include <rte_spinlock.h>\n+#include <rte_tailq.h>\n \n #include \"rte_fbk_hash.h\"\n \ndiff --git a/lib/librte_lpm/rte_lpm.c b/lib/librte_lpm/rte_lpm.c\nindex b91f74216..70c24ac1f 100644\n--- a/lib/librte_lpm/rte_lpm.c\n+++ b/lib/librte_lpm/rte_lpm.c\n@@ -21,6 +21,7 @@\n #include <rte_errno.h>\n #include <rte_rwlock.h>\n #include <rte_spinlock.h>\n+#include <rte_tailq.h>\n \n #include \"rte_lpm.h\"\n \ndiff --git a/lib/librte_lpm/rte_lpm6.c b/lib/librte_lpm/rte_lpm6.c\nindex 5af74a539..9b8aeb972 100644\n--- a/lib/librte_lpm/rte_lpm6.c\n+++ b/lib/librte_lpm/rte_lpm6.c\n@@ -24,6 +24,7 @@\n #include <rte_hash.h>\n #include <assert.h>\n #include <rte_jhash.h>\n+#include <rte_tailq.h>\n \n #include \"rte_lpm6.h\"\n \ndiff --git a/lib/librte_member/rte_member.c b/lib/librte_member/rte_member.c\nindex efed28dd9..e0e7f127e 100644\n--- a/lib/librte_member/rte_member.c\n+++ b/lib/librte_member/rte_member.c\n@@ -10,6 +10,7 @@\n #include <rte_memory.h>\n #include <rte_malloc.h>\n #include <rte_errno.h>\n+#include <rte_tailq.h>\n \n #include \"rte_member.h\"\n #include \"rte_member_ht.h\"\ndiff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c\nindex 5c688d456..7260ce0be 100644\n--- a/lib/librte_mempool/rte_mempool.c\n+++ b/lib/librte_mempool/rte_mempool.c\n@@ -30,6 +30,7 @@\n #include <rte_errno.h>\n #include <rte_string_fns.h>\n #include <rte_spinlock.h>\n+#include <rte_tailq.h>\n \n #include \"rte_mempool.h\"\n \ndiff --git a/lib/librte_rcu/rte_rcu_qsbr.h b/lib/librte_rcu/rte_rcu_qsbr.h\nindex 53a5a7165..c80f15c00 100644\n--- a/lib/librte_rcu/rte_rcu_qsbr.h\n+++ b/lib/librte_rcu/rte_rcu_qsbr.h\n@@ -24,6 +24,7 @@\n extern \"C\" {\n #endif\n \n+#include <stdbool.h>\n #include <stdio.h>\n #include <stdint.h>\n #include <inttypes.h>\ndiff --git a/lib/librte_reorder/rte_reorder.c b/lib/librte_reorder/rte_reorder.c\nindex ae6e3f578..3c9f0e2d0 100644\n--- a/lib/librte_reorder/rte_reorder.c\n+++ b/lib/librte_reorder/rte_reorder.c\n@@ -11,6 +11,7 @@\n #include <rte_eal_memconfig.h>\n #include <rte_errno.h>\n #include <rte_malloc.h>\n+#include <rte_tailq.h>\n \n #include \"rte_reorder.h\"\n \ndiff --git a/lib/librte_ring/rte_ring.c b/lib/librte_ring/rte_ring.c\nindex 9ea26a631..b30b2aa7b 100644\n--- a/lib/librte_ring/rte_ring.c\n+++ b/lib/librte_ring/rte_ring.c\n@@ -30,6 +30,7 @@\n #include <rte_errno.h>\n #include <rte_string_fns.h>\n #include <rte_spinlock.h>\n+#include <rte_tailq.h>\n \n #include \"rte_ring.h\"\n \n",
    "prefixes": [
        "v5",
        "4/9"
    ]
}