get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 87170,
    "url": "http://patchwork.dpdk.org/api/patches/87170/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20210125070446.53506-1-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": "<20210125070446.53506-1-haiyue.wang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210125070446.53506-1-haiyue.wang@intel.com",
    "date": "2021-01-25T07:04:46",
    "name": "[v1] net/iavf: support to config VLAN filter",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "014a1daa51fc74b2ebacadc7654daa06e6494bff",
    "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/20210125070446.53506-1-haiyue.wang@intel.com/mbox/",
    "series": [
        {
            "id": 14923,
            "url": "http://patchwork.dpdk.org/api/series/14923/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=14923",
            "date": "2021-01-25T07:04:46",
            "name": "[v1] net/iavf: support to config VLAN filter",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/14923/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/87170/comments/",
    "check": "fail",
    "checks": "http://patchwork.dpdk.org/api/patches/87170/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 4E0DCA052A;\n\tMon, 25 Jan 2021 08:20:56 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C20A9140D25;\n\tMon, 25 Jan 2021 08:20:54 +0100 (CET)",
            "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n by mails.dpdk.org (Postfix) with ESMTP id 0C1F6140D23\n for <dev@dpdk.org>; Mon, 25 Jan 2021 08:20:52 +0100 (CET)",
            "from orsmga008.jf.intel.com ([10.7.209.65])\n by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 24 Jan 2021 23:20:51 -0800",
            "from npg-dpdk-haiyue-3.sh.intel.com ([10.67.118.189])\n by orsmga008.jf.intel.com with ESMTP; 24 Jan 2021 23:20:49 -0800"
        ],
        "IronPort-SDR": [
            "\n GwYBKvq9mRjRwUTtvbmUQ29TjFqEja7ryqV2DhqMbihsukDgz2w2HTppLEw68yqyo+SYOL43OV\n zo6lS2qA2srQ==",
            "\n Xdh7QeXo0NMJqlYttQxjs54G/njwJmqFgYNrlf9v/0WBXcuIAAL5STEl9gjDVUObW4yhnjcgCj\n mQGsyVBqrohg=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9874\"; a=\"243752759\"",
            "E=Sophos;i=\"5.79,372,1602572400\"; d=\"scan'208\";a=\"243752759\"",
            "E=Sophos;i=\"5.79,372,1602572400\"; d=\"scan'208\";a=\"387204932\""
        ],
        "X-ExtLoop1": "1",
        "From": "Haiyue Wang <haiyue.wang@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "qiming.yang@intel.com, qi.z.zhang@intel.com,\n Haiyue Wang <haiyue.wang@intel.com>, Jingjing Wu <jingjing.wu@intel.com>,\n Beilei Xing <beilei.xing@intel.com>",
        "Date": "Mon, 25 Jan 2021 15:04:46 +0800",
        "Message-Id": "<20210125070446.53506-1-haiyue.wang@intel.com>",
        "X-Mailer": "git-send-email 2.30.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v1] net/iavf: support to config VLAN filter",
        "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": "Add the VLAN filtering enable/disable configuration according to the VF\nsuccessfully negotiated that capability with PF.\n\nSigned-off-by: Haiyue Wang <haiyue.wang@intel.com>\n---\n drivers/net/iavf/iavf.h        |  1 +\n drivers/net/iavf/iavf_ethdev.c |  7 ++++++\n drivers/net/iavf/iavf_vchnl.c  | 40 ++++++++++++++++++++++++++++++++++\n 3 files changed, 48 insertions(+)",
    "diff": "diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h\nindex c934d2e614..9d84e2604d 100644\n--- a/drivers/net/iavf/iavf.h\n+++ b/drivers/net/iavf/iavf.h\n@@ -314,6 +314,7 @@ int iavf_configure_queues(struct iavf_adapter *adapter,\n int iavf_get_supported_rxdid(struct iavf_adapter *adapter);\n int iavf_config_vlan_strip_v2(struct iavf_adapter *adapter, bool enable);\n int iavf_config_vlan_insert_v2(struct iavf_adapter *adapter, bool enable);\n+int iavf_config_vlan_filter_v2(struct iavf_adapter *adapter, bool enable);\n int iavf_add_del_vlan_v2(struct iavf_adapter *adapter, uint16_t vlanid,\n \t\t\t bool add);\n int iavf_get_vlan_offload_caps_v2(struct iavf_adapter *adapter);\ndiff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c\nindex cf6ea0b15c..8e741031ec 100644\n--- a/drivers/net/iavf/iavf_ethdev.c\n+++ b/drivers/net/iavf/iavf_ethdev.c\n@@ -1086,6 +1086,13 @@ iavf_dev_vlan_offload_set_v2(struct rte_eth_dev *dev, int mask)\n \t\tenable = !!(rxmode->offloads & DEV_RX_OFFLOAD_VLAN_FILTER);\n \n \t\tiavf_iterate_vlan_filters_v2(dev, enable);\n+\n+\t\terr = iavf_config_vlan_filter_v2(adapter, enable);\n+\t\t/* If not support, the filtering is already disabled by PF */\n+\t\tif (err == -ENOTSUP && !enable)\n+\t\t\terr = 0;\n+\t\tif (err)\n+\t\t\treturn -EIO;\n \t}\n \n \tif (mask & ETH_VLAN_STRIP_MASK) {\ndiff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c\nindex 9b8c4d113a..7af143a21b 100644\n--- a/drivers/net/iavf/iavf_vchnl.c\n+++ b/drivers/net/iavf/iavf_vchnl.c\n@@ -604,6 +604,46 @@ iavf_config_vlan_insert_v2(struct iavf_adapter *adapter, bool enable)\n \treturn ret;\n }\n \n+int\n+iavf_config_vlan_filter_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 *filtering_caps;\n+\tstruct virtchnl_vlan_setting vlan_filter;\n+\tstruct iavf_cmd_info args;\n+\tuint32_t *ethertype;\n+\tint ret;\n+\n+\tfiltering_caps = &vf->vlan_v2_caps.filtering.filtering_support;\n+\n+\tif ((filtering_caps->outer & VIRTCHNL_VLAN_ETHERTYPE_8100) &&\n+\t    (filtering_caps->outer & VIRTCHNL_VLAN_TOGGLE))\n+\t\tethertype = &vlan_filter.outer_ethertype_setting;\n+\telse if ((filtering_caps->inner & VIRTCHNL_VLAN_ETHERTYPE_8100) &&\n+\t\t (filtering_caps->inner & VIRTCHNL_VLAN_TOGGLE))\n+\t\tethertype = &vlan_filter.inner_ethertype_setting;\n+\telse\n+\t\treturn -ENOTSUP;\n+\n+\tmemset(&vlan_filter, 0, sizeof(vlan_filter));\n+\tvlan_filter.vport_id = vf->vsi_res->vsi_id;\n+\t*ethertype = VIRTCHNL_VLAN_ETHERTYPE_8100;\n+\n+\targs.ops = enable ? VIRTCHNL_OP_ENABLE_VLAN_FILTERING_V2 :\n+\t\t\t    VIRTCHNL_OP_DISABLE_VLAN_FILTERING_V2;\n+\targs.in_args = (uint8_t *)&vlan_filter;\n+\targs.in_args_size = sizeof(vlan_filter);\n+\targs.out_buffer = vf->aq_resp;\n+\targs.out_size = IAVF_AQ_BUF_SZ;\n+\tret = iavf_execute_vf_cmd(adapter, &args);\n+\tif (ret)\n+\t\tPMD_DRV_LOG(ERR, \"fail to execute command %s\",\n+\t\t\t    enable ? \"VIRTCHNL_OP_ENABLE_VLAN_FILTERING_V2\" :\n+\t\t\t\t     \"VIRTCHNL_OP_DISABLE_VLAN_FILTERING_V2\");\n+\n+\treturn ret;\n+}\n+\n int\n iavf_add_del_vlan_v2(struct iavf_adapter *adapter, uint16_t vlanid, bool add)\n {\n",
    "prefixes": [
        "v1"
    ]
}