get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 18597,
    "url": "http://patches.dpdk.org/api/patches/18597/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1482841816-54143-2-git-send-email-qiming.yang@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": "<1482841816-54143-2-git-send-email-qiming.yang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1482841816-54143-2-git-send-email-qiming.yang@intel.com",
    "date": "2016-12-27T12:30:13",
    "name": "[dpdk-dev,v3,1/4] ethdev: add firmware information get",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "ed5e9789d65b43ea80795088150edca1f6006b34",
    "submitter": {
        "id": 522,
        "url": "http://patches.dpdk.org/api/people/522/?format=api",
        "name": "Qiming Yang",
        "email": "qiming.yang@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/1482841816-54143-2-git-send-email-qiming.yang@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/18597/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/18597/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 3365037A6;\n\tTue, 27 Dec 2016 13:36:25 +0100 (CET)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby dpdk.org (Postfix) with ESMTP id 6D71336E\n\tfor <dev@dpdk.org>; Tue, 27 Dec 2016 13:35:46 +0100 (CET)",
            "from orsmga003.jf.intel.com ([10.7.209.27])\n\tby fmsmga103.fm.intel.com with ESMTP; 27 Dec 2016 04:35:45 -0800",
            "from dpdk7.bj.intel.com ([172.16.182.76])\n\tby orsmga003.jf.intel.com with ESMTP; 27 Dec 2016 04:35:44 -0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.33,416,1477983600\"; d=\"scan'208\";a=\"916475354\"",
        "From": "Qiming Yang <qiming.yang@intel.com>",
        "To": "dev@dpdk.org,\n\tthomas.monjalon@6wind.com",
        "Cc": "remy.horton@intel.com, ferruh.yigit@intel.com,\n\tQiming Yang <qiming.yang@intel.com>",
        "Date": "Tue, 27 Dec 2016 20:30:13 +0800",
        "Message-Id": "<1482841816-54143-2-git-send-email-qiming.yang@intel.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1482841816-54143-1-git-send-email-qiming.yang@intel.com>",
        "References": "<1481008582-69416-1-git-send-email-qiming.yang@intel.com>\n\t<1482841816-54143-1-git-send-email-qiming.yang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v3 1/4] ethdev: add firmware information get",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<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_fw_info_get' for fetching\nfirmware related information by a given device.\n\nSigned-off-by: Qiming Yang <qiming.yang@intel.com>\nAcked-by: Remy Horton <remy.horton@intel.com>\n---\nv2 changes:\n* modified some comment statements.\nv3 changes:\n* change API, use rte_eth_dev_fw_info_get(uint8_t port_id,\n  uint32_t *fw_major, uint32_t *fw_minor, uint32_t *fw_patch,\n  uint32_t *etrack_id) instead of rte_eth_dev_fwver_get(uint8_t port_id,\n  char *fw_version, int fw_length).\n  Add statusment in /doc/guides/nics/features/default.ini and\n  release_17_02.rst.\n---\n---\n doc/guides/nics/features/default.ini   |  1 +\n doc/guides/rel_notes/release_17_02.rst |  4 ++++\n lib/librte_ether/rte_ethdev.c          | 14 ++++++++++++++\n lib/librte_ether/rte_ethdev.h          | 23 +++++++++++++++++++++++\n lib/librte_ether/rte_ether_version.map |  1 +\n 5 files changed, 43 insertions(+)",
    "diff": "diff --git a/doc/guides/nics/features/default.ini b/doc/guides/nics/features/default.ini\nindex f1bf9bf..8237ee4 100644\n--- a/doc/guides/nics/features/default.ini\n+++ b/doc/guides/nics/features/default.ini\n@@ -66,3 +66,4 @@ x86-64               =\n Usage doc            =\n Design doc           =\n Perf doc             =\n+FW version           =\ndiff --git a/doc/guides/rel_notes/release_17_02.rst b/doc/guides/rel_notes/release_17_02.rst\nindex 180af82..f6dc6c0 100644\n--- a/doc/guides/rel_notes/release_17_02.rst\n+++ b/doc/guides/rel_notes/release_17_02.rst\n@@ -52,6 +52,10 @@ New Features\n   See the :ref:`Generic flow API <Generic_flow_API>` documentation for more\n   information.\n \n+* **Added firmware information get API.**\n+ Added a new function ``rte_eth_dev_fw_info_get()`` to fetch firmware related\n+ information by a given device. Information include major firmware version,\n+ minor firmware version, patch number and etrack id.\n \n Resolved Issues\n ---------------\ndiff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c\nindex 280f0db..f399f09 100644\n--- a/lib/librte_ether/rte_ethdev.c\n+++ b/lib/librte_ether/rte_ethdev.c\n@@ -1586,6 +1586,20 @@ rte_eth_dev_set_rx_queue_stats_mapping(uint8_t port_id, uint16_t rx_queue_id,\n }\n \n void\n+rte_eth_dev_fw_info_get(uint8_t port_id, uint32_t *fw_major, uint32_t *fw_minor,\n+\tuint32_t *fw_patch, uint32_t *etrack_id)\n+{\n+\tstruct rte_eth_dev *dev;\n+\n+\tRTE_ETH_VALID_PORTID_OR_RET(port_id);\n+\tdev = &rte_eth_devices[port_id];\n+\n+\tRTE_FUNC_PTR_OR_RET(*dev->dev_ops->fw_version_get);\n+\t(*dev->dev_ops->fw_version_get)(dev, fw_major, fw_minor,\n+\t\t\t\t\tfw_patch, etrack_id);\n+}\n+\n+void\n rte_eth_dev_info_get(uint8_t port_id, struct rte_eth_dev_info *dev_info)\n {\n \tstruct rte_eth_dev *dev;\ndiff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h\nindex fb51754..829f652 100644\n--- a/lib/librte_ether/rte_ethdev.h\n+++ b/lib/librte_ether/rte_ethdev.h\n@@ -1150,6 +1150,11 @@ typedef uint32_t (*eth_rx_queue_count_t)(struct rte_eth_dev *dev,\n typedef int (*eth_rx_descriptor_done_t)(void *rxq, uint16_t offset);\n /**< @internal Check DD bit of specific RX descriptor */\n \n+typedef void (*eth_fw_version_get_t)(struct rte_eth_dev *dev,\n+\t\tuint32_t *fw_major, uint32_t *fw_minor,\n+\t\tuint32_t *fw_patch, uint32_t *etrack_id);\n+/**< @internal Get firmware information of an Ethernet device. */\n+\n typedef void (*eth_rxq_info_get_t)(struct rte_eth_dev *dev,\n \tuint16_t rx_queue_id, struct rte_eth_rxq_info *qinfo);\n \n@@ -1457,6 +1462,7 @@ struct eth_dev_ops {\n \teth_txq_info_get_t         txq_info_get; /**< retrieve TX queue information. */\n \teth_dev_supported_ptypes_get_t dev_supported_ptypes_get;\n \t/**< Get packet types supported and identified by device. */\n+\teth_fw_version_get_t       fw_version_get; /**< Get firmware version. */\n \n \tvlan_filter_set_t          vlan_filter_set; /**< Filter VLAN Setup. */\n \tvlan_tpid_set_t            vlan_tpid_set; /**< Outer/Inner VLAN TPID Setup. */\n@@ -2395,6 +2401,23 @@ void rte_eth_macaddr_get(uint8_t port_id, struct ether_addr *mac_addr);\n void rte_eth_dev_info_get(uint8_t port_id, struct rte_eth_dev_info *dev_info);\n \n /**\n+ * Retrieve the firmware version of a device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the device.\n+ * @param fw_major\n+ *   A array pointer to store the major firmware version of a device.\n+ * @param fw_minor\n+ *   A array pointer to store the minor firmware version of a device.\n+ * @param fw_patch\n+ *   A array pointer to store the firmware patch number of a device.\n+ * @param etrack_id\n+ *   A array pointer to store the nvm version of a device.\n+ */\n+void rte_eth_dev_fw_info_get(uint8_t port_id, uint32_t *fw_major,\n+\tuint32_t *fw_minor, uint32_t *fw_patch, uint32_t *etrack_id);\n+\n+/**\n  * Retrieve the supported packet types of an Ethernet device.\n  *\n  * When a packet type is announced as supported, it *must* be recognized by\ndiff --git a/lib/librte_ether/rte_ether_version.map b/lib/librte_ether/rte_ether_version.map\nindex a021781..a89bfaa 100644\n--- a/lib/librte_ether/rte_ether_version.map\n+++ b/lib/librte_ether/rte_ether_version.map\n@@ -156,5 +156,6 @@ DPDK_17.02 {\n \trte_flow_flush;\n \trte_flow_query;\n \trte_flow_validate;\n+\trte_eth_dev_fw_info_get;\n \n } DPDK_16.11;\n",
    "prefixes": [
        "dpdk-dev",
        "v3",
        "1/4"
    ]
}