get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 97271,
    "url": "http://patchwork.dpdk.org/api/patches/97271/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20210824171049.138208-2-jie1x.wang@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": "<20210824171049.138208-2-jie1x.wang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210824171049.138208-2-jie1x.wang@intel.com",
    "date": "2021-08-24T17:10:48",
    "name": "[v6,1/2] ethdev: add an API to get device configuration info",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "d9a75d082a6dd32077b367b571d7faa0cd156000",
    "submitter": {
        "id": 2201,
        "url": "http://patchwork.dpdk.org/api/people/2201/?format=api",
        "name": "Jie Wang",
        "email": "jie1x.wang@intel.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20210824171049.138208-2-jie1x.wang@intel.com/mbox/",
    "series": [
        {
            "id": 18430,
            "url": "http://patchwork.dpdk.org/api/series/18430/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=18430",
            "date": "2021-08-24T17:10:47",
            "name": "testpmd shows incorrect rx_offload configuration",
            "version": 6,
            "mbox": "http://patchwork.dpdk.org/series/18430/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/97271/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/97271/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 1D9CDA0C4D;\n\tTue, 24 Aug 2021 11:12:58 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 02D284069E;\n\tTue, 24 Aug 2021 11:12:58 +0200 (CEST)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n by mails.dpdk.org (Postfix) with ESMTP id 2F9484014E\n for <dev@dpdk.org>; Tue, 24 Aug 2021 11:12:56 +0200 (CEST)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 24 Aug 2021 02:12:55 -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 24 Aug 2021 02:12:53 -0700"
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10085\"; a=\"239418413\"",
            "E=Sophos;i=\"5.84,346,1620716400\"; d=\"scan'208\";a=\"239418413\"",
            "E=Sophos;i=\"5.84,346,1620716400\"; d=\"scan'208\";a=\"526542193\""
        ],
        "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": "Tue, 24 Aug 2021 17:10:48 +0000",
        "Message-Id": "<20210824171049.138208-2-jie1x.wang@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20210824171049.138208-1-jie1x.wang@intel.com>",
        "References": "<20210817173832.54228-1-jie1x.wang@intel.com>\n <20210824171049.138208-1-jie1x.wang@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v6 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 testpmd get\ndevice configuration info.\n\nSigned-off-by: Jie Wang <jie1x.wang@intel.com>\n---\n lib/ethdev/rte_ethdev.c | 27 +++++++++++++++++++++++++++\n lib/ethdev/rte_ethdev.h | 26 ++++++++++++++++++++++++++\n 2 files changed, 53 insertions(+)",
    "diff": "diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c\nindex 9d95cd11e1..74184099a1 100644\n--- a/lib/ethdev/rte_ethdev.c\n+++ b/lib/ethdev/rte_ethdev.c\n@@ -3458,6 +3458,33 @@ 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_dev_conf_info *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 config 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_dev_conf_info));\n+\n+\tdev_conf_info->rx_offloads = dev->data->dev_conf.rxmode.offloads;\n+\tdev_conf_info->tx_offloads = dev->data->dev_conf.txmode.offloads;\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..70a2db550f 100644\n--- a/lib/ethdev/rte_ethdev.h\n+++ b/lib/ethdev/rte_ethdev.h\n@@ -1587,6 +1587,15 @@ struct rte_eth_dev_info {\n \tvoid *reserved_ptrs[2];   /**< Reserved for future fields */\n };\n \n+/**\n+ * Ethernet device configuration information structure.\n+ * Used to retrieve information about configured device.\n+ */\n+struct rte_eth_dev_conf_info {\n+\tuint64_t rx_offloads; /**rxmode offloads */\n+\tuint64_t tx_offloads; /**txmode offloads */\n+};\n+\n /**\n  * RX/TX queue states\n  */\n@@ -3058,6 +3067,23 @@ 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+ * 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_conf_info* 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+int rte_eth_dev_conf_info_get(uint16_t port_id,\n+\t\t\t\tstruct rte_eth_dev_conf_info *dev_conf_info);\n+\n /**\n  * Retrieve the firmware version of a device.\n  *\n",
    "prefixes": [
        "v6",
        "1/2"
    ]
}