get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 96874,
    "url": "http://patches.dpdk.org/api/patches/96874/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210812200528.60743-1-u9012063@gmail.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<20210812200528.60743-1-u9012063@gmail.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210812200528.60743-1-u9012063@gmail.com",
    "date": "2021-08-12T20:05:28",
    "name": "[PATCHv3] include: fix sys/queue.h.",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "1ef9b6d4213c87ea9cd30cbdd65dd973e27d03e0",
    "submitter": {
        "id": 1106,
        "url": "http://patches.dpdk.org/api/people/1106/?format=api",
        "name": "William Tu",
        "email": "u9012063@gmail.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20210812200528.60743-1-u9012063@gmail.com/mbox/",
    "series": [
        {
            "id": 18269,
            "url": "http://patches.dpdk.org/api/series/18269/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=18269",
            "date": "2021-08-12T20:05:28",
            "name": "[PATCHv3] include: fix sys/queue.h.",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/18269/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/96874/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/96874/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 5F8A6A0C5C;\n\tThu, 12 Aug 2021 22:05:45 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id DFC684014D;\n\tThu, 12 Aug 2021 22:05:44 +0200 (CEST)",
            "from mail-pl1-f172.google.com (mail-pl1-f172.google.com\n [209.85.214.172])\n by mails.dpdk.org (Postfix) with ESMTP id 8042D40042\n for <dev@dpdk.org>; Thu, 12 Aug 2021 22:05:43 +0200 (CEST)",
            "by mail-pl1-f172.google.com with SMTP id f3so8755321plg.3\n for <dev@dpdk.org>; Thu, 12 Aug 2021 13:05:43 -0700 (PDT)",
            "from localhost.localdomain (c-67-185-44-206.hsd1.wa.comcast.net.\n [67.185.44.206])\n by smtp.gmail.com with ESMTPSA id y62sm4335746pfg.88.2021.08.12.13.05.40\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 12 Aug 2021 13:05:41 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n h=from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding;\n bh=u7RMshKb8Dd4sWpWNRjo8P8n5nCOXPA9ngSNEIqSTaQ=;\n b=VA5hiXqwrM1o7tg9VtAdBv1PMgHbpTNJ7jNx3Ao/e7TY5WC+5KehPEm4gH+XVCLZb8\n fZ+aZ5imn+SoGtbx9P012lSfSQKiY3j8HC3qqGK07qVstVa2Yyk68eSpJRzjqKXI7ijj\n y9RtyxjzpC0a8phxX9bsm0KgrsSfJ4qesd/XNFCDpmlxus3CUU1R3BkWLSV7ZdM3qtMV\n 2aIApkRnO6MA1aI+0hYwsDeNL9IP9Cj4OiBeyBvyNTgFDLqdZ0n505OgS+/iND9cb3wv\n WLJkXe2QrMGRxY8pqYE+Jfd15bbbNgUVKekyOAvLG4La7XAbNhwFjytECXIHPRvb8NzV\n rcQQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references:mime-version:content-transfer-encoding;\n bh=u7RMshKb8Dd4sWpWNRjo8P8n5nCOXPA9ngSNEIqSTaQ=;\n b=ZlPFy4e9D/RVYfzB0wltja6mMVRTZaK8nZCi/FstNTEUAyV7gEh42VZuAbBmMEJs3+\n KNabPa4M6YU6Sb/R8qL6oTPlW/R+z9agEwLKkibdiZgBdt0p1k7mdQc69BJt087hpeuE\n K29mdm6Dm2poFod5qQANgBGDwJa2gGTW5Tf1GKl2BpuswUkmLOw6ndTV82J0GXVv1Iam\n +Rd+XMCr2p++i7R9g1qQNmBjloTPWoNHDBWbYQwLO+VBvbjSBhuWeF7WDhz+X1uZa0a4\n XmVkRXqiR8rTTHi6TVZLfcWyWr33fwzIH7bU0gdkwxUeX74VtF7E2UY2cxDsHPgu3Q2j\n Elsw==",
        "X-Gm-Message-State": "AOAM533tmwZM1MwnQpLcCdD0/cw1S24DPXYimrP8HvlmQUIU83VtJYaD\n Gd3BSti1ljI1XOMJXj7ZU7FeG6f31Kdh/w==",
        "X-Google-Smtp-Source": "\n ABdhPJxae2vpS7qFM+d7VUXKzJuKngzHBVnaCnbHKTnKX7cK0fMC6tnlgqLdZrwb/EJ5l7//aBxHmw==",
        "X-Received": "by 2002:a17:90a:d595:: with SMTP id\n v21mr6083454pju.50.1628798742030;\n Thu, 12 Aug 2021 13:05:42 -0700 (PDT)",
        "From": "William Tu <u9012063@gmail.com>",
        "To": "dev@dpdk.org",
        "Cc": "Dmitry.Kozliuk@gmail.com,\n\tnick.connolly@mayadata.io",
        "Date": "Thu, 12 Aug 2021 20:05:28 +0000",
        "Message-Id": "<20210812200528.60743-1-u9012063@gmail.com>",
        "X-Mailer": "git-send-email 2.30.2",
        "In-Reply-To": "<20210811204627.213-1-u9012063@gmail.com>",
        "References": "<20210811204627.213-1-u9012063@gmail.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCHv3] include: fix sys/queue.h.",
        "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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Currently there are a couple of public header files include\n'sys/queue.h', which is a POSIX functionality.  When compiling DPDK\nwith OVS on Windows, we encountered issues such as, found the missing\nheader. In file included from ../lib/dpdk.c:27:\nC:\\temp\\dpdk\\include\\rte_log.h:24:10: fatal error: 'sys/queue.h' file\nnot found\n\nThe patch fixes it by removing the #include <sys/queue.h> from\nDPDK public headers, so programs including DPDK headers don't depend\non POSIX sys/queue.h. For Linux/FreeBSD, DPDK public headers only need a\nhandful of macros for list/tailq heads and links. Those macros should be\nprovided by DPDK, with RTE_ prefix. For Linux and FreeBSD it will just be:\n    #include <sys/queue.h>\n    #define RTE_TAILQ_ENTRY(type) TAILQ_ENTRY(type)\n    /* ... */\nFor Windows, we copy these definitions from <sys/queue.h> to rte_os.h.\nWith this patch, all the public headers should not have\n\"#include <sys/queue.h>\" or \"TAILQ_xxx\" macros.\n\nSuggested-by: Nick Connolly <nick.connolly@mayadata.io>\nSuggested-by: Dmitry Kozliuk <Dmitry.Kozliuk@gmail.com>\nSigned-off-by: William Tu <u9012063@gmail.com>\n---\nv2->v3:\n  * follow the suggestion by Dmitry\n  * run checkpatches, there are some errors but I think either\n    the original file has over 80-char line due to comments,\n    or some false positive about macro.\nv1->v2:\n  - follow the suggestion by Nick and Dmitry\n  - http://mails.dpdk.org/archives/dev/2021-August/216304.html\n\nSigned-off-by: William Tu <u9012063@gmail.com>\n---\n drivers/bus/auxiliary/private.h           |   1 +\n drivers/bus/auxiliary/rte_bus_auxiliary.h |   5 +-\n drivers/bus/ifpga/rte_bus_ifpga.h         |   8 +-\n drivers/bus/pci/pci_params.c              |   2 +\n drivers/bus/pci/rte_bus_pci.h             |  13 +-\n drivers/bus/pci/windows/pci.c             |   3 +\n drivers/bus/pci/windows/pci_netuio.c      |   2 +\n drivers/bus/vdev/rte_bus_vdev.h           |   7 +-\n drivers/bus/vmbus/rte_bus_vmbus.h         |  13 +-\n drivers/net/i40e/i40e_ethdev.h            |   1 +\n drivers/net/ice/ice_dcf_ethdev.c          |   1 +\n lib/bbdev/rte_bbdev.h                     |   2 +-\n lib/cryptodev/rte_cryptodev.h             |   2 +-\n lib/cryptodev/rte_cryptodev_pmd.h         |   2 +-\n lib/eal/common/eal_common_devargs.c       |   2 +\n lib/eal/common/eal_common_fbarray.c       |   1 +\n lib/eal/common/eal_common_log.c           |   1 +\n lib/eal/common/eal_common_memalloc.c      |   1 +\n lib/eal/common/eal_common_options.c       |   1 +\n lib/eal/common/eal_trace.h                |   2 +\n lib/eal/freebsd/include/rte_os.h          |  33 ++++++\n lib/eal/include/rte_bus.h                 |   5 +-\n lib/eal/include/rte_class.h               |   6 +-\n lib/eal/include/rte_dev.h                 |   5 +-\n lib/eal/include/rte_devargs.h             |   3 +-\n lib/eal/include/rte_log.h                 |   1 -\n lib/eal/include/rte_service.h             |   1 -\n lib/eal/include/rte_tailq.h               |  15 ++-\n lib/eal/linux/include/rte_os.h            |  33 ++++++\n lib/eal/windows/eal_alarm.c               |   1 +\n lib/eal/windows/include/rte_os.h          | 138 ++++++++++++++++++++++\n lib/ethdev/rte_ethdev_core.h              |   2 +-\n lib/hash/rte_fbk_hash.h                   |   1 -\n lib/hash/rte_thash.c                      |   2 +\n lib/ip_frag/rte_ip_frag.h                 |   4 +-\n lib/mempool/rte_mempool.h                 |   9 +-\n lib/pci/rte_pci.h                         |   1 -\n lib/ring/rte_ring_core.h                  |   1 -\n lib/table/rte_swx_table.h                 |   7 +-\n lib/table/rte_swx_table_selector.h        |   5 +-\n lib/vhost/rte_vdpa_dev.h                  |   2 +-\n 41 files changed, 277 insertions(+), 68 deletions(-)",
    "diff": "diff --git a/drivers/bus/auxiliary/private.h b/drivers/bus/auxiliary/private.h\nindex 9987e8b501..d22e83cf7a 100644\n--- a/drivers/bus/auxiliary/private.h\n+++ b/drivers/bus/auxiliary/private.h\n@@ -7,6 +7,7 @@\n \n #include <stdbool.h>\n #include <stdio.h>\n+#include <sys/queue.h>\n \n #include \"rte_bus_auxiliary.h\"\n \ndiff --git a/drivers/bus/auxiliary/rte_bus_auxiliary.h b/drivers/bus/auxiliary/rte_bus_auxiliary.h\nindex 2462bad2ba..b1f5610404 100644\n--- a/drivers/bus/auxiliary/rte_bus_auxiliary.h\n+++ b/drivers/bus/auxiliary/rte_bus_auxiliary.h\n@@ -19,7 +19,6 @@ extern \"C\" {\n #include <stdlib.h>\n #include <limits.h>\n #include <errno.h>\n-#include <sys/queue.h>\n #include <stdint.h>\n #include <inttypes.h>\n \n@@ -113,7 +112,7 @@ typedef int (rte_auxiliary_dma_unmap_t)(struct rte_auxiliary_device *dev,\n  * A structure describing an auxiliary device.\n  */\n struct rte_auxiliary_device {\n-\tTAILQ_ENTRY(rte_auxiliary_device) next;   /**< Next probed device. */\n+\tRTE_TAILQ_ENTRY(rte_auxiliary_device) next; /**< Next probed device. */\n \tstruct rte_device device;                 /**< Inherit core device */\n \tchar name[RTE_DEV_NAME_MAX_LEN + 1];      /**< ASCII device name */\n \tstruct rte_intr_handle intr_handle;       /**< Interrupt handle */\n@@ -124,7 +123,7 @@ struct rte_auxiliary_device {\n  * A structure describing an auxiliary driver.\n  */\n struct rte_auxiliary_driver {\n-\tTAILQ_ENTRY(rte_auxiliary_driver) next; /**< Next in list. */\n+\tRTE_TAILQ_ENTRY(rte_auxiliary_driver) next; /**< Next in list. */\n \tstruct rte_driver driver;             /**< Inherit core driver. */\n \tstruct rte_auxiliary_bus *bus;        /**< Auxiliary bus reference. */\n \trte_auxiliary_match_t *match;         /**< Device match function. */\ndiff --git a/drivers/bus/ifpga/rte_bus_ifpga.h b/drivers/bus/ifpga/rte_bus_ifpga.h\nindex b43084155a..0186f5acde 100644\n--- a/drivers/bus/ifpga/rte_bus_ifpga.h\n+++ b/drivers/bus/ifpga/rte_bus_ifpga.h\n@@ -28,9 +28,9 @@ struct rte_afu_device;\n struct rte_afu_driver;\n \n /** Double linked list of Intel FPGA AFU device. */\n-TAILQ_HEAD(ifpga_afu_dev_list, rte_afu_device);\n+RTE_TAILQ_HEAD(ifpga_afu_dev_list, rte_afu_device);\n /** Double linked list of Intel FPGA AFU device drivers. */\n-TAILQ_HEAD(ifpga_afu_drv_list, rte_afu_driver);\n+RTE_TAILQ_HEAD(ifpga_afu_drv_list, rte_afu_driver);\n \n #define IFPGA_BUS_BITSTREAM_PATH_MAX_LEN 256\n \n@@ -71,7 +71,7 @@ struct rte_afu_shared {\n  * A structure describing a AFU device.\n  */\n struct rte_afu_device {\n-\tTAILQ_ENTRY(rte_afu_device) next;       /**< Next in device list. */\n+\tRTE_TAILQ_ENTRY(rte_afu_device) next;       /**< Next in device list. */\n \tstruct rte_device device;               /**< Inherit core device */\n \tstruct rte_rawdev *rawdev;    /**< Point Rawdev */\n \tstruct rte_afu_id id;                   /**< AFU id within FPGA. */\n@@ -105,7 +105,7 @@ typedef int (afu_remove_t)(struct rte_afu_device *);\n  * A structure describing a AFU device.\n  */\n struct rte_afu_driver {\n-\tTAILQ_ENTRY(rte_afu_driver) next;       /**< Next afu driver. */\n+\tRTE_TAILQ_ENTRY(rte_afu_driver) next;       /**< Next afu driver. */\n \tstruct rte_driver driver;               /**< Inherit core driver. */\n \tafu_probe_t *probe;                     /**< Device Probe function. */\n \tafu_remove_t *remove;                   /**< Device Remove function. */\ndiff --git a/drivers/bus/pci/pci_params.c b/drivers/bus/pci/pci_params.c\nindex 3192e9c967..717388753d 100644\n--- a/drivers/bus/pci/pci_params.c\n+++ b/drivers/bus/pci/pci_params.c\n@@ -2,6 +2,8 @@\n  * Copyright 2018 Gaëtan Rivet\n  */\n \n+#include <sys/queue.h>\n+\n #include <rte_bus.h>\n #include <rte_bus_pci.h>\n #include <rte_dev.h>\ndiff --git a/drivers/bus/pci/rte_bus_pci.h b/drivers/bus/pci/rte_bus_pci.h\nindex 583470e831..673a2850c1 100644\n--- a/drivers/bus/pci/rte_bus_pci.h\n+++ b/drivers/bus/pci/rte_bus_pci.h\n@@ -19,7 +19,6 @@ extern \"C\" {\n #include <stdlib.h>\n #include <limits.h>\n #include <errno.h>\n-#include <sys/queue.h>\n #include <stdint.h>\n #include <inttypes.h>\n \n@@ -37,16 +36,16 @@ struct rte_pci_device;\n struct rte_pci_driver;\n \n /** List of PCI devices */\n-TAILQ_HEAD(rte_pci_device_list, rte_pci_device);\n+RTE_TAILQ_HEAD(rte_pci_device_list, rte_pci_device);\n /** List of PCI drivers */\n-TAILQ_HEAD(rte_pci_driver_list, rte_pci_driver);\n+RTE_TAILQ_HEAD(rte_pci_driver_list, rte_pci_driver);\n \n /* PCI Bus iterators */\n #define FOREACH_DEVICE_ON_PCIBUS(p)\t\\\n-\t\tTAILQ_FOREACH(p, &(rte_pci_bus.device_list), next)\n+\t\tRTE_TAILQ_FOREACH(p, &(rte_pci_bus.device_list), next)\n \n #define FOREACH_DRIVER_ON_PCIBUS(p)\t\\\n-\t\tTAILQ_FOREACH(p, &(rte_pci_bus.driver_list), next)\n+\t\tRTE_TAILQ_FOREACH(p, &(rte_pci_bus.driver_list), next)\n \n struct rte_devargs;\n \n@@ -64,7 +63,7 @@ enum rte_pci_kernel_driver {\n  * A structure describing a PCI device.\n  */\n struct rte_pci_device {\n-\tTAILQ_ENTRY(rte_pci_device) next;   /**< Next probed PCI device. */\n+\tRTE_TAILQ_ENTRY(rte_pci_device) next;   /**< Next probed PCI device. */\n \tstruct rte_device device;           /**< Inherit core device */\n \tstruct rte_pci_addr addr;           /**< PCI location. */\n \tstruct rte_pci_id id;               /**< PCI ID. */\n@@ -160,7 +159,7 @@ typedef int (pci_dma_unmap_t)(struct rte_pci_device *dev, void *addr,\n  * A structure describing a PCI driver.\n  */\n struct rte_pci_driver {\n-\tTAILQ_ENTRY(rte_pci_driver) next;  /**< Next in list. */\n+\tRTE_TAILQ_ENTRY(rte_pci_driver) next;  /**< Next in list. */\n \tstruct rte_driver driver;          /**< Inherit core driver. */\n \tstruct rte_pci_bus *bus;           /**< PCI bus reference. */\n \trte_pci_probe_t *probe;            /**< Device probe function. */\ndiff --git a/drivers/bus/pci/windows/pci.c b/drivers/bus/pci/windows/pci.c\nindex d39a7748b8..d7bd5d6e80 100644\n--- a/drivers/bus/pci/windows/pci.c\n+++ b/drivers/bus/pci/windows/pci.c\n@@ -1,6 +1,9 @@\n /* SPDX-License-Identifier: BSD-3-Clause\n  * Copyright 2020 Mellanox Technologies, Ltd\n  */\n+\n+#include <sys/queue.h>\n+\n #include <rte_windows.h>\n #include <rte_errno.h>\n #include <rte_log.h>\ndiff --git a/drivers/bus/pci/windows/pci_netuio.c b/drivers/bus/pci/windows/pci_netuio.c\nindex 1bf9133f71..a0b175a8fc 100644\n--- a/drivers/bus/pci/windows/pci_netuio.c\n+++ b/drivers/bus/pci/windows/pci_netuio.c\n@@ -2,6 +2,8 @@\n  * Copyright(c) 2020 Intel Corporation.\n  */\n \n+#include <sys/queue.h>\n+\n #include <rte_windows.h>\n #include <rte_errno.h>\n #include <rte_log.h>\ndiff --git a/drivers/bus/vdev/rte_bus_vdev.h b/drivers/bus/vdev/rte_bus_vdev.h\nindex fc315d10fa..2856799953 100644\n--- a/drivers/bus/vdev/rte_bus_vdev.h\n+++ b/drivers/bus/vdev/rte_bus_vdev.h\n@@ -15,12 +15,11 @@\n extern \"C\" {\n #endif\n \n-#include <sys/queue.h>\n #include <rte_dev.h>\n #include <rte_devargs.h>\n \n struct rte_vdev_device {\n-\tTAILQ_ENTRY(rte_vdev_device) next;      /**< Next attached vdev */\n+\tRTE_TAILQ_ENTRY(rte_vdev_device) next;      /**< Next attached vdev */\n \tstruct rte_device device;               /**< Inherit core device */\n };\n \n@@ -53,7 +52,7 @@ rte_vdev_device_args(const struct rte_vdev_device *dev)\n }\n \n /** Double linked list of virtual device drivers. */\n-TAILQ_HEAD(vdev_driver_list, rte_vdev_driver);\n+RTE_TAILQ_HEAD(vdev_driver_list, rte_vdev_driver);\n \n /**\n  * Probe function called for each virtual device driver once.\n@@ -107,7 +106,7 @@ typedef int (rte_vdev_dma_unmap_t)(struct rte_vdev_device *dev, void *addr,\n  * A virtual device driver abstraction.\n  */\n struct rte_vdev_driver {\n-\tTAILQ_ENTRY(rte_vdev_driver) next; /**< Next in list. */\n+\tRTE_TAILQ_ENTRY(rte_vdev_driver) next; /**< Next in list. */\n \tstruct rte_driver driver;        /**< Inherited general driver. */\n \trte_vdev_probe_t *probe;         /**< Virtual device probe function. */\n \trte_vdev_remove_t *remove;       /**< Virtual device remove function. */\ndiff --git a/drivers/bus/vmbus/rte_bus_vmbus.h b/drivers/bus/vmbus/rte_bus_vmbus.h\nindex 4cf73ce815..6bcff66468 100644\n--- a/drivers/bus/vmbus/rte_bus_vmbus.h\n+++ b/drivers/bus/vmbus/rte_bus_vmbus.h\n@@ -20,7 +20,6 @@ extern \"C\" {\n #include <limits.h>\n #include <stdbool.h>\n #include <errno.h>\n-#include <sys/queue.h>\n #include <stdint.h>\n #include <inttypes.h>\n \n@@ -38,15 +37,15 @@ struct rte_vmbus_bus;\n struct vmbus_channel;\n struct vmbus_mon_page;\n \n-TAILQ_HEAD(rte_vmbus_device_list, rte_vmbus_device);\n-TAILQ_HEAD(rte_vmbus_driver_list, rte_vmbus_driver);\n+RTE_TAILQ_HEAD(rte_vmbus_device_list, rte_vmbus_device);\n+RTE_TAILQ_HEAD(rte_vmbus_driver_list, rte_vmbus_driver);\n \n /* VMBus iterators */\n #define FOREACH_DEVICE_ON_VMBUS(p)\t\\\n-\tTAILQ_FOREACH(p, &(rte_vmbus_bus.device_list), next)\n+\tRTE_TAILQ_FOREACH(p, &(rte_vmbus_bus.device_list), next)\n \n #define FOREACH_DRIVER_ON_VMBUS(p)\t\\\n-\tTAILQ_FOREACH(p, &(rte_vmbus_bus.driver_list), next)\n+\tRTE_TAILQ_FOREACH(p, &(rte_vmbus_bus.driver_list), next)\n \n /** Maximum number of VMBUS resources. */\n enum hv_uio_map {\n@@ -62,7 +61,7 @@ enum hv_uio_map {\n  * A structure describing a VMBUS device.\n  */\n struct rte_vmbus_device {\n-\tTAILQ_ENTRY(rte_vmbus_device) next;    /**< Next probed VMBUS device */\n+\tRTE_TAILQ_ENTRY(rte_vmbus_device) next; /**< Next probed VMBUS device */\n \tconst struct rte_vmbus_driver *driver; /**< Associated driver */\n \tstruct rte_device device;              /**< Inherit core device */\n \trte_uuid_t device_id;\t\t       /**< VMBUS device id */\n@@ -93,7 +92,7 @@ typedef int (vmbus_remove_t)(struct rte_vmbus_device *);\n  * A structure describing a VMBUS driver.\n  */\n struct rte_vmbus_driver {\n-\tTAILQ_ENTRY(rte_vmbus_driver) next; /**< Next in list. */\n+\tRTE_TAILQ_ENTRY(rte_vmbus_driver) next; /**< Next in list. */\n \tstruct rte_driver driver;\n \tstruct rte_vmbus_bus *bus;          /**< VM bus reference. */\n \tvmbus_probe_t *probe;               /**< Device Probe function. */\ndiff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h\nindex cd6deabd60..374b73e4a7 100644\n--- a/drivers/net/i40e/i40e_ethdev.h\n+++ b/drivers/net/i40e/i40e_ethdev.h\n@@ -6,6 +6,7 @@\n #define _I40E_ETHDEV_H_\n \n #include <stdint.h>\n+#include <sys/queue.h>\n \n #include <rte_time.h>\n #include <rte_kvargs.h>\ndiff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c\nindex cab7c4da87..629e88980d 100644\n--- a/drivers/net/ice/ice_dcf_ethdev.c\n+++ b/drivers/net/ice/ice_dcf_ethdev.c\n@@ -4,6 +4,7 @@\n \n #include <errno.h>\n #include <stdbool.h>\n+#include <sys/queue.h>\n #include <sys/types.h>\n #include <unistd.h>\n \ndiff --git a/lib/bbdev/rte_bbdev.h b/lib/bbdev/rte_bbdev.h\nindex 7017124414..3ebf62e697 100644\n--- a/lib/bbdev/rte_bbdev.h\n+++ b/lib/bbdev/rte_bbdev.h\n@@ -434,7 +434,7 @@ struct rte_bbdev_callback;\n struct rte_intr_handle;\n \n /** Structure to keep track of registered callbacks */\n-TAILQ_HEAD(rte_bbdev_cb_list, rte_bbdev_callback);\n+RTE_TAILQ_HEAD(rte_bbdev_cb_list, rte_bbdev_callback);\n \n /**\n  * @internal The data structure associated with a device. Drivers can access\ndiff --git a/lib/cryptodev/rte_cryptodev.h b/lib/cryptodev/rte_cryptodev.h\nindex 11f4e6fdbf..f86bf2260b 100644\n--- a/lib/cryptodev/rte_cryptodev.h\n+++ b/lib/cryptodev/rte_cryptodev.h\n@@ -879,7 +879,7 @@ typedef uint16_t (*enqueue_pkt_burst_t)(void *qp,\n struct rte_cryptodev_callback;\n \n /** Structure to keep track of registered callbacks */\n-TAILQ_HEAD(rte_cryptodev_cb_list, rte_cryptodev_callback);\n+RTE_TAILQ_HEAD(rte_cryptodev_cb_list, rte_cryptodev_callback);\n \n /**\n  * Structure used to hold information about the callbacks to be called for a\ndiff --git a/lib/cryptodev/rte_cryptodev_pmd.h b/lib/cryptodev/rte_cryptodev_pmd.h\nindex 1274436870..9542cbf263 100644\n--- a/lib/cryptodev/rte_cryptodev_pmd.h\n+++ b/lib/cryptodev/rte_cryptodev_pmd.h\n@@ -66,7 +66,7 @@ struct rte_cryptodev_global {\n \n /* Cryptodev driver, containing the driver ID */\n struct cryptodev_driver {\n-\tTAILQ_ENTRY(cryptodev_driver) next; /**< Next in list. */\n+\tRTE_TAILQ_ENTRY(cryptodev_driver) next; /**< Next in list. */\n \tconst struct rte_driver *driver;\n \tuint8_t id;\n };\ndiff --git a/lib/eal/common/eal_common_devargs.c b/lib/eal/common/eal_common_devargs.c\nindex 23aaf8b7e4..ac9746aec8 100644\n--- a/lib/eal/common/eal_common_devargs.c\n+++ b/lib/eal/common/eal_common_devargs.c\n@@ -9,6 +9,7 @@\n #include <stdio.h>\n #include <string.h>\n #include <stdarg.h>\n+#include <sys/queue.h>\n \n #include <rte_bus.h>\n #include <rte_class.h>\n@@ -18,6 +19,7 @@\n #include <rte_errno.h>\n #include <rte_kvargs.h>\n #include <rte_log.h>\n+#include <rte_os.h>\n #include <rte_tailq.h>\n #include \"eal_private.h\"\n \ndiff --git a/lib/eal/common/eal_common_fbarray.c b/lib/eal/common/eal_common_fbarray.c\nindex 3a28a53247..75168ca552 100644\n--- a/lib/eal/common/eal_common_fbarray.c\n+++ b/lib/eal/common/eal_common_fbarray.c\n@@ -9,6 +9,7 @@\n #include <errno.h>\n #include <string.h>\n #include <unistd.h>\n+#include <sys/queue.h>\n \n #include <rte_common.h>\n #include <rte_eal_paging.h>\ndiff --git a/lib/eal/common/eal_common_log.c b/lib/eal/common/eal_common_log.c\nindex ec8fe23a7f..1be35f5397 100644\n--- a/lib/eal/common/eal_common_log.c\n+++ b/lib/eal/common/eal_common_log.c\n@@ -10,6 +10,7 @@\n #include <errno.h>\n #include <regex.h>\n #include <fnmatch.h>\n+#include <sys/queue.h>\n \n #include <rte_eal.h>\n #include <rte_log.h>\ndiff --git a/lib/eal/common/eal_common_memalloc.c b/lib/eal/common/eal_common_memalloc.c\nindex e872c6533b..aefdf8de3f 100644\n--- a/lib/eal/common/eal_common_memalloc.c\n+++ b/lib/eal/common/eal_common_memalloc.c\n@@ -3,6 +3,7 @@\n  */\n \n #include <string.h>\n+#include <sys/queue.h>\n \n #include <rte_errno.h>\n #include <rte_lcore.h>\ndiff --git a/lib/eal/common/eal_common_options.c b/lib/eal/common/eal_common_options.c\nindex ff5861b5f3..92987088a1 100644\n--- a/lib/eal/common/eal_common_options.c\n+++ b/lib/eal/common/eal_common_options.c\n@@ -6,6 +6,7 @@\n #include <stdlib.h>\n #include <unistd.h>\n #include <string.h>\n+#include <sys/queue.h>\n #ifndef RTE_EXEC_ENV_WINDOWS\n #include <syslog.h>\n #endif\ndiff --git a/lib/eal/common/eal_trace.h b/lib/eal/common/eal_trace.h\nindex 06751eb23a..76fbcd86b0 100644\n--- a/lib/eal/common/eal_trace.h\n+++ b/lib/eal/common/eal_trace.h\n@@ -5,6 +5,8 @@\n #ifndef __EAL_TRACE_H\n #define __EAL_TRACE_H\n \n+#include <sys/queue.h>\n+\n #include <rte_cycles.h>\n #include <rte_log.h>\n #include <rte_malloc.h>\ndiff --git a/lib/eal/freebsd/include/rte_os.h b/lib/eal/freebsd/include/rte_os.h\nindex 627f0483ab..dc889e5826 100644\n--- a/lib/eal/freebsd/include/rte_os.h\n+++ b/lib/eal/freebsd/include/rte_os.h\n@@ -11,6 +11,39 @@\n  */\n \n #include <pthread_np.h>\n+#include <sys/queue.h>\n+\n+/* These macros are compatible with system's sys/queue.h. */\n+#define RTE_TAILQ_INIT(head) TAILQ_INIT(head)\n+#define RTE_TAILQ_HEAD(name, type) TAILQ_HEAD(name, type)\n+#define RTE_TAILQ_LAST(head, headname) TAILQ_LAST(head, headname)\n+#define RTE_TAILQ_ENTRY(type) TAILQ_ENTRY(type)\n+#define RTE_TAILQ_FIRST(head) TAILQ_FIRST(head)\n+#define RTE_TAILQ_EMPTY(head) TAILQ_EMPTY(head)\n+#define RTE_TAILQ_NEXT(elem, field) TAILQ_NEXT(elem, field)\n+#define RTE_TAILQ_HEAD_INITIALIZER(head) TAILQ_HEAD_INITIALIZER(head)\n+#define RTE_TAILQ_FOREACH(var, head, field) TAILQ_FOREACH(var, head, field)\n+#define RTE_TAILQ_INSERT_TAIL(head, elm, field) \\\n+\tTAILQ_INSERT_TAIL(head, elm, field)\n+#define RTE_TAILQ_REMOVE(head, elm, field) TAILQ_REMOVE(head, elm, field)\n+#define RTE_TAILQ_INSERT_BEFORE(listelm, elm, field) \\\n+\tTAILQ_INSERT_BEFORE(listelm, elm, field)\n+#define RTE_TAILQ_INSERT_AFTER(head, listelm, elm, field) \\\n+\tTAILQ_INSERT_AFTER(head, listelm, elm, field)\n+#define RTE_TAILQ_INSERT_HEAD(head, elm, field) \\\n+\tTAILQ_INSERT_HEAD(head, elm, field)\n+\n+#define RTE_STAILQ_HEAD(name, type) STAILQ_HEAD(name, type)\n+#define RTE_STAILQ_HEAD_INITIALIZER(head) STAILQ_HEAD_INITIALIZER(head)\n+#define RTE_STAILQ_ENTRY(type) STAILQ_ENTRY(type)\n+\n+/* This is not defined in sys/queue.h */\n+#ifndef TAILQ_FOREACH_SAFE\n+#define TAILQ_FOREACH_SAFE(var, head, field, tvar)\t\t\\\n+\tfor ((var) = RTE_TAILQ_FIRST((head));\t\t\t\\\n+\t    (var) && ((tvar) = RTE_TAILQ_NEXT((var), field), 1);\t\\\n+\t    (var) = (tvar))\n+#endif\n \n typedef cpuset_t rte_cpuset_t;\n #define RTE_HAS_CPUSET\ndiff --git a/lib/eal/include/rte_bus.h b/lib/eal/include/rte_bus.h\nindex 80b154fb98..84d364df3f 100644\n--- a/lib/eal/include/rte_bus.h\n+++ b/lib/eal/include/rte_bus.h\n@@ -19,13 +19,12 @@ extern \"C\" {\n #endif\n \n #include <stdio.h>\n-#include <sys/queue.h>\n \n #include <rte_log.h>\n #include <rte_dev.h>\n \n /** Double linked list of buses */\n-TAILQ_HEAD(rte_bus_list, rte_bus);\n+RTE_TAILQ_HEAD(rte_bus_list, rte_bus);\n \n \n /**\n@@ -250,7 +249,7 @@ typedef enum rte_iova_mode (*rte_bus_get_iommu_class_t)(void);\n  * A structure describing a generic bus.\n  */\n struct rte_bus {\n-\tTAILQ_ENTRY(rte_bus) next;   /**< Next bus object in linked list */\n+\tRTE_TAILQ_ENTRY(rte_bus) next;   /**< Next bus object in linked list */\n \tconst char *name;            /**< Name of the bus */\n \trte_bus_scan_t scan;         /**< Scan for devices attached to bus */\n \trte_bus_probe_t probe;       /**< Probe devices on bus */\ndiff --git a/lib/eal/include/rte_class.h b/lib/eal/include/rte_class.h\nindex 856d09b22d..d560339652 100644\n--- a/lib/eal/include/rte_class.h\n+++ b/lib/eal/include/rte_class.h\n@@ -22,18 +22,16 @@\n extern \"C\" {\n #endif\n \n-#include <sys/queue.h>\n-\n #include <rte_dev.h>\n \n /** Double linked list of classes */\n-TAILQ_HEAD(rte_class_list, rte_class);\n+RTE_TAILQ_HEAD(rte_class_list, rte_class);\n \n /**\n  * A structure describing a generic device class.\n  */\n struct rte_class {\n-\tTAILQ_ENTRY(rte_class) next; /**< Next device class in linked list */\n+\tRTE_TAILQ_ENTRY(rte_class) next; /**< Next device class in linked list */\n \tconst char *name; /**< Name of the class */\n \trte_dev_iterate_t dev_iterate; /**< Device iterator. */\n };\ndiff --git a/lib/eal/include/rte_dev.h b/lib/eal/include/rte_dev.h\nindex 6dd72c11a1..f6efe0c94e 100644\n--- a/lib/eal/include/rte_dev.h\n+++ b/lib/eal/include/rte_dev.h\n@@ -18,7 +18,6 @@ extern \"C\" {\n #endif\n \n #include <stdio.h>\n-#include <sys/queue.h>\n \n #include <rte_config.h>\n #include <rte_compat.h>\n@@ -75,7 +74,7 @@ struct rte_mem_resource {\n  * A structure describing a device driver.\n  */\n struct rte_driver {\n-\tTAILQ_ENTRY(rte_driver) next;  /**< Next in list. */\n+\tRTE_TAILQ_ENTRY(rte_driver) next;  /**< Next in list. */\n \tconst char *name;                   /**< Driver name. */\n \tconst char *alias;              /**< Driver alias. */\n };\n@@ -90,7 +89,7 @@ struct rte_driver {\n  * A structure describing a generic device.\n  */\n struct rte_device {\n-\tTAILQ_ENTRY(rte_device) next; /**< Next device */\n+\tRTE_TAILQ_ENTRY(rte_device) next; /**< Next device */\n \tconst char *name;             /**< Device name */\n \tconst struct rte_driver *driver; /**< Driver assigned after probing */\n \tconst struct rte_bus *bus;    /**< Bus handle assigned on scan */\ndiff --git a/lib/eal/include/rte_devargs.h b/lib/eal/include/rte_devargs.h\nindex cd90944fe8..957477b398 100644\n--- a/lib/eal/include/rte_devargs.h\n+++ b/lib/eal/include/rte_devargs.h\n@@ -21,7 +21,6 @@ extern \"C\" {\n #endif\n \n #include <stdio.h>\n-#include <sys/queue.h>\n #include <rte_compat.h>\n #include <rte_bus.h>\n \n@@ -76,7 +75,7 @@ enum rte_devtype {\n  */\n struct rte_devargs {\n \t/** Next in list. */\n-\tTAILQ_ENTRY(rte_devargs) next;\n+\tRTE_TAILQ_ENTRY(rte_devargs) next;\n \t/** Type of device. */\n \tenum rte_devtype type;\n \t/** Device policy. */\ndiff --git a/lib/eal/include/rte_log.h b/lib/eal/include/rte_log.h\nindex b706bb8710..bb3523467b 100644\n--- a/lib/eal/include/rte_log.h\n+++ b/lib/eal/include/rte_log.h\n@@ -21,7 +21,6 @@ extern \"C\" {\n #include <stdio.h>\n #include <stdarg.h>\n #include <stdbool.h>\n-#include <sys/queue.h>\n \n #include <rte_common.h>\n #include <rte_config.h>\ndiff --git a/lib/eal/include/rte_service.h b/lib/eal/include/rte_service.h\nindex c7d037d862..1c9275c32a 100644\n--- a/lib/eal/include/rte_service.h\n+++ b/lib/eal/include/rte_service.h\n@@ -29,7 +29,6 @@ extern \"C\" {\n \n #include<stdio.h>\n #include <stdint.h>\n-#include <sys/queue.h>\n \n #include <rte_config.h>\n #include <rte_lcore.h>\ndiff --git a/lib/eal/include/rte_tailq.h b/lib/eal/include/rte_tailq.h\nindex b6fe4e5f78..28cd54ef3e 100644\n--- a/lib/eal/include/rte_tailq.h\n+++ b/lib/eal/include/rte_tailq.h\n@@ -15,17 +15,16 @@\n extern \"C\" {\n #endif\n \n-#include <sys/queue.h>\n #include <stdio.h>\n #include <rte_debug.h>\n \n /** dummy structure type used by the rte_tailq APIs */\n struct rte_tailq_entry {\n-\tTAILQ_ENTRY(rte_tailq_entry) next; /**< Pointer entries for a tailq list */\n+\tRTE_TAILQ_ENTRY(rte_tailq_entry) next; /**< Pointer entries for a tailq list */\n \tvoid *data; /**< Pointer to the data referenced by this tailq entry */\n };\n /** dummy */\n-TAILQ_HEAD(rte_tailq_entry_head, rte_tailq_entry);\n+RTE_TAILQ_HEAD(rte_tailq_entry_head, rte_tailq_entry);\n \n #define RTE_TAILQ_NAMESIZE 32\n \n@@ -48,7 +47,7 @@ struct rte_tailq_elem {\n \t * rte_eal_tailqs_init()\n \t */\n \tstruct rte_tailq_head *head;\n-\tTAILQ_ENTRY(rte_tailq_elem) next;\n+\tRTE_TAILQ_ENTRY(rte_tailq_elem) next;\n \tconst char name[RTE_TAILQ_NAMESIZE];\n };\n \n@@ -126,10 +125,10 @@ RTE_INIT(tailqinitfn_ ##t) \\\n }\n \n /* This macro permits both remove and free var within the loop safely.*/\n-#ifndef TAILQ_FOREACH_SAFE\n-#define TAILQ_FOREACH_SAFE(var, head, field, tvar)\t\t\\\n-\tfor ((var) = TAILQ_FIRST((head));\t\t\t\\\n-\t    (var) && ((tvar) = TAILQ_NEXT((var), field), 1);\t\\\n+#ifndef RTE_TAILQ_FOREACH_SAFE\n+#define RTE_TAILQ_FOREACH_SAFE(var, head, field, tvar)\t\t\\\n+\tfor ((var) = RTE_TAILQ_FIRST((head));\t\t\t\\\n+\t    (var) && ((tvar) = RTE_TAILQ_NEXT((var), field), 1);\t\\\n \t    (var) = (tvar))\n #endif\n \ndiff --git a/lib/eal/linux/include/rte_os.h b/lib/eal/linux/include/rte_os.h\nindex 1618b4df22..bc8e9cd5d8 100644\n--- a/lib/eal/linux/include/rte_os.h\n+++ b/lib/eal/linux/include/rte_os.h\n@@ -11,6 +11,39 @@\n  */\n \n #include <sched.h>\n+#include <sys/queue.h>\n+\n+/* These macros are compatible with system's sys/queue.h. */\n+#define RTE_TAILQ_INIT(head) TAILQ_INIT(head)\n+#define RTE_TAILQ_HEAD(name, type) TAILQ_HEAD(name, type)\n+#define RTE_TAILQ_LAST(head, headname) TAILQ_LAST(head, headname)\n+#define RTE_TAILQ_ENTRY(type) TAILQ_ENTRY(type)\n+#define RTE_TAILQ_FIRST(head) TAILQ_FIRST(head)\n+#define RTE_TAILQ_EMPTY(head) TAILQ_EMPTY(head)\n+#define RTE_TAILQ_NEXT(elem, field) TAILQ_NEXT(elem, field)\n+#define RTE_TAILQ_HEAD_INITIALIZER(head) TAILQ_HEAD_INITIALIZER(head)\n+#define RTE_TAILQ_FOREACH(var, head, field) TAILQ_FOREACH(var, head, field)\n+#define RTE_TAILQ_INSERT_TAIL(head, elm, field) \\\n+\tTAILQ_INSERT_TAIL(head, elm, field)\n+#define RTE_TAILQ_REMOVE(head, elm, field) TAILQ_REMOVE(head, elm, field)\n+#define RTE_TAILQ_INSERT_BEFORE(listelm, elm, field) \\\n+\tTAILQ_INSERT_BEFORE(listelm, elm, field)\n+#define RTE_TAILQ_INSERT_AFTER(head, listelm, elm, field) \\\n+\tTAILQ_INSERT_AFTER(head, listelm, elm, field)\n+#define RTE_TAILQ_INSERT_HEAD(head, elm, field) \\\n+\tTAILQ_INSERT_HEAD(head, elm, field)\n+\n+#define RTE_STAILQ_HEAD(name, type) STAILQ_HEAD(name, type)\n+#define RTE_STAILQ_HEAD_INITIALIZER(head) STAILQ_HEAD_INITIALIZER(head)\n+#define RTE_STAILQ_ENTRY(type) STAILQ_ENTRY(type)\n+\n+/* This is not defined in sys/queue.h */\n+#ifndef TAILQ_FOREACH_SAFE\n+#define TAILQ_FOREACH_SAFE(var, head, field, tvar)\t\t\\\n+\tfor ((var) = RTE_TAILQ_FIRST((head));\t\t\t\\\n+\t    (var) && ((tvar) = RTE_TAILQ_NEXT((var), field), 1);\t\\\n+\t    (var) = (tvar))\n+#endif\n \n #ifdef CPU_SETSIZE /* may require _GNU_SOURCE */\n typedef cpu_set_t rte_cpuset_t;\ndiff --git a/lib/eal/windows/eal_alarm.c b/lib/eal/windows/eal_alarm.c\nindex e5dc54efb8..103c1f909d 100644\n--- a/lib/eal/windows/eal_alarm.c\n+++ b/lib/eal/windows/eal_alarm.c\n@@ -4,6 +4,7 @@\n \n #include <stdatomic.h>\n #include <stdbool.h>\n+#include <sys/queue.h>\n \n #include <rte_alarm.h>\n #include <rte_spinlock.h>\ndiff --git a/lib/eal/windows/include/rte_os.h b/lib/eal/windows/include/rte_os.h\nindex 66c711d458..d0935c5003 100644\n--- a/lib/eal/windows/include/rte_os.h\n+++ b/lib/eal/windows/include/rte_os.h\n@@ -18,6 +18,144 @@\n extern \"C\" {\n #endif\n \n+#ifdef QUEUE_MACRO_DEBUG_TRACE\n+/* Store the last 2 places the queue element or head was altered */\n+struct qm_trace {\n+\tunsigned long\t lastline;\n+\tunsigned long\t prevline;\n+\tconst char\t*lastfile;\n+\tconst char\t*prevfile;\n+};\n+\n+/**\n+ * These macros are compatible with the sys/queue.h provided\n+ * at DPDK source code.\n+ */\n+#define\tTRACEBUF\tstruct qm_trace trace;\n+#define\tTRACEBUF_INITIALIZER\t{ __LINE__, 0, __FILE__, NULL } ,\n+\n+#define\tQMD_TRACE_HEAD(head) do {\t\t\t\t\t\\\n+\t(head)->trace.prevline = (head)->trace.lastline;\t\t\\\n+\t(head)->trace.prevfile = (head)->trace.lastfile;\t\t\\\n+\t(head)->trace.lastline = __LINE__;\t\t\t\t\\\n+\t(head)->trace.lastfile = __FILE__;\t\t\t\t\\\n+} while (0)\n+\n+#define\tQMD_TRACE_ELEM(elem) do {\t\t\t\t\t\\\n+\t(elem)->trace.prevline = (elem)->trace.lastline;\t\t\\\n+\t(elem)->trace.prevfile = (elem)->trace.lastfile;\t\t\\\n+\t(elem)->trace.lastline = __LINE__;\t\t\t\t\\\n+\t(elem)->trace.lastfile = __FILE__;\t\t\t\t\\\n+} while (0)\n+\n+#else\t/* !QUEUE_MACRO_DEBUG_TRACE */\n+#define\tQMD_TRACE_ELEM(elem)\n+#define\tQMD_TRACE_HEAD(head)\n+#define\tTRACEBUF\n+#define\tTRACEBUF_INITIALIZER\n+#endif\t/* QUEUE_MACRO_DEBUG_TRACE */\n+\n+#ifdef QUEUE_MACRO_DEBUG_TRASH\n+#define\tQMD_SAVELINK(name, link)\tvoid **name = (void *)&(link)\n+#define\tTRASHIT(x)\t\tdo {(x) = (void *)-1;} while (0)\n+#define\tQMD_IS_TRASHED(x)\t((x) == (void *)(intptr_t)-1)\n+#else\t/* !QUEUE_MACRO_DEBUG_TRASH */\n+#define\tQMD_SAVELINK(name, link)\n+#define\tTRASHIT(x)\n+#define\tQMD_IS_TRASHED(x)\t0\n+#endif\t/* QUEUE_MACRO_DEBUG_TRASH */\n+\n+#define\tQMD_TAILQ_CHECK_HEAD(head, field)\n+#define\tQMD_TAILQ_CHECK_TAIL(head, headname)\n+#define\tQMD_TAILQ_CHECK_NEXT(elm, field)\n+#define\tQMD_TAILQ_CHECK_PREV(elm, field)\n+\n+\n+#define\tRTE_TAILQ_EMPTY(head)\t((head)->tqh_first == NULL)\n+\n+#define\tRTE_TAILQ_FIRST(head)\t((head)->tqh_first)\n+\n+#define\tRTE_TAILQ_INIT(head) do {\t\t\t\t\t\\\n+\tRTE_TAILQ_FIRST((head)) = NULL;\t\t\t\t\t\\\n+\t(head)->tqh_last = &RTE_TAILQ_FIRST((head));\t\t\t\\\n+\tQMD_TRACE_HEAD(head);\t\t\t\t\t\t\\\n+} while (0)\n+\n+#define\tRTE_TAILQ_HEAD(name, type)\t\t\t\t\t\\\n+struct name {\t\t\t\t\t\t\t\t\\\n+\tstruct type *tqh_first;\t/* first element */\t\t\t\\\n+\tstruct type **tqh_last;\t/* addr of last next element */\t\t\\\n+\tTRACEBUF\t\t\t\t\t\t\t\\\n+}\n+#define\tRTE_TAILQ_HEAD_INITIALIZER(head)\t\t\t\t\\\n+\t{ NULL, &(head).tqh_first, TRACEBUF_INITIALIZER }\n+\n+#define\tRTE_TAILQ_ENTRY(type)\t\t\t\t\t\t\\\n+struct {\t\t\t\t\t\t\t\t\\\n+\tstruct type *tqe_next;\t/* next element */\t\t\t\\\n+\tstruct type **tqe_prev;\t/* address of previous next element */\t\\\n+\tTRACEBUF\t\t\t\t\t\t\t\\\n+}\n+\n+#define\tRTE_TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)\n+#define\tRTE_TAILQ_LAST(head, headname)\t\t\t\t\t\\\n+\t(*(((struct headname *)((head)->tqh_last))->tqh_last))\n+\n+#define\tRTE_TAILQ_FOREACH(var, head, field)\t\t\t\t\\\n+\tfor ((var) = RTE_TAILQ_FIRST((head));\t\t\t\t\\\n+\t    (var);\t\t\t\t\t\t\t\\\n+\t    (var) = RTE_TAILQ_NEXT((var), field))\n+\n+#define\tRTE_TAILQ_INSERT_TAIL(head, elm, field) do {\t\t\t\\\n+\tQMD_TAILQ_CHECK_TAIL(head, field);\t\t\t\t\\\n+\tRTE_TAILQ_NEXT((elm), field) = NULL;\t\t\t\t\\\n+\t(elm)->field.tqe_prev = (head)->tqh_last;\t\t\t\\\n+\t*(head)->tqh_last = (elm);\t\t\t\t\t\\\n+\t(head)->tqh_last = &RTE_TAILQ_NEXT((elm), field);\t\t\\\n+\tQMD_TRACE_HEAD(head);\t\t\t\t\t\t\\\n+\tQMD_TRACE_ELEM(&(elm)->field);\t\t\t\t\t\\\n+} while (0)\n+\n+#define\tRTE_TAILQ_REMOVE(head, elm, field) do {\t\t\t\t\\\n+\tQMD_SAVELINK(oldnext, (elm)->field.tqe_next);\t\t\t\\\n+\tQMD_SAVELINK(oldprev, (elm)->field.tqe_prev);\t\t\t\\\n+\tQMD_TAILQ_CHECK_NEXT(elm, field);\t\t\t\t\\\n+\tQMD_TAILQ_CHECK_PREV(elm, field);\t\t\t\t\\\n+\tif ((RTE_TAILQ_NEXT((elm), field)) != NULL)\t\t\t\\\n+\t\tRTE_TAILQ_NEXT((elm), field)->field.tqe_prev = \t\t\\\n+\t\t    (elm)->field.tqe_prev;\t\t\t\t\\\n+\telse {\t\t\t\t\t\t\t\t\\\n+\t\t(head)->tqh_last = (elm)->field.tqe_prev;\t\t\\\n+\t\tQMD_TRACE_HEAD(head);\t\t\t\t\t\\\n+\t}\t\t\t\t\t\t\t\t\\\n+\t*(elm)->field.tqe_prev = RTE_TAILQ_NEXT((elm), field);\t\t\\\n+\tTRASHIT(*oldnext);\t\t\t\t\t\t\\\n+\tTRASHIT(*oldprev);\t\t\t\t\t\t\\\n+\tQMD_TRACE_ELEM(&(elm)->field);\t\t\t\t\t\\\n+} while (0)\n+\n+#define RTE_TAILQ_INSERT_BEFORE(listelm, elm, field) \\\n+\tTAILQ_INSERT_BEFORE(listelm, elm, field)\n+#define RTE_TAILQ_INSERT_AFTER(head, listelm, elm, field) \\\n+\tTAILQ_INSERT_AFTER(head, listelm, elm, field)\n+#define RTE_TAILQ_INSERT_HEAD(head, elm, field) \\\n+\tTAILQ_INSERT_HEAD(head, elm, field)\n+\n+\n+#define\tRTE_STAILQ_HEAD(name, type)\t\t\t\t\t\\\n+struct name {\t\t\t\t\t\t\t\t\\\n+\tstruct type *stqh_first;/* first element */\t\t\t\\\n+\tstruct type **stqh_last;/* addr of last next element */\t\t\\\n+}\n+#define\tRTE_STAILQ_HEAD_INITIALIZER(head)\t\t\t\t\\\n+\t{ NULL, &(head).stqh_first }\n+\n+#define\tRTE_STAILQ_ENTRY(type)\t\t\t\t\t\t\\\n+struct {\t\t\t\t\t\t\t\t\\\n+\tstruct type *stqe_next;\t/* next element */\t\t\t\\\n+}\n+\n+\n /* cpu_set macros implementation */\n #define RTE_CPU_AND(dst, src1, src2) CPU_AND(dst, src1, src2)\n #define RTE_CPU_OR(dst, src1, src2) CPU_OR(dst, src1, src2)\ndiff --git a/lib/ethdev/rte_ethdev_core.h b/lib/ethdev/rte_ethdev_core.h\nindex edf96de2dc..d2c9ec42c7 100644\n--- a/lib/ethdev/rte_ethdev_core.h\n+++ b/lib/ethdev/rte_ethdev_core.h\n@@ -21,7 +21,7 @@\n \n struct rte_eth_dev_callback;\n /** @internal Structure to keep track of registered callbacks */\n-TAILQ_HEAD(rte_eth_dev_cb_list, rte_eth_dev_callback);\n+RTE_TAILQ_HEAD(rte_eth_dev_cb_list, rte_eth_dev_callback);\n \n struct rte_eth_dev;\n \ndiff --git a/lib/hash/rte_fbk_hash.h b/lib/hash/rte_fbk_hash.h\nindex c4d6976d2b..9c3a61c1d6 100644\n--- a/lib/hash/rte_fbk_hash.h\n+++ b/lib/hash/rte_fbk_hash.h\n@@ -17,7 +17,6 @@\n \n #include <stdint.h>\n #include <errno.h>\n-#include <sys/queue.h>\n \n #ifdef __cplusplus\n extern \"C\" {\ndiff --git a/lib/hash/rte_thash.c b/lib/hash/rte_thash.c\nindex d5a95a6e00..696a1121e2 100644\n--- a/lib/hash/rte_thash.c\n+++ b/lib/hash/rte_thash.c\n@@ -2,6 +2,8 @@\n  * Copyright(c) 2021 Intel Corporation\n  */\n \n+#include <sys/queue.h>\n+\n #include <rte_thash.h>\n #include <rte_tailq.h>\n #include <rte_random.h>\ndiff --git a/lib/ip_frag/rte_ip_frag.h b/lib/ip_frag/rte_ip_frag.h\nindex 0bfe64b14e..80f931c32a 100644\n--- a/lib/ip_frag/rte_ip_frag.h\n+++ b/lib/ip_frag/rte_ip_frag.h\n@@ -62,7 +62,7 @@ struct ip_frag_key {\n  * First two entries in the frags[] array are for the last and first fragments.\n  */\n struct ip_frag_pkt {\n-\tTAILQ_ENTRY(ip_frag_pkt) lru;   /**< LRU list */\n+\tRTE_TAILQ_ENTRY(ip_frag_pkt) lru;   /**< LRU list */\n \tstruct ip_frag_key key;           /**< fragmentation key */\n \tuint64_t             start;       /**< creation timestamp */\n \tuint32_t             total_size;  /**< expected reassembled size */\n@@ -83,7 +83,7 @@ struct rte_ip_frag_death_row {\n \t/**< mbufs to be freed */\n };\n \n-TAILQ_HEAD(ip_pkt_list, ip_frag_pkt); /**< @internal fragments tailq */\n+RTE_TAILQ_HEAD(ip_pkt_list, ip_frag_pkt); /**< @internal fragments tailq */\n \n /** fragmentation table statistics */\n struct ip_frag_tbl_stat {\ndiff --git a/lib/mempool/rte_mempool.h b/lib/mempool/rte_mempool.h\nindex 4235d6f0bf..f57ecbd6fc 100644\n--- a/lib/mempool/rte_mempool.h\n+++ b/lib/mempool/rte_mempool.h\n@@ -38,7 +38,6 @@\n #include <stdint.h>\n #include <errno.h>\n #include <inttypes.h>\n-#include <sys/queue.h>\n \n #include <rte_config.h>\n #include <rte_spinlock.h>\n@@ -141,7 +140,7 @@ struct rte_mempool_objsz {\n  * double-frees.\n  */\n struct rte_mempool_objhdr {\n-\tSTAILQ_ENTRY(rte_mempool_objhdr) next; /**< Next in list. */\n+\tRTE_STAILQ_ENTRY(rte_mempool_objhdr) next; /**< Next in list. */\n \tstruct rte_mempool *mp;          /**< The mempool owning the object. */\n \trte_iova_t iova;                 /**< IO address of the object. */\n #ifdef RTE_LIBRTE_MEMPOOL_DEBUG\n@@ -152,7 +151,7 @@ struct rte_mempool_objhdr {\n /**\n  * A list of object headers type\n  */\n-STAILQ_HEAD(rte_mempool_objhdr_list, rte_mempool_objhdr);\n+RTE_STAILQ_HEAD(rte_mempool_objhdr_list, rte_mempool_objhdr);\n \n #ifdef RTE_LIBRTE_MEMPOOL_DEBUG\n \n@@ -171,7 +170,7 @@ struct rte_mempool_objtlr {\n /**\n  * A list of memory where objects are stored\n  */\n-STAILQ_HEAD(rte_mempool_memhdr_list, rte_mempool_memhdr);\n+RTE_STAILQ_HEAD(rte_mempool_memhdr_list, rte_mempool_memhdr);\n \n /**\n  * Callback used to free a memory chunk\n@@ -186,7 +185,7 @@ typedef void (rte_mempool_memchunk_free_cb_t)(struct rte_mempool_memhdr *memhdr,\n  * and physically contiguous.\n  */\n struct rte_mempool_memhdr {\n-\tSTAILQ_ENTRY(rte_mempool_memhdr) next; /**< Next in list. */\n+\tRTE_STAILQ_ENTRY(rte_mempool_memhdr) next; /**< Next in list. */\n \tstruct rte_mempool *mp;  /**< The mempool owning the chunk */\n \tvoid *addr;              /**< Virtual address of the chunk */\n \trte_iova_t iova;         /**< IO address of the chunk */\ndiff --git a/lib/pci/rte_pci.h b/lib/pci/rte_pci.h\nindex 1f33d687f4..71cbd441c7 100644\n--- a/lib/pci/rte_pci.h\n+++ b/lib/pci/rte_pci.h\n@@ -18,7 +18,6 @@ extern \"C\" {\n \n #include <stdio.h>\n #include <limits.h>\n-#include <sys/queue.h>\n #include <inttypes.h>\n #include <sys/types.h>\n \ndiff --git a/lib/ring/rte_ring_core.h b/lib/ring/rte_ring_core.h\nindex 16718ca7f1..43ce1a29d4 100644\n--- a/lib/ring/rte_ring_core.h\n+++ b/lib/ring/rte_ring_core.h\n@@ -26,7 +26,6 @@ extern \"C\" {\n #include <stdio.h>\n #include <stdint.h>\n #include <string.h>\n-#include <sys/queue.h>\n #include <errno.h>\n #include <rte_common.h>\n #include <rte_config.h>\ndiff --git a/lib/table/rte_swx_table.h b/lib/table/rte_swx_table.h\nindex e23f2304c6..f93e5f3f95 100644\n--- a/lib/table/rte_swx_table.h\n+++ b/lib/table/rte_swx_table.h\n@@ -16,7 +16,8 @@ extern \"C\" {\n  */\n \n #include <stdint.h>\n-#include <sys/queue.h>\n+\n+#include <rte_os.h>\n \n /** Match type. */\n enum rte_swx_table_match_type {\n@@ -68,7 +69,7 @@ struct rte_swx_table_entry {\n \t/** Used to facilitate the membership of this table entry to a\n \t * linked list.\n \t */\n-\tTAILQ_ENTRY(rte_swx_table_entry) node;\n+\tRTE_TAILQ_ENTRY(rte_swx_table_entry) node;\n \n \t/** Key value for the current entry. Array of *key_size* bytes or NULL\n \t * if the *key_size* for the current table is 0.\n@@ -111,7 +112,7 @@ struct rte_swx_table_entry {\n };\n \n /** List of table entries. */\n-TAILQ_HEAD(rte_swx_table_entry_list, rte_swx_table_entry);\n+RTE_TAILQ_HEAD(rte_swx_table_entry_list, rte_swx_table_entry);\n \n /**\n  * Table memory footprint get\ndiff --git a/lib/table/rte_swx_table_selector.h b/lib/table/rte_swx_table_selector.h\nindex 71b6a74810..62988d2856 100644\n--- a/lib/table/rte_swx_table_selector.h\n+++ b/lib/table/rte_swx_table_selector.h\n@@ -16,7 +16,6 @@ extern \"C\" {\n  */\n \n #include <stdint.h>\n-#include <sys/queue.h>\n \n #include <rte_compat.h>\n \n@@ -56,7 +55,7 @@ struct rte_swx_table_selector_params {\n /** Group member parameters. */\n struct rte_swx_table_selector_member {\n \t/** Linked list connectivity. */\n-\tTAILQ_ENTRY(rte_swx_table_selector_member) node;\n+\tRTE_TAILQ_ENTRY(rte_swx_table_selector_member) node;\n \n \t/** Member ID. */\n \tuint32_t member_id;\n@@ -66,7 +65,7 @@ struct rte_swx_table_selector_member {\n };\n \n /** List of group members. */\n-TAILQ_HEAD(rte_swx_table_selector_member_list, rte_swx_table_selector_member);\n+RTE_TAILQ_HEAD(rte_swx_table_selector_member_list, rte_swx_table_selector_member);\n \n /** Group parameters. */\n struct rte_swx_table_selector_group {\ndiff --git a/lib/vhost/rte_vdpa_dev.h b/lib/vhost/rte_vdpa_dev.h\nindex bfada387b0..b0f494815f 100644\n--- a/lib/vhost/rte_vdpa_dev.h\n+++ b/lib/vhost/rte_vdpa_dev.h\n@@ -71,7 +71,7 @@ struct rte_vdpa_dev_ops {\n  * vdpa device structure includes device address and device operations.\n  */\n struct rte_vdpa_device {\n-\tTAILQ_ENTRY(rte_vdpa_device) next;\n+\tRTE_TAILQ_ENTRY(rte_vdpa_device) next;\n \t/** Generic device information */\n \tstruct rte_device *device;\n \t/** vdpa device operations */\n",
    "prefixes": [
        "PATCHv3"
    ]
}