get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 25714,
    "url": "http://patches.dpdk.org/api/patches/25714/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1498470539-26921-11-git-send-email-jingjing.wu@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": "<1498470539-26921-11-git-send-email-jingjing.wu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1498470539-26921-11-git-send-email-jingjing.wu@intel.com",
    "date": "2017-06-26T09:48:53",
    "name": "[dpdk-dev,v2,10/16] net/i40e/base: add support for switch parameters",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "197c7956ea239c1c6e90412f6e70587c3db54ddf",
    "submitter": {
        "id": 47,
        "url": "http://patches.dpdk.org/api/people/47/?format=api",
        "name": "Jingjing Wu",
        "email": "jingjing.wu@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/1498470539-26921-11-git-send-email-jingjing.wu@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/25714/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/25714/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 2B6C97CBC;\n\tMon, 26 Jun 2017 11:54:56 +0200 (CEST)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id 544EF58CE\n\tfor <dev@dpdk.org>; Mon, 26 Jun 2017 11:54:31 +0200 (CEST)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t26 Jun 2017 02:54:30 -0700",
            "from dpdk2.sh.intel.com ([10.239.128.238])\n\tby FMSMGA003.fm.intel.com with ESMTP; 26 Jun 2017 02:54:29 -0700"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.39,395,1493708400\"; d=\"scan'208\";a=\"871757774\"",
        "From": "Jingjing Wu <jingjing.wu@intel.com>",
        "To": "helin.zhang@intel.com",
        "Cc": "dev@dpdk.org,\n\tjingjing.wu@intel.com",
        "Date": "Mon, 26 Jun 2017 17:48:53 +0800",
        "Message-Id": "<1498470539-26921-11-git-send-email-jingjing.wu@intel.com>",
        "X-Mailer": "git-send-email 2.4.11",
        "In-Reply-To": "<1498470539-26921-1-git-send-email-jingjing.wu@intel.com>",
        "References": "<1495856866-89539-1-git-send-email-jingjing.wu@intel.com>\n\t<1498470539-26921-1-git-send-email-jingjing.wu@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 10/16] net/i40e/base: add support for switch\n\tparameters",
        "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": "Adds double VLAN tagging ethertype fields to Set Switch Parameters AQ\ncommand.  These were added in firmware API 1.7.\n\nCallers of i40e_aq_set_switch_config() can specify the ethertypes to\nuse by filling out the corresponding fields in struct i40e_hw.\n\nSigned-off-by: Jingjing Wu <jingjing.wu@intel.com>\n---\n drivers/net/i40e/base/i40e_adminq.c     |  6 ++++++\n drivers/net/i40e/base/i40e_adminq_cmd.h | 17 ++++++++++++++++-\n drivers/net/i40e/base/i40e_common.c     |  6 +++++-\n drivers/net/i40e/base/i40e_type.h       |  6 ++++++\n 4 files changed, 33 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c\nindex a60292a..19871c7 100644\n--- a/drivers/net/i40e/base/i40e_adminq.c\n+++ b/drivers/net/i40e/base/i40e_adminq.c\n@@ -682,6 +682,12 @@ 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->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;\ndiff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h\nindex dd9fb55..c36da2a 100644\n--- a/drivers/net/i40e/base/i40e_adminq_cmd.h\n+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h\n@@ -787,7 +787,22 @@ struct i40e_aqc_set_switch_config {\n #define I40E_AQ_SET_SWITCH_CFG_L2_FILTER\t0x0002\n #define I40E_AQ_SET_SWITCH_CFG_HW_ATR_EVICT\t0x0004\n \t__le16\tvalid_flags;\n-\tu8\treserved[12];\n+\t/* The ethertype in switch_tag is dropped on ingress and used\n+\t * internally by the switch. Set this to zero for the default\n+\t * of 0x88a8 (802.1ad). Should be zero for firmware API\n+\t * versions lower than 1.7.\n+\t */\n+\t__le16\tswitch_tag;\n+\t/* The ethertypes in first_tag and second_tag are used to\n+\t * match the outer and inner VLAN tags (respectively) when HW\n+\t * double VLAN tagging is enabled via the set port parameters\n+\t * AQ command. Otherwise these are both ignored. Set them to\n+\t * zero for their defaults of 0x8100 (802.1Q). Should be zero\n+\t * for firmware API versions lower than 1.7.\n+\t */\n+\t__le16\tfirst_tag;\n+\t__le16\tsecond_tag;\n+\tu8\treserved[6];\n };\n \n I40E_CHECK_CMD_LENGTH(i40e_aqc_set_switch_config);\ndiff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c\nindex 9895a77..b4901ef 100644\n--- a/drivers/net/i40e/base/i40e_common.c\n+++ b/drivers/net/i40e/base/i40e_common.c\n@@ -2695,7 +2695,11 @@ enum i40e_status_code i40e_aq_set_switch_config(struct i40e_hw *hw,\n \t\t\t\t\t  i40e_aqc_opc_set_switch_config);\n \tscfg->flags = CPU_TO_LE16(flags);\n \tscfg->valid_flags = CPU_TO_LE16(valid_flags);\n-\n+\tif (hw->flags & I40E_HW_FLAG_802_1AD_CAPABLE) {\n+\t\tscfg->switch_tag = CPU_TO_LE16(hw->switch_tag);\n+\t\tscfg->first_tag = CPU_TO_LE16(hw->first_tag);\n+\t\tscfg->second_tag = CPU_TO_LE16(hw->second_tag);\n+\t}\n \tstatus = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);\n \n \treturn status;\ndiff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h\nindex 6ca1a0f..152b4a7 100644\n--- a/drivers/net/i40e/base/i40e_type.h\n+++ b/drivers/net/i40e/base/i40e_type.h\n@@ -700,8 +700,14 @@ struct i40e_hw {\n \tu16 wol_proxy_vsi_seid;\n \n #define I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE BIT_ULL(0)\n+#define I40E_HW_FLAG_802_1AD_CAPABLE        BIT_ULL(1)\n \tu64 flags;\n \n+\t/* Used in set switch config AQ command */\n+\tu16 switch_tag;\n+\tu16 first_tag;\n+\tu16 second_tag;\n+\n \t/* debug mask */\n \tu32 debug_mask;\n \tchar err_str[16];\n",
    "prefixes": [
        "dpdk-dev",
        "v2",
        "10/16"
    ]
}