get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 49569,
    "url": "http://patches.dpdk.org/api/patches/49569/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1547097724-108047-1-git-send-email-leyi.rong@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": "<1547097724-108047-1-git-send-email-leyi.rong@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1547097724-108047-1-git-send-email-leyi.rong@intel.com",
    "date": "2019-01-10T05:22:04",
    "name": "net/ice: fix firmware-version in the drvinfo result of ethtool",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "347ae495c36662a9279bb1403a138764aa6346ff",
    "submitter": {
        "id": 1204,
        "url": "http://patches.dpdk.org/api/people/1204/?format=api",
        "name": "Leyi Rong",
        "email": "leyi.rong@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "http://patches.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1547097724-108047-1-git-send-email-leyi.rong@intel.com/mbox/",
    "series": [
        {
            "id": 3081,
            "url": "http://patches.dpdk.org/api/series/3081/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=3081",
            "date": "2019-01-10T05:22:04",
            "name": "net/ice: fix firmware-version in the drvinfo result of ethtool",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/3081/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/49569/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/49569/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 [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 6D0061B5EE;\n\tThu, 10 Jan 2019 06:23:15 +0100 (CET)",
            "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n\tby dpdk.org (Postfix) with ESMTP id D80201B53E\n\tfor <dev@dpdk.org>; Thu, 10 Jan 2019 06:23:13 +0100 (CET)",
            "from fmsmga005.fm.intel.com ([10.253.24.32])\n\tby orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t09 Jan 2019 21:23:12 -0800",
            "from dpdk-wenzhuol.sh.intel.com ([10.67.111.133])\n\tby fmsmga005.fm.intel.com with ESMTP; 09 Jan 2019 21:23:11 -0800"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.56,459,1539673200\"; d=\"scan'208\";a=\"310621368\"",
        "From": "Leyi Rong <leyi.rong@intel.com>",
        "To": "Qiming Yang <qiming.yang@intel.com>,\n\tWenzhuo Lu <wenzhuo.lu@intel.com>",
        "Cc": "dev@dpdk.org,\n\tLeyi Rong <leyi.rong@intel.com>",
        "Date": "Thu, 10 Jan 2019 13:22:04 +0800",
        "Message-Id": "<1547097724-108047-1-git-send-email-leyi.rong@intel.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "Subject": "[dpdk-dev] [PATCH] net/ice: fix firmware-version in the drvinfo\n\tresult of ethtool",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Fix the drvinfo dumped firmware-version when using dpdk ethtool,\nchange it to the same result as linux ethtool shown info.\n\nFixes: e31cb9a36298 (\"net/ice: support FW version getting\")\n\nSigned-off-by: Leyi Rong <leyi.rong@intel.com>\n---\n drivers/net/ice/ice_ethdev.c | 17 ++++++++++++++---\n 1 file changed, 14 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c\nindex 0a81e04..5545f38 100644\n--- a/drivers/net/ice/ice_ethdev.c\n+++ b/drivers/net/ice/ice_ethdev.c\n@@ -2590,11 +2590,22 @@ static int\n ice_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size)\n {\n \tstruct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n+\tu32 full_ver;\n+\tu8 ver, patch;\n+\tu16 build;\n \tint ret;\n \n-\tret = snprintf(fw_version, fw_size, \"%d.%d.%05d %d.%d\",\n-\t\t       hw->fw_maj_ver, hw->fw_min_ver, hw->fw_build,\n-\t\t       hw->api_maj_ver, hw->api_min_ver);\n+\tfull_ver = hw->nvm.oem_ver;\n+\tver = (u8)(full_ver >> 24);\n+\tbuild = (u16)((full_ver >> 8) & 0xffff);\n+\tpatch = (u8)(full_ver & 0xff);\n+\n+\tret = snprintf(fw_version, fw_size,\n+\t\t\t\"%d.%d%d 0x%08x %d.%d.%d\",\n+\t\t\t((hw->nvm.ver >> 12) & 0xf),\n+\t\t\t((hw->nvm.ver >> 4) & 0xff),\n+\t\t\t(hw->nvm.ver & 0xf), hw->nvm.eetrack,\n+\t\t\tver, build, patch);\n \n \t/* add the size of '\\0' */\n \tret += 1;\n",
    "prefixes": []
}