get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 86280,
    "url": "http://patchwork.dpdk.org/api/patches/86280/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20210111133406.484200-5-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": "<20210111133406.484200-5-haiyue.wang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210111133406.484200-5-haiyue.wang@intel.com",
    "date": "2021-01-11T13:34:06",
    "name": "[v5,4/4] net/iavf: implement new VLAN capability handling",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "f1b249441c50a8805e2bbb0cb8303c896b5f7ed8",
    "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/20210111133406.484200-5-haiyue.wang@intel.com/mbox/",
    "series": [
        {
            "id": 14632,
            "url": "http://patchwork.dpdk.org/api/series/14632/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=14632",
            "date": "2021-01-11T13:34:02",
            "name": "Add AVF & DCF VLAN feaure",
            "version": 5,
            "mbox": "http://patchwork.dpdk.org/series/14632/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/86280/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/86280/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 52484A09FF;\n\tMon, 11 Jan 2021 14:50:39 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id F1F03140CF4;\n\tMon, 11 Jan 2021 14:50:08 +0100 (CET)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n by mails.dpdk.org (Postfix) with ESMTP id 94212140CCB\n for <dev@dpdk.org>; Mon, 11 Jan 2021 14:50:04 +0100 (CET)",
            "from fmsmga008.fm.intel.com ([10.253.24.58])\n by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 11 Jan 2021 05:50:03 -0800",
            "from npg-dpdk-haiyue-3.sh.intel.com ([10.67.118.189])\n by fmsmga008.fm.intel.com with ESMTP; 11 Jan 2021 05:50:01 -0800"
        ],
        "IronPort-SDR": [
            "\n xHx3tfuc293hHtV0ZeDrUDnLe+B0yheAXt/VOhM4G06o6Qo6d7Kl6NuIGwxruFW9Pgsupk+T/u\n BVS/Kj5aU0AA==",
            "\n g3OmzmIFTWv/3uHspbuhcYlWaJbTycuInQFlHjli28j64VFEOs8yAnwzotNwoIDHRaDCcOh22o\n s/2LyS61emHg=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9860\"; a=\"177083540\"",
            "E=Sophos;i=\"5.79,338,1602572400\"; d=\"scan'208\";a=\"177083540\"",
            "E=Sophos;i=\"5.79,338,1602572400\"; d=\"scan'208\";a=\"352607083\""
        ],
        "X-ExtLoop1": "1",
        "From": "Haiyue Wang <haiyue.wang@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "qiming.yang@intel.com, jingjing.wu@intel.com, qi.z.zhang@intel.com,\n qi.fu@intel.com, Haiyue Wang <haiyue.wang@intel.com>,\n Beilei Xing <beilei.xing@intel.com>",
        "Date": "Mon, 11 Jan 2021 21:34:06 +0800",
        "Message-Id": "<20210111133406.484200-5-haiyue.wang@intel.com>",
        "X-Mailer": "git-send-email 2.30.0",
        "In-Reply-To": "<20210111133406.484200-1-haiyue.wang@intel.com>",
        "References": "<20201214071155.98764-1-haiyue.wang@intel.com>\n <20210111133406.484200-1-haiyue.wang@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v5 4/4] net/iavf: implement new VLAN capability\n handling",
        "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": "The new VLAN virtchnl opcodes introduce new capabilities like VLAN\nfiltering, stripping and insertion.\n\nThe VF needs to query the VLAN capabilities based on current device\nconfiguration firstly.\n\nSigned-off-by: Qiming Yang <qiming.yang@intel.com>\nSigned-off-by: Haiyue Wang <haiyue.wang@intel.com>\n---\n drivers/net/iavf/iavf.h        |   6 ++\n drivers/net/iavf/iavf_ethdev.c | 117 ++++++++++++++++++++++++++++++--\n drivers/net/iavf/iavf_vchnl.c  | 120 +++++++++++++++++++++++++++++++++\n 3 files changed, 236 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h\nindex 9754273b2..af11268fe 100644\n--- a/drivers/net/iavf/iavf.h\n+++ b/drivers/net/iavf/iavf.h\n@@ -139,6 +139,7 @@ struct iavf_info {\n \tstruct virtchnl_version_info virtchnl_version;\n \tstruct virtchnl_vf_resource *vf_res; /* VF resource */\n \tstruct virtchnl_vsi_resource *vsi_res; /* LAN VSI */\n+\tstruct virtchnl_vlan_caps vlan_v2_caps;\n \tuint64_t supported_rxdid;\n \tuint8_t *proto_xtr; /* proto xtr type for all queues */\n \tvolatile enum virtchnl_ops pend_cmd; /* pending command not finished */\n@@ -310,6 +311,11 @@ int iavf_configure_rss_key(struct iavf_adapter *adapter);\n int iavf_configure_queues(struct iavf_adapter *adapter,\n \t\t\tuint16_t num_queue_pairs, uint16_t index);\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_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);\n int iavf_config_irq_map(struct iavf_adapter *adapter);\n int iavf_config_irq_map_lv(struct iavf_adapter *adapter, uint16_t num,\n \t\t\tuint16_t index);\ndiff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c\nindex 49e6dd125..e22c62ed0 100644\n--- a/drivers/net/iavf/iavf_ethdev.c\n+++ b/drivers/net/iavf/iavf_ethdev.c\n@@ -326,13 +326,52 @@ iavf_queues_req_reset(struct rte_eth_dev *dev, uint16_t num)\n \treturn 0;\n }\n \n+static int\n+iavf_dev_vlan_insert_set(struct rte_eth_dev *dev)\n+{\n+\tstruct iavf_adapter *adapter =\n+\t\tIAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);\n+\tstruct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);\n+\tbool enable;\n+\n+\tif (!(vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN_V2))\n+\t\treturn 0;\n+\n+\tenable = !!(dev->data->dev_conf.txmode.offloads &\n+\t\t    DEV_TX_OFFLOAD_VLAN_INSERT);\n+\tiavf_config_vlan_insert_v2(adapter, enable);\n+\n+\treturn 0;\n+}\n+\n+static int\n+iavf_dev_init_vlan(struct rte_eth_dev *dev)\n+{\n+\tint err;\n+\n+\terr = iavf_dev_vlan_offload_set(dev,\n+\t\t\t\t\tETH_VLAN_STRIP_MASK |\n+\t\t\t\t\tETH_QINQ_STRIP_MASK |\n+\t\t\t\t\tETH_VLAN_FILTER_MASK |\n+\t\t\t\t\tETH_VLAN_EXTEND_MASK);\n+\tif (err) {\n+\t\tPMD_DRV_LOG(ERR, \"Failed to update vlan offload\");\n+\t\treturn err;\n+\t}\n+\n+\terr = iavf_dev_vlan_insert_set(dev);\n+\tif (err)\n+\t\tPMD_DRV_LOG(ERR, \"Failed to update vlan insertion\");\n+\n+\treturn err;\n+}\n+\n static int\n iavf_dev_configure(struct rte_eth_dev *dev)\n {\n \tstruct iavf_adapter *ad =\n \t\tIAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);\n \tstruct iavf_info *vf =  IAVF_DEV_PRIVATE_TO_VF(ad);\n-\tstruct rte_eth_conf *dev_conf = &dev->data->dev_conf;\n \tuint16_t num_queue_pairs = RTE_MAX(dev->data->nb_rx_queues,\n \t\tdev->data->nb_tx_queues);\n \tint ret;\n@@ -389,12 +428,10 @@ iavf_dev_configure(struct rte_eth_dev *dev)\n \t\tvf->max_rss_qregion = IAVF_MAX_NUM_QUEUES_DFLT;\n \t}\n \n-\t/* Vlan stripping setting */\n-\tif (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN) {\n-\t\tif (dev_conf->rxmode.offloads & DEV_RX_OFFLOAD_VLAN_STRIP)\n-\t\t\tiavf_enable_vlan_strip(ad);\n-\t\telse\n-\t\t\tiavf_disable_vlan_strip(ad);\n+\tret = iavf_dev_init_vlan(dev);\n+\tif (ret) {\n+\t\tPMD_DRV_LOG(ERR, \"configure VLAN failed: %d\", ret);\n+\t\treturn -1;\n \t}\n \n \tif (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RSS_PF) {\n@@ -784,6 +821,7 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)\n \t\tDEV_RX_OFFLOAD_JUMBO_FRAME |\n \t\tDEV_RX_OFFLOAD_VLAN_FILTER |\n \t\tDEV_RX_OFFLOAD_RSS_HASH;\n+\n \tdev_info->tx_offload_capa =\n \t\tDEV_TX_OFFLOAD_VLAN_INSERT |\n \t\tDEV_TX_OFFLOAD_QINQ_INSERT |\n@@ -997,6 +1035,13 @@ iavf_dev_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)\n \tstruct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);\n \tint err;\n \n+\tif (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN_V2) {\n+\t\terr = iavf_add_del_vlan_v2(adapter, vlan_id, on);\n+\t\tif (err)\n+\t\t\treturn -EIO;\n+\t\treturn 0;\n+\t}\n+\n \tif (!(vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN))\n \t\treturn -ENOTSUP;\n \n@@ -1006,6 +1051,54 @@ iavf_dev_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)\n \treturn 0;\n }\n \n+static void\n+iavf_iterate_vlan_filters_v2(struct rte_eth_dev *dev, bool enable)\n+{\n+\tstruct rte_vlan_filter_conf *vfc = &dev->data->vlan_filter_conf;\n+\tstruct iavf_adapter *adapter =\n+\t\tIAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);\n+\tuint32_t i, j;\n+\tuint64_t ids;\n+\n+\tfor (i = 0; i < RTE_DIM(vfc->ids); i++) {\n+\t\tif (vfc->ids[i] == 0)\n+\t\t\tcontinue;\n+\n+\t\tids = vfc->ids[i];\n+\t\tfor (j = 0; ids != 0 && j < 64; j++, ids >>= 1) {\n+\t\t\tif (ids & 1)\n+\t\t\t\tiavf_add_del_vlan_v2(adapter,\n+\t\t\t\t\t\t     64 * i + j, enable);\n+\t\t}\n+\t}\n+}\n+\n+static int\n+iavf_dev_vlan_offload_set_v2(struct rte_eth_dev *dev, int mask)\n+{\n+\tstruct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;\n+\tstruct iavf_adapter *adapter =\n+\t\tIAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);\n+\tbool enable;\n+\tint err;\n+\n+\tif (mask & ETH_VLAN_FILTER_MASK) {\n+\t\tenable = !!(rxmode->offloads & DEV_RX_OFFLOAD_VLAN_FILTER);\n+\n+\t\tiavf_iterate_vlan_filters_v2(dev, enable);\n+\t}\n+\n+\tif (mask & ETH_VLAN_STRIP_MASK) {\n+\t\tenable = !!(rxmode->offloads & DEV_RX_OFFLOAD_VLAN_STRIP);\n+\n+\t\terr = iavf_config_vlan_strip_v2(adapter, enable);\n+\t\tif (err)\n+\t\t\treturn -EIO;\n+\t}\n+\n+\treturn 0;\n+}\n+\n static int\n iavf_dev_vlan_offload_set(struct rte_eth_dev *dev, int mask)\n {\n@@ -1015,6 +1108,9 @@ iavf_dev_vlan_offload_set(struct rte_eth_dev *dev, int mask)\n \tstruct rte_eth_conf *dev_conf = &dev->data->dev_conf;\n \tint err;\n \n+\tif (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN_V2)\n+\t\treturn iavf_dev_vlan_offload_set_v2(dev, mask);\n+\n \tif (!(vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN))\n \t\treturn -ENOTSUP;\n \n@@ -1898,6 +1994,13 @@ iavf_init_vf(struct rte_eth_dev *dev)\n \t\t}\n \t}\n \n+\tif (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN_V2) {\n+\t\tif (iavf_get_vlan_offload_caps_v2(adapter) != 0) {\n+\t\t\tPMD_INIT_LOG(ERR, \"failed to do get VLAN offload v2 capabilities\");\n+\t\t\tgoto err_rss;\n+\t\t}\n+\t}\n+\n \tiavf_init_proto_xtr(dev);\n \n \treturn 0;\ndiff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c\nindex c33194cdc..890700d57 100644\n--- a/drivers/net/iavf/iavf_vchnl.c\n+++ b/drivers/net/iavf/iavf_vchnl.c\n@@ -174,6 +174,7 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args)\n \tcase VIRTCHNL_OP_VERSION:\n \tcase VIRTCHNL_OP_GET_VF_RESOURCES:\n \tcase VIRTCHNL_OP_GET_SUPPORTED_RXDIDS:\n+\tcase VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2_CAPS:\n \t\t/* for init virtchnl ops, need to poll the response */\n \t\tdo {\n \t\t\tresult = iavf_read_msg_from_pf(adapter, args->out_size,\n@@ -459,6 +460,7 @@ iavf_get_vf_resource(struct iavf_adapter *adapter)\n \t\tVIRTCHNL_VF_OFFLOAD_ADV_RSS_PF |\n \t\tVIRTCHNL_VF_OFFLOAD_REQ_QUEUES |\n \t\tVIRTCHNL_VF_OFFLOAD_CRC |\n+\t\tVIRTCHNL_VF_OFFLOAD_VLAN_V2 |\n \t\tVIRTCHNL_VF_LARGE_NUM_QPAIRS;\n \n \targs.in_args = (uint8_t *)&caps;\n@@ -522,6 +524,124 @@ iavf_get_supported_rxdid(struct iavf_adapter *adapter)\n \treturn 0;\n }\n \n+int\n+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_offload vlan_strip;\n+\tstruct iavf_cmd_info args;\n+\tint ret;\n+\n+\tif (!(vf->vlan_v2_caps.offloads.stripping_support.inner &\n+\t      VIRTCHNL_VLAN_ETHERTYPE_8100))\n+\t\treturn -ENOTSUP;\n+\n+\tmemset(&vlan_strip, 0, sizeof(vlan_strip));\n+\tvlan_strip.vport_id = vf->vsi_res->vsi_id;\n+\tvlan_strip.inner_ethertype_setting = VIRTCHNL_VLAN_ETHERTYPE_8100;\n+\n+\targs.ops = enable ? VIRTCHNL_OP_ENABLE_VLAN_STRIPPING_V2 :\n+\t\t\t    VIRTCHNL_OP_DISABLE_VLAN_STRIPPING_V2;\n+\targs.in_args = (uint8_t *)&vlan_strip;\n+\targs.in_args_size = sizeof(vlan_strip);\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_STRIPPING_V2\" :\n+\t\t\t\t     \"VIRTCHNL_OP_DISABLE_VLAN_STRIPPING_V2\");\n+\n+\treturn ret;\n+}\n+\n+int\n+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_offload vlan_insert;\n+\tstruct iavf_cmd_info args;\n+\tint ret;\n+\n+\tif (!(vf->vlan_v2_caps.offloads.insertion_support.inner &\n+\t      VIRTCHNL_VLAN_ETHERTYPE_8100))\n+\t\treturn -ENOTSUP;\n+\n+\tmemset(&vlan_insert, 0, sizeof(vlan_insert));\n+\tvlan_insert.vport_id = vf->vsi_res->vsi_id;\n+\tvlan_insert.inner_ethertype_setting = VIRTCHNL_VLAN_ETHERTYPE_8100;\n+\n+\targs.ops = enable ? VIRTCHNL_OP_ENABLE_VLAN_INSERTION_V2 :\n+\t\t\t    VIRTCHNL_OP_DISABLE_VLAN_INSERTION_V2;\n+\targs.in_args = (uint8_t *)&vlan_insert;\n+\targs.in_args_size = sizeof(vlan_insert);\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_INSERTION_V2\" :\n+\t\t\t\t     \"VIRTCHNL_OP_DISABLE_VLAN_INSERTION_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+\tstruct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);\n+\tstruct virtchnl_vlan_filter_list_v2 vlan_filter;\n+\tstruct iavf_cmd_info args;\n+\tint err;\n+\n+\tif (!(vf->vlan_v2_caps.filtering.filtering_support.inner &\n+\t      VIRTCHNL_VLAN_ETHERTYPE_8100))\n+\t\treturn -ENOTSUP;\n+\n+\tmemset(&vlan_filter, 0, sizeof(vlan_filter));\n+\tvlan_filter.vport_id = vf->vsi_res->vsi_id;\n+\tvlan_filter.num_elements = 1;\n+\tvlan_filter.filters[0].inner.tpid = RTE_ETHER_TYPE_VLAN;\n+\tvlan_filter.filters[0].inner.tci = vlanid;\n+\n+\targs.ops = add ? VIRTCHNL_OP_ADD_VLAN_V2 : VIRTCHNL_OP_DEL_VLAN_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+\terr = iavf_execute_vf_cmd(adapter, &args);\n+\tif (err)\n+\t\tPMD_DRV_LOG(ERR, \"fail to execute command %s\",\n+\t\t\t    add ? \"OP_ADD_VLAN_V2\" :  \"OP_DEL_VLAN_V2\");\n+\n+\treturn err;\n+}\n+\n+int\n+iavf_get_vlan_offload_caps_v2(struct iavf_adapter *adapter)\n+{\n+\tstruct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);\n+\tstruct iavf_cmd_info args;\n+\tint ret;\n+\n+\targs.ops = VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2_CAPS;\n+\targs.in_args = NULL;\n+\targs.in_args_size = 0;\n+\targs.out_buffer = vf->aq_resp;\n+\targs.out_size = IAVF_AQ_BUF_SZ;\n+\n+\tret = iavf_execute_vf_cmd(adapter, &args);\n+\tif (ret) {\n+\t\tPMD_DRV_LOG(ERR,\n+\t\t\t    \"Failed to execute command of VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2_CAPS\");\n+\t\treturn ret;\n+\t}\n+\n+\trte_memcpy(&vf->vlan_v2_caps, vf->aq_resp, sizeof(vf->vlan_v2_caps));\n+\n+\treturn 0;\n+}\n+\n int\n iavf_enable_queues(struct iavf_adapter *adapter)\n {\n",
    "prefixes": [
        "v5",
        "4/4"
    ]
}