get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 97458,
    "url": "http://patches.dpdk.org/api/patches/97458/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210827081740.365037-2-jie1x.wang@intel.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": "<20210827081740.365037-2-jie1x.wang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210827081740.365037-2-jie1x.wang@intel.com",
    "date": "2021-08-27T08:17:39",
    "name": "[v8,1/2] ethdev: add an API to get device configuration info",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "41424f373e8aabc17eff7429709ddd2b890f1158",
    "submitter": {
        "id": 2201,
        "url": "http://patches.dpdk.org/api/people/2201/?format=api",
        "name": "Jie Wang",
        "email": "jie1x.wang@intel.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20210827081740.365037-2-jie1x.wang@intel.com/mbox/",
    "series": [
        {
            "id": 18493,
            "url": "http://patches.dpdk.org/api/series/18493/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=18493",
            "date": "2021-08-27T08:17:38",
            "name": "testpmd shows incorrect rx_offload configuration",
            "version": 8,
            "mbox": "http://patches.dpdk.org/series/18493/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/97458/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/97458/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 E2159A0C41;\n\tFri, 27 Aug 2021 10:18:01 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 7C7B1411D3;\n\tFri, 27 Aug 2021 10:17:59 +0200 (CEST)",
            "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n by mails.dpdk.org (Postfix) with ESMTP id 52B7141134\n for <dev@dpdk.org>; Fri, 27 Aug 2021 10:17:57 +0200 (CEST)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 27 Aug 2021 01:17:56 -0700",
            "from dpdk.cd.intel.com ([10.240.178.133])\n by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 27 Aug 2021 01:17:54 -0700"
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10088\"; a=\"281638203\"",
            "E=Sophos;i=\"5.84,356,1620716400\"; d=\"scan'208\";a=\"281638203\"",
            "E=Sophos;i=\"5.84,356,1620716400\"; d=\"scan'208\";a=\"528232388\""
        ],
        "From": "Jie Wang <jie1x.wang@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "xiaoyun.li@intel.com, andrew.rybchenko@oktetlabs.ru, thomas@monjalon.net,\n ferruh.yigit@intel.com, Jie Wang <jie1x.wang@intel.com>",
        "Date": "Fri, 27 Aug 2021 16:17:39 +0800",
        "Message-Id": "<20210827081740.365037-2-jie1x.wang@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20210827081740.365037-1-jie1x.wang@intel.com>",
        "References": "<20210826070924.308368-1-jie1x.wang@intel.com>\n <20210827081740.365037-1-jie1x.wang@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v8 1/2] ethdev: add an API to get device\n configuration info",
        "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": "This patch adds a new API \"rte_eth_dev_conf_info_get()\" to help users get\ndevice configuration info.\n\nSigned-off-by: Jie Wang <jie1x.wang@intel.com>\n---\n lib/ethdev/rte_ethdev.c | 28 ++++++++++++++++++++++++++++\n lib/ethdev/rte_ethdev.h | 21 +++++++++++++++++++++\n lib/ethdev/version.map  |  3 +++\n 3 files changed, 52 insertions(+)",
    "diff": "diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c\nindex 9d95cd11e1..bbe24af662 100644\n--- a/lib/ethdev/rte_ethdev.c\n+++ b/lib/ethdev/rte_ethdev.c\n@@ -3458,6 +3458,34 @@ rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info)\n \treturn 0;\n }\n \n+int\n+rte_eth_dev_conf_info_get(uint16_t port_id,\n+\t\t\t\tstruct rte_eth_conf *dev_conf_info)\n+{\n+\tstruct rte_eth_dev *dev;\n+\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tdev = &rte_eth_devices[port_id];\n+\n+\tif (dev_conf_info == NULL) {\n+\t\tRTE_ETHDEV_LOG(ERR, \"Cannot get ethdev port %u configuration info to NULL\\n\",\n+\t\t\tport_id);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\t/*\n+\t * Init dev_conf_info before port_id check since caller does not have\n+\t * return status and does not know if get is successful or not.\n+\t */\n+\tmemset(dev_conf_info, 0, sizeof(struct rte_eth_conf));\n+\n+\t/* copy dev->data->dev_conf to dev_conf_info */\n+\tmemcpy(dev_conf_info, &dev->data->dev_conf,\n+\t\tsizeof(struct rte_eth_conf));\n+\n+\treturn 0;\n+}\n+\n int\n rte_eth_dev_get_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,\n \t\t\t\t uint32_t *ptypes, int num)\ndiff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h\nindex d2b27c351f..3c5b02a133 100644\n--- a/lib/ethdev/rte_ethdev.h\n+++ b/lib/ethdev/rte_ethdev.h\n@@ -3058,6 +3058,27 @@ int rte_eth_macaddr_get(uint16_t port_id, struct rte_ether_addr *mac_addr);\n  */\n int rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info);\n \n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change without prior notice.\n+ *\n+ * Retrieve the contextual information of an Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param dev_conf_info\n+ *   A pointer to a structure of type *rte_eth_dev* to be filled with\n+ *   the contextual information of the Ethernet device.\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if support for dev_infos_get() does not exist for the device.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ *   - (-EINVAL) if bad parameter.\n+ */\n+__rte_experimental\n+int rte_eth_dev_conf_info_get(uint16_t port_id,\n+\t\t\t\tstruct rte_eth_conf *dev_conf_info);\n+\n /**\n  * Retrieve the firmware version of a device.\n  *\ndiff --git a/lib/ethdev/version.map b/lib/ethdev/version.map\nindex 44d30b05ae..40539f99f9 100644\n--- a/lib/ethdev/version.map\n+++ b/lib/ethdev/version.map\n@@ -249,6 +249,9 @@ EXPERIMENTAL {\n \trte_mtr_meter_policy_delete;\n \trte_mtr_meter_policy_update;\n \trte_mtr_meter_policy_validate;\n+\n+\t# added in 21.11\n+\trte_eth_dev_conf_info_get;\n };\n \n INTERNAL {\n",
    "prefixes": [
        "v8",
        "1/2"
    ]
}