get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 115490,
    "url": "http://patches.dpdk.org/api/patches/115490/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220826124208.671400-12-david.marchand@redhat.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": "<20220826124208.671400-12-david.marchand@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220826124208.671400-12-david.marchand@redhat.com",
    "date": "2022-08-26T12:41:52",
    "name": "[v4,11/27] bus/auxiliary: make driver-only headers private",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "9bc8176ee2ee4a6d99fedd0c7c27c5fa9eb144c7",
    "submitter": {
        "id": 1173,
        "url": "http://patches.dpdk.org/api/people/1173/?format=api",
        "name": "David Marchand",
        "email": "david.marchand@redhat.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/20220826124208.671400-12-david.marchand@redhat.com/mbox/",
    "series": [
        {
            "id": 24428,
            "url": "http://patches.dpdk.org/api/series/24428/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=24428",
            "date": "2022-08-26T12:41:41",
            "name": "Bus and device cleanup for 22.11",
            "version": 4,
            "mbox": "http://patches.dpdk.org/series/24428/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/115490/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/115490/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 6E838A0550;\n\tFri, 26 Aug 2022 14:43:36 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 4CC6C410D0;\n\tFri, 26 Aug 2022 14:43:10 +0200 (CEST)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by mails.dpdk.org (Postfix) with ESMTP id A872F40156\n for <dev@dpdk.org>; Fri, 26 Aug 2022 14:43:09 +0200 (CEST)",
            "from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com\n [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n us-mta-401-uzzsrn-ENQmOWfWasPR2RA-1; Fri, 26 Aug 2022 08:43:05 -0400",
            "from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com\n [10.11.54.1])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6DB263C10162;\n Fri, 26 Aug 2022 12:43:04 +0000 (UTC)",
            "from fchome.redhat.com (unknown [10.40.193.251])\n by smtp.corp.redhat.com (Postfix) with ESMTP id B8FCA40CF916;\n Fri, 26 Aug 2022 12:43:02 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1661517789;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=PwOqKnD6aay/9YuVg71oKySvH96zWrL9qVYhkrmpRB8=;\n b=XIJoZrDS3cgdn8rpEdTG1qTVQONNTYKiGoKnDgJgT//gJ8VR7YVdG/RzEYQsru7iyyDl2J\n q0oBNz5Rzu+H8uqvpPn6vUu0e9Dw0mJWgTVw1LwF/hqcsTpOND5T4/0WVMbO87ALwp58k9\n HOhFOmrnjBS0qqlmtgFQyCzAL4ny0Ws=",
        "X-MC-Unique": "uzzsrn-ENQmOWfWasPR2RA-1",
        "From": "David Marchand <david.marchand@redhat.com>",
        "To": "dev@dpdk.org",
        "Cc": "thomas@monjalon.net, bruce.richardson@intel.com,\n Parav Pandit <parav@nvidia.com>, Xueming Li <xuemingl@nvidia.com>,\n Ray Kinsella <mdr@ashroe.eu>, Matan Azrad <matan@nvidia.com>,\n Viacheslav Ovsiienko <viacheslavo@nvidia.com>",
        "Subject": "[PATCH v4 11/27] bus/auxiliary: make driver-only headers private",
        "Date": "Fri, 26 Aug 2022 14:41:52 +0200",
        "Message-Id": "<20220826124208.671400-12-david.marchand@redhat.com>",
        "In-Reply-To": "<20220826124208.671400-1-david.marchand@redhat.com>",
        "References": "<20220628144643.1213026-1-david.marchand@redhat.com>\n <20220826124208.671400-1-david.marchand@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 2.84 on 10.11.54.1",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain; charset=\"US-ASCII\"; x-default=true",
        "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": "The auxiliary bus interface is for drivers only.\nMark as internal and move the header in the driver headers list.\n\nWhile at it, cleanup the code:\n- fix indentation,\n- remove unneeded reference to bus specific singleton object,\n- remove unneeded list head structure type,\n- reorder the definitions and macro manipulating the bus singleton object,\n- remove inclusion of rte_bus.h and fix the code that relied on implicit\n  inclusion,\n\nSigned-off-by: David Marchand <david.marchand@redhat.com>\n---\nChanges since RFC v2:\n- squashed cleanup for this bus code from other patches,\n- updated release notes,\n\n---\n doc/guides/rel_notes/release_22_11.rst        |  5 ++++\n drivers/bus/auxiliary/auxiliary_common.c      |  3 --\n drivers/bus/auxiliary/auxiliary_params.c      |  1 -\n ...bus_auxiliary.h => bus_auxiliary_driver.h} | 24 +++++++--------\n drivers/bus/auxiliary/linux/auxiliary.c       |  2 --\n drivers/bus/auxiliary/meson.build             |  4 +--\n drivers/bus/auxiliary/private.h               | 30 +++++++++----------\n drivers/bus/auxiliary/version.map             |  3 +-\n .../common/mlx5/linux/mlx5_common_auxiliary.c |  2 +-\n drivers/common/mlx5/linux/mlx5_common_os.c    |  2 +-\n drivers/common/mlx5/mlx5_common_private.h     |  2 +-\n drivers/net/mlx5/linux/mlx5_os.c              |  2 +-\n 12 files changed, 36 insertions(+), 44 deletions(-)\n rename drivers/bus/auxiliary/{rte_bus_auxiliary.h => bus_auxiliary_driver.h} (90%)",
    "diff": "diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst\nindex 225a380de0..9fd95e13dd 100644\n--- a/doc/guides/rel_notes/release_22_11.rst\n+++ b/doc/guides/rel_notes/release_22_11.rst\n@@ -88,6 +88,11 @@ API Changes\n   in the future. Applications can use ``devtools/cocci/func_or_ret.cocci``\n   to update their code.\n \n+* drivers: Registering a driver on the ``auxiliary``,\n+  buses has been marked as an internal API.\n+  External users may still register their driver using the associated driver\n+  headers (see ``enable_driver_sdk`` meson option).\n+\n * raw/ifgpa: The function ``rte_pmd_ifpga_get_pci_bus`` has been removed.\n \n \ndiff --git a/drivers/bus/auxiliary/auxiliary_common.c b/drivers/bus/auxiliary/auxiliary_common.c\nindex 2cf8fe672d..6cf6c170ec 100644\n--- a/drivers/bus/auxiliary/auxiliary_common.c\n+++ b/drivers/bus/auxiliary/auxiliary_common.c\n@@ -23,7 +23,6 @@\n #include <rte_devargs.h>\n \n #include \"private.h\"\n-#include \"rte_bus_auxiliary.h\"\n \n static struct rte_devargs *\n auxiliary_devargs_lookup(const char *name)\n@@ -259,7 +258,6 @@ void\n rte_auxiliary_register(struct rte_auxiliary_driver *driver)\n {\n \tTAILQ_INSERT_TAIL(&auxiliary_bus.driver_list, driver, next);\n-\tdriver->bus = &auxiliary_bus;\n }\n \n /* Unregister a driver */\n@@ -267,7 +265,6 @@ void\n rte_auxiliary_unregister(struct rte_auxiliary_driver *driver)\n {\n \tTAILQ_REMOVE(&auxiliary_bus.driver_list, driver, next);\n-\tdriver->bus = NULL;\n }\n \n /* Add a device to auxiliary bus */\ndiff --git a/drivers/bus/auxiliary/auxiliary_params.c b/drivers/bus/auxiliary/auxiliary_params.c\nindex 9017118b36..0289777922 100644\n--- a/drivers/bus/auxiliary/auxiliary_params.c\n+++ b/drivers/bus/auxiliary/auxiliary_params.c\n@@ -10,7 +10,6 @@\n #include <rte_kvargs.h>\n \n #include \"private.h\"\n-#include \"rte_bus_auxiliary.h\"\n \n enum auxiliary_params {\n \tRTE_AUXILIARY_PARAM_NAME,\ndiff --git a/drivers/bus/auxiliary/rte_bus_auxiliary.h b/drivers/bus/auxiliary/bus_auxiliary_driver.h\nsimilarity index 90%\nrename from drivers/bus/auxiliary/rte_bus_auxiliary.h\nrename to drivers/bus/auxiliary/bus_auxiliary_driver.h\nindex 93b266daf7..1c2d2c04af 100644\n--- a/drivers/bus/auxiliary/rte_bus_auxiliary.h\n+++ b/drivers/bus/auxiliary/bus_auxiliary_driver.h\n@@ -2,8 +2,8 @@\n  * Copyright (c) 2021 NVIDIA Corporation & Affiliates\n  */\n \n-#ifndef RTE_BUS_AUXILIARY_H\n-#define RTE_BUS_AUXILIARY_H\n+#ifndef BUS_AUXILIARY_DRIVER_H\n+#define BUS_AUXILIARY_DRIVER_H\n \n /**\n  * @file\n@@ -22,17 +22,16 @@ extern \"C\" {\n #include <stdint.h>\n #include <inttypes.h>\n \n+#include <rte_compat.h>\n #include <rte_debug.h>\n #include <rte_interrupts.h>\n #include <rte_dev.h>\n-#include <rte_bus.h>\n #include <rte_kvargs.h>\n \n #define RTE_BUS_AUXILIARY_NAME \"auxiliary\"\n \n /* Forward declarations */\n struct rte_auxiliary_driver;\n-struct rte_auxiliary_bus;\n struct rte_auxiliary_device;\n \n /**\n@@ -43,7 +42,7 @@ struct rte_auxiliary_device;\n  * @return\n  *   Whether the driver can handle the auxiliary device.\n  */\n-typedef bool(rte_auxiliary_match_t)(const char *name);\n+typedef bool (rte_auxiliary_match_t)(const char *name);\n \n /**\n  * Initialization function for the driver called during auxiliary probing.\n@@ -56,8 +55,8 @@ typedef bool(rte_auxiliary_match_t)(const char *name);\n  *   - 0 On success.\n  *   - Negative value and rte_errno is set otherwise.\n  */\n-typedef int(rte_auxiliary_probe_t)(struct rte_auxiliary_driver *drv,\n-\t\t\t\t    struct rte_auxiliary_device *dev);\n+typedef int (rte_auxiliary_probe_t)(struct rte_auxiliary_driver *drv,\n+\tstruct rte_auxiliary_device *dev);\n \n /**\n  * Uninitialization function for the driver called during hotplugging.\n@@ -87,7 +86,7 @@ typedef int (rte_auxiliary_remove_t)(struct rte_auxiliary_device *dev);\n  *   - Negative value and rte_errno is set otherwise.\n  */\n typedef int (rte_auxiliary_dma_map_t)(struct rte_auxiliary_device *dev,\n-\t\t\t\t       void *addr, uint64_t iova, size_t len);\n+\tvoid *addr, uint64_t iova, size_t len);\n \n /**\n  * Driver-specific DMA un-mapping. After a successful call the device\n@@ -106,7 +105,7 @@ typedef int (rte_auxiliary_dma_map_t)(struct rte_auxiliary_device *dev,\n  *   - Negative value and rte_errno is set otherwise.\n  */\n typedef int (rte_auxiliary_dma_unmap_t)(struct rte_auxiliary_device *dev,\n-\t\t\t\t\t void *addr, uint64_t iova, size_t len);\n+\tvoid *addr, uint64_t iova, size_t len);\n \n /**\n  * A structure describing an auxiliary device.\n@@ -125,7 +124,6 @@ struct rte_auxiliary_device {\n struct rte_auxiliary_driver {\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. */\n \trte_auxiliary_probe_t *probe;         /**< Device probe function. */\n \trte_auxiliary_remove_t *remove;       /**< Device remove function. */\n@@ -160,7 +158,7 @@ struct rte_auxiliary_driver {\n  *   A pointer to a rte_auxiliary_driver structure describing the driver\n  *   to be registered.\n  */\n-__rte_experimental\n+__rte_internal\n void rte_auxiliary_register(struct rte_auxiliary_driver *driver);\n \n /** Helper for auxiliary device registration from driver instance */\n@@ -182,11 +180,11 @@ void rte_auxiliary_register(struct rte_auxiliary_driver *driver);\n  *   A pointer to a rte_auxiliary_driver structure describing the driver\n  *   to be unregistered.\n  */\n-__rte_experimental\n+__rte_internal\n void rte_auxiliary_unregister(struct rte_auxiliary_driver *driver);\n \n #ifdef __cplusplus\n }\n #endif\n \n-#endif /* RTE_BUS_AUXILIARY_H */\n+#endif /* BUS_AUXILIARY_DRIVER_H */\ndiff --git a/drivers/bus/auxiliary/linux/auxiliary.c b/drivers/bus/auxiliary/linux/auxiliary.c\nindex 9bd4ee3295..d4c564cd78 100644\n--- a/drivers/bus/auxiliary/linux/auxiliary.c\n+++ b/drivers/bus/auxiliary/linux/auxiliary.c\n@@ -6,13 +6,11 @@\n #include <dirent.h>\n \n #include <rte_log.h>\n-#include <rte_bus.h>\n #include <rte_malloc.h>\n #include <rte_devargs.h>\n #include <rte_memcpy.h>\n #include <eal_filesystem.h>\n \n-#include \"../rte_bus_auxiliary.h\"\n #include \"../private.h\"\n \n #define AUXILIARY_SYSFS_PATH \"/sys/bus/auxiliary/devices\"\ndiff --git a/drivers/bus/auxiliary/meson.build b/drivers/bus/auxiliary/meson.build\nindex e2b356f8d2..fcb1a349c4 100644\n--- a/drivers/bus/auxiliary/meson.build\n+++ b/drivers/bus/auxiliary/meson.build\n@@ -1,9 +1,7 @@\n # SPDX-License-Identifier: BSD-3-Clause\n # Copyright (c) 2021 NVIDIA Corporation & Affiliates\n \n-headers = files(\n-        'rte_bus_auxiliary.h',\n-)\n+driver_sdk_headers += files('bus_auxiliary_driver.h')\n sources = files(\n         'auxiliary_common.c',\n         'auxiliary_params.c',\ndiff --git a/drivers/bus/auxiliary/private.h b/drivers/bus/auxiliary/private.h\nindex d22e83cf7a..3f49f62493 100644\n--- a/drivers/bus/auxiliary/private.h\n+++ b/drivers/bus/auxiliary/private.h\n@@ -9,9 +9,10 @@\n #include <stdio.h>\n #include <sys/queue.h>\n \n-#include \"rte_bus_auxiliary.h\"\n+#include <rte_bus.h>\n+\n+#include \"bus_auxiliary_driver.h\"\n \n-extern struct rte_auxiliary_bus auxiliary_bus;\n extern int auxiliary_bus_logtype;\n \n #define AUXILIARY_LOG(level, ...) \\\n@@ -19,27 +20,24 @@ extern int auxiliary_bus_logtype;\n \t\tRTE_FMT(\"auxiliary bus: \" RTE_FMT_HEAD(__VA_ARGS__,) \"\\n\", \\\n \t\t\tRTE_FMT_TAIL(__VA_ARGS__,)))\n \n-/* Auxiliary bus iterators */\n-#define FOREACH_DEVICE_ON_AUXILIARY_BUS(p) \\\n-\t\tTAILQ_FOREACH(p, &(auxiliary_bus.device_list), next)\n-\n-#define FOREACH_DRIVER_ON_AUXILIARY_BUS(p) \\\n-\t\tTAILQ_FOREACH(p, &(auxiliary_bus.driver_list), next)\n-\n-/* List of auxiliary devices. */\n-TAILQ_HEAD(rte_auxiliary_device_list, rte_auxiliary_device);\n-/* List of auxiliary drivers. */\n-TAILQ_HEAD(rte_auxiliary_driver_list, rte_auxiliary_driver);\n-\n /*\n  * Structure describing the auxiliary bus\n  */\n struct rte_auxiliary_bus {\n \tstruct rte_bus bus;                  /* Inherit the generic class */\n-\tstruct rte_auxiliary_device_list device_list;  /* List of devices */\n-\tstruct rte_auxiliary_driver_list driver_list;  /* List of drivers */\n+\tTAILQ_HEAD(, rte_auxiliary_device) device_list;  /* List of devices */\n+\tTAILQ_HEAD(, rte_auxiliary_driver) driver_list;  /* List of drivers */\n };\n \n+extern struct rte_auxiliary_bus auxiliary_bus;\n+\n+/* Auxiliary bus iterators */\n+#define FOREACH_DEVICE_ON_AUXILIARY_BUS(p) \\\n+\tTAILQ_FOREACH(p, &(auxiliary_bus.device_list), next)\n+\n+#define FOREACH_DRIVER_ON_AUXILIARY_BUS(p) \\\n+\tTAILQ_FOREACH(p, &(auxiliary_bus.driver_list), next)\n+\n /*\n  * Test whether the auxiliary device exist.\n  */\ndiff --git a/drivers/bus/auxiliary/version.map b/drivers/bus/auxiliary/version.map\nindex dc993e84ff..e9322e0b11 100644\n--- a/drivers/bus/auxiliary/version.map\n+++ b/drivers/bus/auxiliary/version.map\n@@ -1,7 +1,6 @@\n-EXPERIMENTAL {\n+INTERNAL {\n \tglobal:\n \n-\t# added in 21.08\n \trte_auxiliary_register;\n \trte_auxiliary_unregister;\n \ndiff --git a/drivers/common/mlx5/linux/mlx5_common_auxiliary.c b/drivers/common/mlx5/linux/mlx5_common_auxiliary.c\nindex a182a8bdde..33479ffd68 100644\n--- a/drivers/common/mlx5/linux/mlx5_common_auxiliary.c\n+++ b/drivers/common/mlx5/linux/mlx5_common_auxiliary.c\n@@ -8,7 +8,7 @@\n \n #include <rte_malloc.h>\n #include <rte_errno.h>\n-#include <rte_bus_auxiliary.h>\n+#include <bus_auxiliary_driver.h>\n #include <rte_common.h>\n #include \"eal_filesystem.h\"\n \ndiff --git a/drivers/common/mlx5/linux/mlx5_common_os.c b/drivers/common/mlx5/linux/mlx5_common_os.c\nindex c57e1918d2..b42102e84c 100644\n--- a/drivers/common/mlx5/linux/mlx5_common_os.c\n+++ b/drivers/common/mlx5/linux/mlx5_common_os.c\n@@ -16,7 +16,7 @@\n #include <rte_errno.h>\n #include <rte_string_fns.h>\n #include <rte_bus_pci.h>\n-#include <rte_bus_auxiliary.h>\n+#include <bus_auxiliary_driver.h>\n \n #include \"mlx5_common.h\"\n #include \"mlx5_nl.h\"\ndiff --git a/drivers/common/mlx5/mlx5_common_private.h b/drivers/common/mlx5/mlx5_common_private.h\nindex 04c0af3763..12a5bdb41b 100644\n--- a/drivers/common/mlx5/mlx5_common_private.h\n+++ b/drivers/common/mlx5/mlx5_common_private.h\n@@ -6,7 +6,7 @@\n #define MLX5_COMMON_PRIVATE_H\n \n #include <rte_pci.h>\n-#include <rte_bus_auxiliary.h>\n+#include <bus_auxiliary_driver.h>\n \n #include \"mlx5_common.h\"\n \ndiff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c\nindex 0741028dab..c9ed38ef7c 100644\n--- a/drivers/net/mlx5/linux/mlx5_os.c\n+++ b/drivers/net/mlx5/linux/mlx5_os.c\n@@ -20,7 +20,7 @@\n #include <ethdev_pci.h>\n #include <rte_pci.h>\n #include <rte_bus_pci.h>\n-#include <rte_bus_auxiliary.h>\n+#include <bus_auxiliary_driver.h>\n #include <rte_common.h>\n #include <rte_kvargs.h>\n #include <rte_rwlock.h>\n",
    "prefixes": [
        "v4",
        "11/27"
    ]
}