get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 64472,
    "url": "http://patches.dpdk.org/api/patches/64472/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200113023949.26718-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": "<20200113023949.26718-9-xiaolong.ye@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200113023949.26718-9-xiaolong.ye@intel.com",
    "date": "2020-01-13T02:39:20",
    "name": "[v4,08/36] net/i40e/base: add check for MAC type",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "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/20200113023949.26718-9-xiaolong.ye@intel.com/mbox/",
    "series": [
        {
            "id": 8064,
            "url": "http://patches.dpdk.org/api/series/8064/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8064",
            "date": "2020-01-13T02:39:12",
            "name": "update for i40e base code",
            "version": 4,
            "mbox": "http://patches.dpdk.org/series/8064/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/64472/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/64472/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 951E9A04F0;\n\tMon, 13 Jan 2020 03:48:22 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 324331D5AE;\n\tMon, 13 Jan 2020 03:47:25 +0100 (CET)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n by dpdk.org (Postfix) with ESMTP id 25FFF1D596\n for <dev@dpdk.org>; Mon, 13 Jan 2020 03:47:12 +0100 (CET)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n 12 Jan 2020 18:47:11 -0800",
            "from dpdk_yexl_af_xdp.sh.intel.com ([10.67.119.206])\n by FMSMGA003.fm.intel.com with ESMTP; 12 Jan 2020 18:47:10 -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,427,1571727600\"; d=\"scan'208\";a=\"272916328\"",
        "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, Xiaolong Ye <xiaolong.ye@intel.com>,\n Galazka Krzysztof <krzysztof.galazka@intel.com>",
        "Date": "Mon, 13 Jan 2020 10:39:20 +0800",
        "Message-Id": "<20200113023949.26718-9-xiaolong.ye@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20200113023949.26718-1-xiaolong.ye@intel.com>",
        "References": "<20191202074935.97629-1-xiaolong.ye@intel.com>\n <20200113023949.26718-1-xiaolong.ye@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v4 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: Galazka Krzysztof <krzysztof.galazka@intel.com>\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": [
        "v4",
        "08/36"
    ]
}