get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 45278,
    "url": "http://patches.dpdk.org/api/patches/45278/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180925023442.134705-19-qi.z.zhang@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": "<20180925023442.134705-19-qi.z.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180925023442.134705-19-qi.z.zhang@intel.com",
    "date": "2018-09-25T02:34:40",
    "name": "[18/20] net/i40e/base: add capability flag for stopping FW LLDP",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "8281615983569e3b533eba35f3a9cedd63215c75",
    "submitter": {
        "id": 504,
        "url": "http://patches.dpdk.org/api/people/504/?format=api",
        "name": "Qi Zhang",
        "email": "qi.z.zhang@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/20180925023442.134705-19-qi.z.zhang@intel.com/mbox/",
    "series": [
        {
            "id": 1477,
            "url": "http://patches.dpdk.org/api/series/1477/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1477",
            "date": "2018-09-25T02:34:22",
            "name": "base code update",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/1477/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/45278/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/45278/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 845111B3A8;\n\tTue, 25 Sep 2018 04:34:49 +0200 (CEST)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby dpdk.org (Postfix) with ESMTP id D0CB61B1EF\n\tfor <dev@dpdk.org>; Tue, 25 Sep 2018 04:34:27 +0200 (CEST)",
            "from orsmga005.jf.intel.com ([10.7.209.41])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t24 Sep 2018 19:34:26 -0700",
            "from dpdk51.sh.intel.com ([10.67.110.190])\n\tby orsmga005.jf.intel.com with ESMTP; 24 Sep 2018 19:34:07 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.54,300,1534834800\"; d=\"scan'208\";a=\"259958552\"",
        "From": "Qi Zhang <qi.z.zhang@intel.com>",
        "To": "beilei.xing@intel.com",
        "Cc": "dev@dpdk.org, ferruh.yigit@intel.com, helin.zhang@intel.com,\n\tQi Zhang <qi.z.zhang@intel.com>",
        "Date": "Tue, 25 Sep 2018 10:34:40 +0800",
        "Message-Id": "<20180925023442.134705-19-qi.z.zhang@intel.com>",
        "X-Mailer": "git-send-email 2.13.6",
        "In-Reply-To": "<20180925023442.134705-1-qi.z.zhang@intel.com>",
        "References": "<20180925023442.134705-1-qi.z.zhang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 18/20] net/i40e/base: add capability flag for\n\tstopping FW LLDP",
        "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": "Add HW capability flag to indicate that firmware supports stopping\nLLDP agent. This feature has been added in FW API 1.7 for XL710\ndevices and 1.6 for X722. Also raise expected minor version number\nfor X722 FW API to 6.\n\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\n---\n drivers/net/i40e/base/i40e_adminq.c     | 6 ++++++\n drivers/net/i40e/base/i40e_adminq_cmd.h | 4 +++-\n drivers/net/i40e/base/i40e_common.c     | 3 +++\n drivers/net/i40e/base/i40e_type.h       | 1 +\n 4 files changed, 13 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c\nindex 3a11becec..38214a373 100644\n--- a/drivers/net/i40e/base/i40e_adminq.c\n+++ b/drivers/net/i40e/base/i40e_adminq.c\n@@ -668,6 +668,12 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw)\n \t    hw->aq.api_maj_ver == I40E_FW_API_VERSION_MAJOR &&\n \t    hw->aq.api_min_ver >= I40E_MINOR_VER_GET_LINK_INFO_XL710) {\n \t\thw->flags |= I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE;\n+\t\thw->flags |= I40E_HW_FLAG_FW_LLDP_STOPPABLE;\n+\t}\n+\tif (hw->mac.type == I40E_MAC_X722 &&\n+\t    hw->aq.api_maj_ver == I40E_FW_API_VERSION_MAJOR &&\n+\t    hw->aq.api_min_ver >= I40E_MINOR_VER_FW_LLDP_STOPPABLE_X722) {\n+\t\thw->flags |= I40E_HW_FLAG_FW_LLDP_STOPPABLE;\n \t}\n \n \t/* Newer versions of firmware require lock when reading the NVM */\ndiff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h\nindex cd8e3a50a..6ff46e3b0 100644\n--- a/drivers/net/i40e/base/i40e_adminq_cmd.h\n+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h\n@@ -12,7 +12,7 @@\n  */\n \n #define I40E_FW_API_VERSION_MAJOR\t0x0001\n-#define I40E_FW_API_VERSION_MINOR_X722\t0x0005\n+#define I40E_FW_API_VERSION_MINOR_X722\t0x0006\n #define I40E_FW_API_VERSION_MINOR_X710\t0x0007\n \n #define I40E_FW_MINOR_VERSION(_h) ((_h)->mac.type == I40E_MAC_XL710 ? \\\n@@ -21,6 +21,8 @@\n \n /* API version 1.7 implements additional link and PHY-specific APIs  */\n #define I40E_MINOR_VER_GET_LINK_INFO_XL710 0x0007\n+/* API version 1.6 for X722 devices adds ability to stop FW LLDP agent */\n+#define I40E_MINOR_VER_FW_LLDP_STOPPABLE_X722 0x0006\n \n struct i40e_aq_desc {\n \t__le16 flags;\ndiff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c\nindex 717e06737..351608453 100644\n--- a/drivers/net/i40e/base/i40e_common.c\n+++ b/drivers/net/i40e/base/i40e_common.c\n@@ -4552,6 +4552,9 @@ i40e_aq_set_dcb_parameters(struct i40e_hw *hw, bool dcb_enable,\n \t\t(struct i40e_aqc_set_dcb_parameters *)&desc.params.raw;\n \tenum i40e_status_code status;\n \n+\tif (!(hw->flags & I40E_HW_FLAG_FW_LLDP_STOPPABLE))\n+\t\treturn I40E_ERR_DEVICE_NOT_SUPPORTED;\n+\n \ti40e_fill_default_direct_cmd_desc(&desc,\n \t\t\t\t\t  i40e_aqc_opc_set_dcb_parameters);\n \ndiff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h\nindex b3621158b..77562f24e 100644\n--- a/drivers/net/i40e/base/i40e_type.h\n+++ b/drivers/net/i40e/base/i40e_type.h\n@@ -720,6 +720,7 @@ struct i40e_hw {\n #define I40E_HW_FLAG_802_1AD_CAPABLE        BIT_ULL(1)\n #define I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE  BIT_ULL(2)\n #define I40E_HW_FLAG_NVM_READ_REQUIRES_LOCK BIT_ULL(3)\n+#define I40E_HW_FLAG_FW_LLDP_STOPPABLE\t    BIT_ULL(4)\n \tu64 flags;\n \n \t/* Used in set switch config AQ command */\n",
    "prefixes": [
        "18/20"
    ]
}