get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 63800,
    "url": "http://patches.dpdk.org/api/patches/63800/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20191212152124.260629-9-xiaolong.ye@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": "<20191212152124.260629-9-xiaolong.ye@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20191212152124.260629-9-xiaolong.ye@intel.com",
    "date": "2019-12-12T15:20:56",
    "name": "[v2,08/36] net/i40e/base: add check for MAC type",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "62b4ed3ad1577898e865b3503189a9eeff53de2e",
    "submitter": {
        "id": 1120,
        "url": "http://patches.dpdk.org/api/people/1120/?format=api",
        "name": "Xiaolong Ye",
        "email": "xiaolong.ye@intel.com"
    },
    "delegate": {
        "id": 31221,
        "url": "http://patches.dpdk.org/api/users/31221/?format=api",
        "username": "yexl",
        "first_name": "xiaolong",
        "last_name": "ye",
        "email": "xiaolong.ye@intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20191212152124.260629-9-xiaolong.ye@intel.com/mbox/",
    "series": [
        {
            "id": 7813,
            "url": "http://patches.dpdk.org/api/series/7813/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=7813",
            "date": "2019-12-12T15:20:48",
            "name": "update for i40e base code",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/7813/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/63800/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/63800/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 20877A04F5;\n\tThu, 12 Dec 2019 16:29:32 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 690EE1BF95;\n\tThu, 12 Dec 2019 16:28:22 +0100 (CET)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n by dpdk.org (Postfix) with ESMTP id 514942BC8\n for <dev@dpdk.org>; Thu, 12 Dec 2019 16:28:07 +0100 (CET)",
            "from orsmga006.jf.intel.com ([10.7.209.51])\n by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n 12 Dec 2019 07:28:06 -0800",
            "from dpdk_yexl_af_xdp.sh.intel.com ([10.67.119.186])\n by orsmga006.jf.intel.com with ESMTP; 12 Dec 2019 07:28:05 -0800"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.69,306,1571727600\"; d=\"scan'208\";a=\"216148121\"",
        "From": "Xiaolong Ye <xiaolong.ye@intel.com>",
        "To": "Beilei Xing <beilei.xing@intel.com>,\n\tQi Zhang <qi.z.zhang@intel.com>",
        "Cc": "dev@dpdk.org,\n\tXiaolong Ye <xiaolong.ye@intel.com>",
        "Date": "Thu, 12 Dec 2019 23:20:56 +0800",
        "Message-Id": "<20191212152124.260629-9-xiaolong.ye@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20191212152124.260629-1-xiaolong.ye@intel.com>",
        "References": "<20191202074935.97629-1-xiaolong.ye@intel.com>\n <20191212152124.260629-1-xiaolong.ye@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 08/36] net/i40e/base: add check for MAC type",
        "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 <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": "Some features were introduced in different FW API version on XL710 and X722\nMACs. Others are available only on specific MAC type. Make sure that they\nare properly assigned. Also fix the style issues reported by current\ncheck-patch.\n\nSigned-off-by: Xiaolong Ye <xiaolong.ye@intel.com>\n---\n drivers/net/i40e/base/i40e_adminq.c | 68 +++++++----------------------\n 1 file changed, 16 insertions(+), 52 deletions(-)",
    "diff": "diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c\nindex b2fc6f590..b8c6e30f5 100644\n--- a/drivers/net/i40e/base/i40e_adminq.c\n+++ b/drivers/net/i40e/base/i40e_adminq.c\n@@ -582,25 +582,22 @@ STATIC void i40e_resume_aq(struct i40e_hw *hw)\n  **/\n enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw)\n {\n-#ifdef PF_DRIVER\n+\tstruct i40e_adminq_info *aq = &hw->aq;\n+\tenum i40e_status_code ret_code;\n \tu16 cfg_ptr, oem_hi, oem_lo;\n \tu16 eetrack_lo, eetrack_hi;\n-#endif\n-\tenum i40e_status_code ret_code;\n-#ifdef PF_DRIVER\n \tint retry = 0;\n-#endif\n \n \t/* verify input for valid configuration */\n-\tif ((hw->aq.num_arq_entries == 0) ||\n-\t    (hw->aq.num_asq_entries == 0) ||\n-\t    (hw->aq.arq_buf_size == 0) ||\n-\t    (hw->aq.asq_buf_size == 0)) {\n+\tif (aq->num_arq_entries == 0 ||\n+\t    aq->num_asq_entries == 0 ||\n+\t    aq->arq_buf_size == 0 ||\n+\t    aq->asq_buf_size == 0) {\n \t\tret_code = I40E_ERR_CONFIG;\n \t\tgoto init_adminq_exit;\n \t}\n-\ti40e_init_spinlock(&hw->aq.asq_spinlock);\n-\ti40e_init_spinlock(&hw->aq.arq_spinlock);\n+\ti40e_init_spinlock(&aq->asq_spinlock);\n+\ti40e_init_spinlock(&aq->arq_spinlock);\n \n \t/* Set up register offsets */\n \ti40e_adminq_init_regs(hw);\n@@ -618,23 +615,17 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw)\n \tif (ret_code != I40E_SUCCESS)\n \t\tgoto init_adminq_free_asq;\n \n-#ifdef PF_DRIVER\n-#ifdef INTEGRATED_VF\n-\t/* VF has no need of firmware */\n-\tif (i40e_is_vf(hw))\n-\t\tgoto init_adminq_exit;\n-#endif\n \t/* There are some cases where the firmware may not be quite ready\n \t * for AdminQ operations, so we retry the AdminQ setup a few times\n \t * if we see timeouts in this first AQ call.\n \t */\n \tdo {\n \t\tret_code = i40e_aq_get_firmware_version(hw,\n-\t\t\t\t\t\t\t&hw->aq.fw_maj_ver,\n-\t\t\t\t\t\t\t&hw->aq.fw_min_ver,\n-\t\t\t\t\t\t\t&hw->aq.fw_build,\n-\t\t\t\t\t\t\t&hw->aq.api_maj_ver,\n-\t\t\t\t\t\t\t&hw->aq.api_min_ver,\n+\t\t\t\t\t\t\t&aq->fw_maj_ver,\n+\t\t\t\t\t\t\t&aq->fw_min_ver,\n+\t\t\t\t\t\t\t&aq->fw_build,\n+\t\t\t\t\t\t\t&aq->api_maj_ver,\n+\t\t\t\t\t\t\t&aq->api_min_ver,\n \t\t\t\t\t\t\tNULL);\n \t\tif (ret_code != I40E_ERR_ADMIN_QUEUE_TIMEOUT)\n \t\t\tbreak;\n@@ -658,31 +649,7 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw)\n \t\t\t   &oem_lo);\n \thw->nvm.oem_ver = ((u32)oem_hi << 16) | oem_lo;\n \n-\t/* The ability to RX (not drop) 802.1ad frames was added in API 1.7 */\n-\tif ((hw->aq.api_maj_ver > 1) ||\n-\t    ((hw->aq.api_maj_ver == 1) &&\n-\t     (hw->aq.api_min_ver >= 7)))\n-\t\thw->flags |= I40E_HW_FLAG_802_1AD_CAPABLE;\n-\n-\tif (hw->mac.type == I40E_MAC_XL710 &&\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 */\n-\tif ((hw->aq.api_maj_ver > 1) ||\n-\t    ((hw->aq.api_maj_ver == 1) &&\n-\t     (hw->aq.api_min_ver >= 5)))\n-\t\thw->flags |= I40E_HW_FLAG_NVM_READ_REQUIRES_LOCK;\n-\n-\tif (hw->aq.api_maj_ver > I40E_FW_API_VERSION_MAJOR) {\n+\tif (aq->api_maj_ver > I40E_FW_API_VERSION_MAJOR) {\n \t\tret_code = I40E_ERR_FIRMWARE_API_VERSION;\n \t\tgoto init_adminq_free_arq;\n \t}\n@@ -692,21 +659,18 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw)\n \thw->nvm_release_on_done = false;\n \thw->nvmupd_state = I40E_NVMUPD_STATE_INIT;\n \n-#endif /* PF_DRIVER */\n \tret_code = I40E_SUCCESS;\n \n \t/* success! */\n \tgoto init_adminq_exit;\n \n-#ifdef PF_DRIVER\n init_adminq_free_arq:\n \ti40e_shutdown_arq(hw);\n-#endif\n init_adminq_free_asq:\n \ti40e_shutdown_asq(hw);\n init_adminq_destroy_spinlocks:\n-\ti40e_destroy_spinlock(&hw->aq.asq_spinlock);\n-\ti40e_destroy_spinlock(&hw->aq.arq_spinlock);\n+\ti40e_destroy_spinlock(&aq->asq_spinlock);\n+\ti40e_destroy_spinlock(&aq->arq_spinlock);\n \n init_adminq_exit:\n \treturn ret_code;\n",
    "prefixes": [
        "v2",
        "08/36"
    ]
}