get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 119221,
    "url": "http://patchwork.dpdk.org/api/patches/119221/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20221027074729.1494529-8-junfeng.guo@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": "<20221027074729.1494529-8-junfeng.guo@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20221027074729.1494529-8-junfeng.guo@intel.com",
    "date": "2022-10-27T07:47:18",
    "name": "[v14,07/18] net/idpf: add support for queue stop",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "2f15d23e9a40c11972f262f35ec04d876f310f29",
    "submitter": {
        "id": 1785,
        "url": "http://patchwork.dpdk.org/api/people/1785/?format=api",
        "name": "Junfeng Guo",
        "email": "junfeng.guo@intel.com"
    },
    "delegate": {
        "id": 3961,
        "url": "http://patchwork.dpdk.org/api/users/3961/?format=api",
        "username": "arybchenko",
        "first_name": "Andrew",
        "last_name": "Rybchenko",
        "email": "andrew.rybchenko@oktetlabs.ru"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20221027074729.1494529-8-junfeng.guo@intel.com/mbox/",
    "series": [
        {
            "id": 25451,
            "url": "http://patchwork.dpdk.org/api/series/25451/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=25451",
            "date": "2022-10-27T07:47:11",
            "name": "add support for idpf PMD in DPDK",
            "version": 14,
            "mbox": "http://patchwork.dpdk.org/series/25451/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/119221/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/119221/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 9C9C2A00C5;\n\tThu, 27 Oct 2022 09:50:26 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C0AE042BF0;\n\tThu, 27 Oct 2022 09:49:41 +0200 (CEST)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by mails.dpdk.org (Postfix) with ESMTP id 5B7E042BDB\n for <dev@dpdk.org>; Thu, 27 Oct 2022 09:49:29 +0200 (CEST)",
            "from orsmga004.jf.intel.com ([10.7.209.38])\n by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 27 Oct 2022 00:49:28 -0700",
            "from dpdk-jf-ntb-one.sh.intel.com ([10.67.111.104])\n by orsmga004.jf.intel.com with ESMTP; 27 Oct 2022 00:49:26 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1666856969; x=1698392969;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=/Es+CoGIxeNx41ZrQPlbyE8TW+V/mfIWG0rTCqTxr5c=;\n b=TupyEN2RolrYvowK+Jy3q+SiE2hhXDACCTXhtlonFd9r0pR1yf4TNZtJ\n xoEIRln/A7QrQYAvck0eNkaWKW0Q6NRQJ0O0Xdkmbkc8K+kAkedhWfceQ\n NIFnumTLdd+c+kTfcLopBLIPnpmFt5turNzyKkhvqJwb1lBgaOAT8Ps/h\n nD8LWy/a02hOy9KU0RTuoOpKsusH/qvjLCoDE2iqLB26f7oM3H5yP+QLL\n 9kTmxlkV+SORvtgTTXS2iLphoZBIhp0FVUIh5BuaNQhlQBfgfgImaBRfv\n QriWNyc9XWFkcQ78hbsodv2nVei1dloPt8N3xru4bIcou3D1cF6LBs3Kx w==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6500,9779,10512\"; a=\"287873164\"",
            "E=Sophos;i=\"5.95,217,1661842800\"; d=\"scan'208\";a=\"287873164\"",
            "E=McAfee;i=\"6500,9779,10512\"; a=\"757607697\"",
            "E=Sophos;i=\"5.95,217,1661842800\"; d=\"scan'208\";a=\"757607697\""
        ],
        "X-ExtLoop1": "1",
        "From": "Junfeng Guo <junfeng.guo@intel.com>",
        "To": "andrew.rybchenko@oktetlabs.ru, qi.z.zhang@intel.com,\n jingjing.wu@intel.com,\n beilei.xing@intel.com",
        "Cc": "dev@dpdk.org, Junfeng Guo <junfeng.guo@intel.com>,\n Xiaoyun Li <xiaoyun.li@intel.com>",
        "Subject": "[PATCH v14 07/18] net/idpf: add support for queue stop",
        "Date": "Thu, 27 Oct 2022 15:47:18 +0800",
        "Message-Id": "<20221027074729.1494529-8-junfeng.guo@intel.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20221027074729.1494529-1-junfeng.guo@intel.com>",
        "References": "<20221027054505.1369248-2-junfeng.guo@intel.com>\n <20221027074729.1494529-1-junfeng.guo@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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"
    },
    "content": "Add support for these device ops:\n - rx_queue_stop\n - tx_queue_stop\n\nSigned-off-by: Beilei Xing <beilei.xing@intel.com>\nSigned-off-by: Xiaoyun Li <xiaoyun.li@intel.com>\nSigned-off-by: Junfeng Guo <junfeng.guo@intel.com>\n---\n doc/guides/nics/features/idpf.ini |   1 +\n drivers/net/idpf/idpf_ethdev.c    |  14 ++-\n drivers/net/idpf/idpf_rxtx.c      | 148 ++++++++++++++++++++++++++++++\n drivers/net/idpf/idpf_rxtx.h      |  13 +++\n drivers/net/idpf/idpf_vchnl.c     |  69 ++++++++++++++\n 5 files changed, 241 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/doc/guides/nics/features/idpf.ini b/doc/guides/nics/features/idpf.ini\nindex 46aab2eb61..c25fa5de3f 100644\n--- a/doc/guides/nics/features/idpf.ini\n+++ b/doc/guides/nics/features/idpf.ini\n@@ -4,6 +4,7 @@\n ; Refer to default.ini for the full list of available PMD features.\n ;\n [Features]\n+Queue start/stop     = Y\n Linux                = Y\n x86-32               = Y\n x86-64               = Y\ndiff --git a/drivers/net/idpf/idpf_ethdev.c b/drivers/net/idpf/idpf_ethdev.c\nindex abbf519977..05f087a03c 100644\n--- a/drivers/net/idpf/idpf_ethdev.c\n+++ b/drivers/net/idpf/idpf_ethdev.c\n@@ -59,7 +59,9 @@ static const struct eth_dev_ops idpf_eth_dev_ops = {\n \t.dev_stop\t\t\t= idpf_dev_stop,\n \t.dev_close\t\t\t= idpf_dev_close,\n \t.rx_queue_start\t\t\t= idpf_rx_queue_start,\n+\t.rx_queue_stop\t\t\t= idpf_rx_queue_stop,\n \t.tx_queue_start\t\t\t= idpf_tx_queue_start,\n+\t.tx_queue_stop\t\t\t= idpf_tx_queue_stop,\n \t.rx_queue_setup\t\t\t= idpf_rx_queue_setup,\n \t.tx_queue_setup\t\t\t= idpf_tx_queue_setup,\n \t.dev_infos_get\t\t\t= idpf_dev_info_get,\n@@ -347,22 +349,26 @@ idpf_dev_start(struct rte_eth_dev *dev)\n \n \tif (dev->data->mtu > vport->max_mtu) {\n \t\tPMD_DRV_LOG(ERR, \"MTU should be less than %d\", vport->max_mtu);\n-\t\treturn -1;\n+\t\tgoto err_mtu;\n \t}\n \n \tvport->max_pkt_len = dev->data->mtu + IDPF_ETH_OVERHEAD;\n \n \tif (idpf_start_queues(dev) != 0) {\n \t\tPMD_DRV_LOG(ERR, \"Failed to start queues\");\n-\t\treturn -1;\n+\t\tgoto err_mtu;\n \t}\n \n \tif (idpf_vc_ena_dis_vport(vport, true) != 0) {\n \t\tPMD_DRV_LOG(ERR, \"Failed to enable vport\");\n-\t\treturn -1;\n+\t\tgoto err_vport;\n \t}\n \n \treturn 0;\n+err_vport:\n+\tidpf_stop_queues(dev);\n+err_mtu:\n+\treturn -1;\n }\n \n static int\n@@ -372,7 +378,7 @@ idpf_dev_stop(struct rte_eth_dev *dev)\n \n \tidpf_vc_ena_dis_vport(vport, false);\n \n-\t/* TODO: stop queues */\n+\tidpf_stop_queues(dev);\n \n \treturn 0;\n }\ndiff --git a/drivers/net/idpf/idpf_rxtx.c b/drivers/net/idpf/idpf_rxtx.c\nindex 6d954afd9d..8d5ec41a1f 100644\n--- a/drivers/net/idpf/idpf_rxtx.c\n+++ b/drivers/net/idpf/idpf_rxtx.c\n@@ -71,6 +71,55 @@ check_tx_thresh(uint16_t nb_desc, uint16_t tx_rs_thresh,\n \treturn 0;\n }\n \n+static void\n+release_rxq_mbufs(struct idpf_rx_queue *rxq)\n+{\n+\tuint16_t i;\n+\n+\tif (rxq->sw_ring == NULL)\n+\t\treturn;\n+\n+\tfor (i = 0; i < rxq->nb_rx_desc; i++) {\n+\t\tif (rxq->sw_ring[i] != NULL) {\n+\t\t\trte_pktmbuf_free_seg(rxq->sw_ring[i]);\n+\t\t\trxq->sw_ring[i] = NULL;\n+\t\t}\n+\t}\n+}\n+\n+static void\n+release_txq_mbufs(struct idpf_tx_queue *txq)\n+{\n+\tuint16_t nb_desc, i;\n+\n+\tif (txq == NULL || txq->sw_ring == NULL) {\n+\t\tPMD_DRV_LOG(DEBUG, \"Pointer to rxq or sw_ring is NULL\");\n+\t\treturn;\n+\t}\n+\n+\tif (txq->sw_nb_desc != 0) {\n+\t\t/* For split queue model, descriptor ring */\n+\t\tnb_desc = txq->sw_nb_desc;\n+\t} else {\n+\t\t/* For single queue model */\n+\t\tnb_desc = txq->nb_tx_desc;\n+\t}\n+\tfor (i = 0; i < nb_desc; i++) {\n+\t\tif (txq->sw_ring[i].mbuf != NULL) {\n+\t\t\trte_pktmbuf_free_seg(txq->sw_ring[i].mbuf);\n+\t\t\ttxq->sw_ring[i].mbuf = NULL;\n+\t\t}\n+\t}\n+}\n+\n+static const struct idpf_rxq_ops def_rxq_ops = {\n+\t.release_mbufs = release_rxq_mbufs,\n+};\n+\n+static const struct idpf_txq_ops def_txq_ops = {\n+\t.release_mbufs = release_txq_mbufs,\n+};\n+\n static void\n reset_split_rx_descq(struct idpf_rx_queue *rxq)\n {\n@@ -122,6 +171,14 @@ reset_split_rx_bufq(struct idpf_rx_queue *rxq)\n \trxq->bufq2 = NULL;\n }\n \n+static inline void\n+reset_split_rx_queue(struct idpf_rx_queue *rxq)\n+{\n+\treset_split_rx_descq(rxq);\n+\treset_split_rx_bufq(rxq->bufq1);\n+\treset_split_rx_bufq(rxq->bufq2);\n+}\n+\n static void\n reset_single_rx_queue(struct idpf_rx_queue *rxq)\n {\n@@ -301,6 +358,7 @@ idpf_rx_split_bufq_setup(struct rte_eth_dev *dev, struct idpf_rx_queue *bufq,\n \tbufq->q_set = true;\n \tbufq->qrx_tail = hw->hw_addr + (vport->chunks_info.rx_buf_qtail_start +\n \t\t\t queue_idx * vport->chunks_info.rx_buf_qtail_spacing);\n+\tbufq->ops = &def_rxq_ops;\n \n \t/* TODO: allow bulk or vec */\n \n@@ -527,6 +585,7 @@ idpf_rx_single_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,\n \tdev->data->rx_queues[queue_idx] = rxq;\n \trxq->qrx_tail = hw->hw_addr + (vport->chunks_info.rx_qtail_start +\n \t\t\tqueue_idx * vport->chunks_info.rx_qtail_spacing);\n+\trxq->ops = &def_rxq_ops;\n \n \treturn 0;\n }\n@@ -621,6 +680,7 @@ idpf_tx_split_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,\n \treset_split_tx_descq(txq);\n \ttxq->qtx_tail = hw->hw_addr + (vport->chunks_info.tx_qtail_start +\n \t\t\tqueue_idx * vport->chunks_info.tx_qtail_spacing);\n+\ttxq->ops = &def_txq_ops;\n \n \t/* Allocate the TX completion queue data structure. */\n \ttxq->complq = rte_zmalloc_socket(\"idpf splitq cq\",\n@@ -748,6 +808,7 @@ idpf_tx_single_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,\n \tdev->data->tx_queues[queue_idx] = txq;\n \ttxq->qtx_tail = hw->hw_addr + (vport->chunks_info.tx_qtail_start +\n \t\t\tqueue_idx * vport->chunks_info.tx_qtail_spacing);\n+\ttxq->ops = &def_txq_ops;\n \n \treturn 0;\n }\n@@ -979,3 +1040,90 @@ idpf_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id)\n \n \treturn err;\n }\n+\n+int\n+idpf_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)\n+{\n+\tstruct idpf_vport *vport = dev->data->dev_private;\n+\tstruct idpf_rx_queue *rxq;\n+\tint err;\n+\n+\tif (rx_queue_id >= dev->data->nb_rx_queues)\n+\t\treturn -EINVAL;\n+\n+\terr = idpf_switch_queue(vport, rx_queue_id, true, false);\n+\tif (err != 0) {\n+\t\tPMD_DRV_LOG(ERR, \"Failed to switch RX queue %u off\",\n+\t\t\t    rx_queue_id);\n+\t\treturn err;\n+\t}\n+\n+\trxq = dev->data->rx_queues[rx_queue_id];\n+\tif (vport->rxq_model == VIRTCHNL2_QUEUE_MODEL_SINGLE) {\n+\t\trxq->ops->release_mbufs(rxq);\n+\t\treset_single_rx_queue(rxq);\n+\t} else {\n+\t\trxq->bufq1->ops->release_mbufs(rxq->bufq1);\n+\t\trxq->bufq2->ops->release_mbufs(rxq->bufq2);\n+\t\treset_split_rx_queue(rxq);\n+\t}\n+\tdev->data->rx_queue_state[rx_queue_id] = RTE_ETH_QUEUE_STATE_STOPPED;\n+\n+\treturn 0;\n+}\n+\n+int\n+idpf_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)\n+{\n+\tstruct idpf_vport *vport = dev->data->dev_private;\n+\tstruct idpf_tx_queue *txq;\n+\tint err;\n+\n+\tif (tx_queue_id >= dev->data->nb_tx_queues)\n+\t\treturn -EINVAL;\n+\n+\terr = idpf_switch_queue(vport, tx_queue_id, false, false);\n+\tif (err != 0) {\n+\t\tPMD_DRV_LOG(ERR, \"Failed to switch TX queue %u off\",\n+\t\t\t    tx_queue_id);\n+\t\treturn err;\n+\t}\n+\n+\ttxq = dev->data->tx_queues[tx_queue_id];\n+\ttxq->ops->release_mbufs(txq);\n+\tif (vport->txq_model == VIRTCHNL2_QUEUE_MODEL_SINGLE) {\n+\t\treset_single_tx_queue(txq);\n+\t} else {\n+\t\treset_split_tx_descq(txq);\n+\t\treset_split_tx_complq(txq->complq);\n+\t}\n+\tdev->data->tx_queue_state[tx_queue_id] = RTE_ETH_QUEUE_STATE_STOPPED;\n+\n+\treturn 0;\n+}\n+\n+void\n+idpf_stop_queues(struct rte_eth_dev *dev)\n+{\n+\tstruct idpf_rx_queue *rxq;\n+\tstruct idpf_tx_queue *txq;\n+\tint i;\n+\n+\tfor (i = 0; i < dev->data->nb_rx_queues; i++) {\n+\t\trxq = dev->data->rx_queues[i];\n+\t\tif (rxq == NULL)\n+\t\t\tcontinue;\n+\n+\t\tif (idpf_rx_queue_stop(dev, i) != 0)\n+\t\t\tPMD_DRV_LOG(WARNING, \"Fail to stop Rx queue %d\", i);\n+\t}\n+\n+\tfor (i = 0; i < dev->data->nb_tx_queues; i++) {\n+\t\ttxq = dev->data->tx_queues[i];\n+\t\tif (txq == NULL)\n+\t\t\tcontinue;\n+\n+\t\tif (idpf_tx_queue_stop(dev, i) != 0)\n+\t\t\tPMD_DRV_LOG(WARNING, \"Fail to stop Tx queue %d\", i);\n+\t}\n+}\ndiff --git a/drivers/net/idpf/idpf_rxtx.h b/drivers/net/idpf/idpf_rxtx.h\nindex ab9b3830fd..b959638489 100644\n--- a/drivers/net/idpf/idpf_rxtx.h\n+++ b/drivers/net/idpf/idpf_rxtx.h\n@@ -51,6 +51,7 @@ struct idpf_rx_queue {\n \tbool q_set;             /* if rx queue has been configured */\n \tbool q_started;         /* if rx queue has been started */\n \tbool rx_deferred_start; /* don't start this queue in dev start */\n+\tconst struct idpf_rxq_ops *ops;\n \n \t/* only valid for split queue mode */\n \tuint8_t expected_gen_id;\n@@ -97,6 +98,7 @@ struct idpf_tx_queue {\n \tbool q_set;\t\t/* if tx queue has been configured */\n \tbool q_started;\t\t/* if tx queue has been started */\n \tbool tx_deferred_start; /* don't start this queue in dev start */\n+\tconst struct idpf_txq_ops *ops;\n \n \t/* only valid for split queue mode */\n \tuint16_t sw_nb_desc;\n@@ -107,16 +109,27 @@ struct idpf_tx_queue {\n \tstruct idpf_tx_queue *complq;\n };\n \n+struct idpf_rxq_ops {\n+\tvoid (*release_mbufs)(struct idpf_rx_queue *rxq);\n+};\n+\n+struct idpf_txq_ops {\n+\tvoid (*release_mbufs)(struct idpf_tx_queue *txq);\n+};\n+\n int idpf_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,\n \t\t\tuint16_t nb_desc, unsigned int socket_id,\n \t\t\tconst struct rte_eth_rxconf *rx_conf,\n \t\t\tstruct rte_mempool *mp);\n int idpf_rx_queue_init(struct rte_eth_dev *dev, uint16_t rx_queue_id);\n int idpf_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id);\n+int idpf_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id);\n int idpf_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,\n \t\t\tuint16_t nb_desc, unsigned int socket_id,\n \t\t\tconst struct rte_eth_txconf *tx_conf);\n int idpf_tx_queue_init(struct rte_eth_dev *dev, uint16_t tx_queue_id);\n int idpf_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id);\n+int idpf_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id);\n \n+void idpf_stop_queues(struct rte_eth_dev *dev);\n #endif /* _IDPF_RXTX_H_ */\ndiff --git a/drivers/net/idpf/idpf_vchnl.c b/drivers/net/idpf/idpf_vchnl.c\nindex 11d915cf4e..1ba59929a0 100644\n--- a/drivers/net/idpf/idpf_vchnl.c\n+++ b/drivers/net/idpf/idpf_vchnl.c\n@@ -887,6 +887,75 @@ idpf_switch_queue(struct idpf_vport *vport, uint16_t qid,\n \treturn err;\n }\n \n+#define IDPF_RXTX_QUEUE_CHUNKS_NUM\t2\n+int\n+idpf_vc_ena_dis_queues(struct idpf_vport *vport, bool enable)\n+{\n+\tstruct idpf_adapter *adapter = vport->adapter;\n+\tstruct virtchnl2_del_ena_dis_queues *queue_select;\n+\tstruct virtchnl2_queue_chunk *queue_chunk;\n+\tuint32_t type;\n+\tstruct idpf_cmd_info args;\n+\tuint16_t num_chunks;\n+\tint err, len;\n+\n+\tnum_chunks = IDPF_RXTX_QUEUE_CHUNKS_NUM;\n+\tif (vport->txq_model == VIRTCHNL2_QUEUE_MODEL_SPLIT)\n+\t\tnum_chunks++;\n+\tif (vport->rxq_model == VIRTCHNL2_QUEUE_MODEL_SPLIT)\n+\t\tnum_chunks++;\n+\n+\tlen = sizeof(struct virtchnl2_del_ena_dis_queues) +\n+\t\tsizeof(struct virtchnl2_queue_chunk) * (num_chunks - 1);\n+\tqueue_select = rte_zmalloc(\"queue_select\", len, 0);\n+\tif (queue_select == NULL)\n+\t\treturn -ENOMEM;\n+\n+\tqueue_chunk = queue_select->chunks.chunks;\n+\tqueue_select->chunks.num_chunks = num_chunks;\n+\tqueue_select->vport_id = vport->vport_id;\n+\n+\ttype = VIRTCHNL_QUEUE_TYPE_RX;\n+\tqueue_chunk[type].type = type;\n+\tqueue_chunk[type].start_queue_id = vport->chunks_info.rx_start_qid;\n+\tqueue_chunk[type].num_queues = vport->num_rx_q;\n+\n+\ttype = VIRTCHNL2_QUEUE_TYPE_TX;\n+\tqueue_chunk[type].type = type;\n+\tqueue_chunk[type].start_queue_id = vport->chunks_info.tx_start_qid;\n+\tqueue_chunk[type].num_queues = vport->num_tx_q;\n+\n+\tif (vport->rxq_model == VIRTCHNL2_QUEUE_MODEL_SPLIT) {\n+\t\ttype = VIRTCHNL2_QUEUE_TYPE_RX_BUFFER;\n+\t\tqueue_chunk[type].type = type;\n+\t\tqueue_chunk[type].start_queue_id =\n+\t\t\tvport->chunks_info.rx_buf_start_qid;\n+\t\tqueue_chunk[type].num_queues = vport->num_rx_bufq;\n+\t}\n+\n+\tif (vport->txq_model == VIRTCHNL2_QUEUE_MODEL_SPLIT) {\n+\t\ttype = VIRTCHNL2_QUEUE_TYPE_TX_COMPLETION;\n+\t\tqueue_chunk[type].type = type;\n+\t\tqueue_chunk[type].start_queue_id =\n+\t\t\tvport->chunks_info.tx_compl_start_qid;\n+\t\tqueue_chunk[type].num_queues = vport->num_tx_complq;\n+\t}\n+\n+\targs.ops = enable ? VIRTCHNL2_OP_ENABLE_QUEUES :\n+\t\tVIRTCHNL2_OP_DISABLE_QUEUES;\n+\targs.in_args = (u8 *)queue_select;\n+\targs.in_args_size = len;\n+\targs.out_buffer = adapter->mbx_resp;\n+\targs.out_size = IDPF_DFLT_MBX_BUF_SIZE;\n+\terr = idpf_execute_vc_cmd(adapter, &args);\n+\tif (err != 0)\n+\t\tPMD_DRV_LOG(ERR, \"Failed to execute command of VIRTCHNL2_OP_%s_QUEUES\",\n+\t\t\t    enable ? \"ENABLE\" : \"DISABLE\");\n+\n+\trte_free(queue_select);\n+\treturn err;\n+}\n+\n int\n idpf_vc_ena_dis_vport(struct idpf_vport *vport, bool enable)\n {\n",
    "prefixes": [
        "v14",
        "07/18"
    ]
}