get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 86946,
    "url": "http://patchwork.dpdk.org/api/patches/86946/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20210120041750.408535-2-haiyue.wang@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20210120041750.408535-2-haiyue.wang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210120041750.408535-2-haiyue.wang@intel.com",
    "date": "2021-01-20T04:17:48",
    "name": "[v3,1/2] common/iavf: support VLAN filtering",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "25ea5b56d5381fb7340e66c97d3f3c3206b612a5",
    "submitter": {
        "id": 1044,
        "url": "http://patchwork.dpdk.org/api/people/1044/?format=api",
        "name": "Wang, Haiyue",
        "email": "haiyue.wang@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "http://patchwork.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20210120041750.408535-2-haiyue.wang@intel.com/mbox/",
    "series": [
        {
            "id": 14857,
            "url": "http://patchwork.dpdk.org/api/series/14857/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=14857",
            "date": "2021-01-20T04:17:47",
            "name": "iavf: update the VLAN offload message",
            "version": 3,
            "mbox": "http://patchwork.dpdk.org/series/14857/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/86946/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/86946/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id AD300A0A05;\n\tWed, 20 Jan 2021 05:33:50 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id D6C0C140DA0;\n\tWed, 20 Jan 2021 05:33:46 +0100 (CET)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by mails.dpdk.org (Postfix) with ESMTP id 97119140D97\n for <dev@dpdk.org>; Wed, 20 Jan 2021 05:33:44 +0100 (CET)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 19 Jan 2021 20:33:44 -0800",
            "from npg-dpdk-haiyue-3.sh.intel.com ([10.67.118.189])\n by orsmga001.jf.intel.com with ESMTP; 19 Jan 2021 20:33:41 -0800"
        ],
        "IronPort-SDR": [
            "\n zdopKPpOTMMpIh0JSNLBh7HnFycEHwQyWxcj1nAmGfpQ+8hiyt4c/EUaBOqSvdRWpS3Bje14vq\n it6MbW4i7+OQ==",
            "\n DH0zHxcTkhAvqjJVk1PTwFEKf4xe0RygCfM7zJHQ20zRqKhiOoBv4wkTnG4SNx/JpyVNgM8KEs\n YuiiablOBYZw=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9869\"; a=\"158223385\"",
            "E=Sophos;i=\"5.79,360,1602572400\"; d=\"scan'208\";a=\"158223385\"",
            "E=Sophos;i=\"5.79,360,1602572400\"; d=\"scan'208\";a=\"426767152\""
        ],
        "X-ExtLoop1": "1",
        "From": "Haiyue Wang <haiyue.wang@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "qiming.yang@intel.com, qi.z.zhang@intel.com, qi.fu@intel.com,\n Haiyue Wang <haiyue.wang@intel.com>,\n Brett Creeley <brett.creeley@intel.com>,\n Jingjing Wu <jingjing.wu@intel.com>, Beilei Xing <beilei.xing@intel.com>",
        "Date": "Wed, 20 Jan 2021 12:17:48 +0800",
        "Message-Id": "<20210120041750.408535-2-haiyue.wang@intel.com>",
        "X-Mailer": "git-send-email 2.30.0",
        "In-Reply-To": "<20210120041750.408535-1-haiyue.wang@intel.com>",
        "References": "<20210120011039.164462-1-haiyue.wang@intel.com>\n <20210120041750.408535-1-haiyue.wang@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v3 1/2] common/iavf: support VLAN filtering",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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": "In order to support enable/disable VLAN filtering the VF has to\nnegotiate the capability via VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2. If\nVIRTCHNL_VLAN_TOGGLE is allowed for the VLAN fitlering capabilities,\nthen there needs to be a method to allow this. Make the necessary\nchanges to support this.\n\nAlso, since the virtchnl_vlan_offload message has the desired format,\nchange the structure name to virtchnl_vlan_setting so it can be used for\nVIRTCHNL_OP_ENABLE_VLAN_FILTERING_V2 and\nVIRTCHNL_OP_DISABLE_VLAN_FILTERING_V2.\n\nSigned-off-by: Brett Creeley <brett.creeley@intel.com>\nSigned-off-by: Haiyue Wang <haiyue.wang@intel.com>\n---\n drivers/common/iavf/virtchnl.h | 67 ++++++++++++++++++++++++++++------\n drivers/net/iavf/iavf_vchnl.c  |  4 +-\n 2 files changed, 58 insertions(+), 13 deletions(-)",
    "diff": "diff --git a/drivers/common/iavf/virtchnl.h b/drivers/common/iavf/virtchnl.h\nindex 09e42f034c..6b99e170f0 100644\n--- a/drivers/common/iavf/virtchnl.h\n+++ b/drivers/common/iavf/virtchnl.h\n@@ -149,6 +149,8 @@ enum virtchnl_ops {\n \tVIRTCHNL_OP_DISABLE_VLAN_STRIPPING_V2 = 55,\n \tVIRTCHNL_OP_ENABLE_VLAN_INSERTION_V2 = 56,\n \tVIRTCHNL_OP_DISABLE_VLAN_INSERTION_V2 = 57,\n+\tVIRTCHNL_OP_ENABLE_VLAN_FILTERING_V2 = 58,\n+\tVIRTCHNL_OP_DISABLE_VLAN_FILTERING_V2 = 59,\n \tVIRTCHNL_OP_ENABLE_QUEUES_V2 = 107,\n \tVIRTCHNL_OP_DISABLE_QUEUES_V2 = 108,\n \tVIRTCHNL_OP_MAP_QUEUE_VECTOR = 111,\n@@ -258,6 +260,10 @@ static inline const char *virtchnl_op_str(enum virtchnl_ops v_opcode)\n \t\treturn \"VIRTCHNL_OP_ENABLE_VLAN_INSERTION_V2\";\n \tcase VIRTCHNL_OP_DISABLE_VLAN_INSERTION_V2:\n \t\treturn \"VIRTCHNL_OP_DISABLE_VLAN_INSERTION_V2\";\n+\tcase VIRTCHNL_OP_ENABLE_VLAN_FILTERING_V2:\n+\t\treturn \"VIRTCHNL_OP_ENABLE_VLAN_FILTERING_V2\";\n+\tcase VIRTCHNL_OP_DISABLE_VLAN_FILTERING_V2:\n+\t\treturn \"VIRTCHNL_OP_DISABLE_VLAN_FILTERING_V2\";\n \tcase VIRTCHNL_OP_MAX:\n \t\treturn \"VIRTCHNL_OP_MAX\";\n \tdefault:\n@@ -914,13 +920,13 @@ VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_vlan_filter_list_v2);\n  *\n  * In order to enable inner (again note that in this case inner is the outer\n  * most or single VLAN from the VF's perspective) VLAN stripping for 0x8100\n- * VLANs, the VF would populate the virtchnl_vlan_offload structure in the\n+ * VLANs, the VF would populate the virtchnl_vlan_setting structure in the\n  * following manner and send the VIRTCHNL_OP_ENABLE_VLAN_STRIPPING_V2 message.\n  *\n- * virtchnl_vlan_offload.inner_ethertype_setting =\n+ * virtchnl_vlan_setting.inner_ethertype_setting =\n  *\t\t\tVIRTCHNL_VLAN_ETHERTYPE_8100;\n  *\n- * virtchnl_vlan_offload.vport_id = vport_id or vsi_id assigned to the VF on\n+ * virtchnl_vlan_setting.vport_id = vport_id or vsi_id assigned to the VF on\n  * initialization.\n  *\n  * The reason that VLAN TPID(s) are not being used for the\n@@ -952,11 +958,11 @@ VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_vlan_filter_list_v2);\n  * would populate the virthcnl_vlan_offload_structure in the following manner\n  * and send the VIRTCHNL_OP_ENABLE_VLAN_STRIPPING_V2 message.\n  *\n- * virtchnl_vlan_offload.outer_ethertype_setting =\n+ * virtchnl_vlan_setting.outer_ethertype_setting =\n  *\t\t\tVIRTHCNL_VLAN_ETHERTYPE_8100 |\n  *\t\t\tVIRTHCNL_VLAN_ETHERTYPE_88A8;\n  *\n- * virtchnl_vlan_offload.vport_id = vport_id or vsi_id assigned to the VF on\n+ * virtchnl_vlan_setting.vport_id = vport_id or vsi_id assigned to the VF on\n  * initialization.\n  *\n  * There is also the case where a PF and the underlying hardware can support\n@@ -981,24 +987,61 @@ VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_vlan_filter_list_v2);\n  *\t\t\tVIRTCHNL_ETHERTYPE_STRIPPING_MATCHES_INSERTION;\n  *\n  * In order to enable outer VLAN stripping for 0x88a8 VLANs, the VF would\n- * populate the virtchnl_vlan_offload_structure in the following manner and send\n+ * populate the virtchnl_vlan_setting structure in the following manner and send\n  * the VIRTCHNL_OP_ENABLE_VLAN_STRIPPING_V2. Also, this will change the\n  * ethertype for VLAN insertion if it's enabled. So, for completeness, a\n  * VIRTCHNL_OP_ENABLE_VLAN_INSERTION_V2 with the same ethertype should be sent.\n  *\n- * virtchnl_vlan_offload.outer_ethertype_setting = VIRTHCNL_VLAN_ETHERTYPE_88A8;\n+ * virtchnl_vlan_setting.outer_ethertype_setting = VIRTHCNL_VLAN_ETHERTYPE_88A8;\n  *\n- * virtchnl_vlan_offload.vport_id = vport_id or vsi_id assigned to the VF on\n+ * virtchnl_vlan_setting.vport_id = vport_id or vsi_id assigned to the VF on\n  * initialization.\n+ *\n+ * VIRTCHNL_OP_ENABLE_VLAN_FILTERING_V2\n+ * VIRTCHNL_OP_DISABLE_VLAN_FILTERING_V2\n+ *\n+ * VF sends this message to enable or disable VLAN filtering. It also needs to\n+ * specify an ethertype. The VF knows which VLAN ethertypes are allowed and\n+ * whether or not it's allowed to enable/disable filtering via the\n+ * VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2_CAPS message. The VF needs to\n+ * parse the virtchnl_vlan_caps.filtering fields to determine which, if any,\n+ * filtering messages are allowed.\n+ *\n+ * For example, if the PF populates the virtchnl_vlan_caps.filtering in the\n+ * following manner the VF will be allowed to enable/disable 0x8100 and 0x88a8\n+ * outer VLAN filtering together. Note, that the VIRTCHNL_VLAN_ETHERTYPE_AND\n+ * means that all filtering ethertypes will to be enabled and disabled together\n+ * regardless of the request from the VF. This means that the underlying\n+ * hardware only supports VLAN filtering for all VLAN the specified ethertypes\n+ * or none of them.\n+ *\n+ * virtchnl_vlan_caps.filtering.filtering_support.outer =\n+ *\t\t\tVIRTCHNL_VLAN_TOGGLE |\n+ *\t\t\tVIRTCHNL_VLAN_ETHERTYPE_8100 |\n+ *\t\t\tVIRTHCNL_VLAN_ETHERTYPE_88A8 |\n+ *\t\t\tVIRTCHNL_VLAN_ETHERTYPE_9100 |\n+ *\t\t\tVIRTCHNL_VLAN_ETHERTYPE_AND;\n+ *\n+ * In order to enable outer VLAN filtering for 0x88a8 and 0x8100 VLANs (0x9100\n+ * VLANs aren't supported by the VF driver), the VF would populate the\n+ * virtchnl_vlan_setting structure in the following manner and send the\n+ * VIRTCHNL_OP_ENABLE_VLAN_FILTERING_V2. The same message format would be used\n+ * to disable outer VLAN filtering for 0x88a8 and 0x8100 VLANs, but the\n+ * VIRTCHNL_OP_DISABLE_VLAN_FILTERING_V2 opcode is used.\n+ *\n+ * virtchnl_vlan_setting.outer_ethertype_setting =\n+ *\t\t\tVIRTCHNL_VLAN_ETHERTYPE_8100 |\n+ *\t\t\tVIRTCHNL_VLAN_ETHERTYPE_88A8;\n+ *\n  */\n-struct virtchnl_vlan_offload {\n+struct virtchnl_vlan_setting {\n \tu32 outer_ethertype_setting;\n \tu32 inner_ethertype_setting;\n \tu16 vport_id;\n \tu8 pad[6];\n };\n \n-VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vlan_offload);\n+VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vlan_setting);\n \n /* VIRTCHNL_OP_CONFIG_PROMISCUOUS_MODE\n  * VF sends VSI id and flags.\n@@ -2017,7 +2060,9 @@ virtchnl_vc_validate_vf_msg(struct virtchnl_version_info *ver, u32 v_opcode,\n \tcase VIRTCHNL_OP_DISABLE_VLAN_STRIPPING_V2:\n \tcase VIRTCHNL_OP_ENABLE_VLAN_INSERTION_V2:\n \tcase VIRTCHNL_OP_DISABLE_VLAN_INSERTION_V2:\n-\t\tvalid_len = sizeof(struct virtchnl_vlan_offload);\n+\tcase VIRTCHNL_OP_ENABLE_VLAN_FILTERING_V2:\n+\tcase VIRTCHNL_OP_DISABLE_VLAN_FILTERING_V2:\n+\t\tvalid_len = sizeof(struct virtchnl_vlan_setting);\n \t\tbreak;\n \tcase VIRTCHNL_OP_ENABLE_QUEUES_V2:\n \tcase VIRTCHNL_OP_DISABLE_QUEUES_V2:\ndiff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c\nindex 3ef29d509d..426ddb6c7e 100644\n--- a/drivers/net/iavf/iavf_vchnl.c\n+++ b/drivers/net/iavf/iavf_vchnl.c\n@@ -529,7 +529,7 @@ iavf_config_vlan_strip_v2(struct iavf_adapter *adapter, bool enable)\n {\n \tstruct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);\n \tstruct virtchnl_vlan_supported_caps *supported_caps;\n-\tstruct virtchnl_vlan_offload vlan_strip;\n+\tstruct virtchnl_vlan_setting vlan_strip;\n \tstruct iavf_cmd_info args;\n \tuint32_t stripping_caps;\n \tuint32_t *vlan_setting;\n@@ -571,7 +571,7 @@ iavf_config_vlan_insert_v2(struct iavf_adapter *adapter, bool enable)\n {\n \tstruct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);\n \tstruct virtchnl_vlan_supported_caps *supported_caps;\n-\tstruct virtchnl_vlan_offload vlan_insert;\n+\tstruct virtchnl_vlan_setting vlan_insert;\n \tstruct iavf_cmd_info args;\n \tuint32_t insertion_caps;\n \tuint32_t *vlan_setting;\n",
    "prefixes": [
        "v3",
        "1/2"
    ]
}