get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 80824,
    "url": "http://patches.dpdk.org/api/patches/80824/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20201015052143.4810-2-ting.xu@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": "<20201015052143.4810-2-ting.xu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201015052143.4810-2-ting.xu@intel.com",
    "date": "2020-10-15T05:21:42",
    "name": "[v4,1/2] net/iavf: add IAVF request queues function",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "d916ee75917f463a58d639181df1202c0a0ef4a9",
    "submitter": {
        "id": 1363,
        "url": "http://patches.dpdk.org/api/people/1363/?format=api",
        "name": "Xu, Ting",
        "email": "ting.xu@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "http://patches.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20201015052143.4810-2-ting.xu@intel.com/mbox/",
    "series": [
        {
            "id": 12984,
            "url": "http://patches.dpdk.org/api/series/12984/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=12984",
            "date": "2020-10-15T05:21:41",
            "name": "enable large VF configuration",
            "version": 4,
            "mbox": "http://patches.dpdk.org/series/12984/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/80824/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/80824/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id C8242A04DB;\n\tThu, 15 Oct 2020 07:18:26 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id D8D941DA97;\n\tThu, 15 Oct 2020 07:18:09 +0200 (CEST)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n by dpdk.org (Postfix) with ESMTP id CA5AA1D571\n for <dev@dpdk.org>; Thu, 15 Oct 2020 07:18:06 +0200 (CEST)",
            "from fmsmga004.fm.intel.com ([10.253.24.48])\n by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 14 Oct 2020 22:18:05 -0700",
            "from dpdk-xuting-second.sh.intel.com ([10.67.116.154])\n by fmsmga004.fm.intel.com with ESMTP; 14 Oct 2020 22:18:03 -0700"
        ],
        "IronPort-SDR": [
            "\n kgKGzSSuTj6F91S8w50mJepHtdMXfwDaju80hQf4hJXDzL0r3rbQY5guwvfkfH1AzeaplZTrC9\n b4lj8My4Lg0A==",
            "\n ttfW28Eat7J67OYro/bK8p6iPhmk3FgPJPikiOrfpstUejsCmRwDXmzIFWUojDNJRiRFcHIt6N\n 2QqGDJsXGHGw=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9774\"; a=\"166326606\"",
            "E=Sophos;i=\"5.77,377,1596524400\"; d=\"scan'208\";a=\"166326606\"",
            "E=Sophos;i=\"5.77,377,1596524400\"; d=\"scan'208\";a=\"345944257\""
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Ting Xu <ting.xu@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "qi.z.zhang@intel.com, beilei.xing@intel.com, jingjing.wu@intel.com,\n Ting Xu <ting.xu@intel.com>",
        "Date": "Thu, 15 Oct 2020 13:21:42 +0800",
        "Message-Id": "<20201015052143.4810-2-ting.xu@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20201015052143.4810-1-ting.xu@intel.com>",
        "References": "<20200909072028.16726-1-ting.xu@intel.com>\n <20201015052143.4810-1-ting.xu@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v4 1/2] net/iavf: add IAVF request queues function",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "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 new virtchnl function to request additional queues from PF. Current\ndefault queue pairs number when creating a VF is 16. In order to support\nup to 256 queue pairs, enable this request queues function.\nSince request queues command may return event message, modify function\niavf_read_msg_from_pf to identify event opcode and mark VF reset status.\n\nSigned-off-by: Ting Xu <ting.xu@intel.com>\n---\n drivers/net/iavf/iavf.h        |   9 ++\n drivers/net/iavf/iavf_ethdev.c |  11 +-\n drivers/net/iavf/iavf_vchnl.c  | 226 +++++++++++++++++++++++++--------\n 3 files changed, 192 insertions(+), 54 deletions(-)",
    "diff": "diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h\nindex d56611608..93c165c62 100644\n--- a/drivers/net/iavf/iavf.h\n+++ b/drivers/net/iavf/iavf.h\n@@ -107,6 +107,14 @@ struct iavf_fdir_info {\n /* TODO: is that correct to assume the max number to be 16 ?*/\n #define IAVF_MAX_MSIX_VECTORS   16\n \n+/* Message type read in admin queue from PF */\n+enum iavf_aq_result {\n+\tIAVF_MSG_ERR = -1, /* Meet error when accessing admin queue */\n+\tIAVF_MSG_NON,      /* Read nothing from admin queue */\n+\tIAVF_MSG_SYS,      /* Read system msg from admin queue */\n+\tIAVF_MSG_CMD,      /* Read async command result */\n+};\n+\n /* Structure to store private data specific for VF instance. */\n struct iavf_info {\n \tuint16_t num_queue_pairs;\n@@ -301,4 +309,5 @@ int iavf_add_del_rss_cfg(struct iavf_adapter *adapter,\n int iavf_add_del_mc_addr_list(struct iavf_adapter *adapter,\n \t\t\tstruct rte_ether_addr *mc_addrs,\n \t\t\tuint32_t mc_addrs_num, bool add);\n+int iavf_request_queues(struct iavf_adapter *adapter, uint16_t num);\n #endif /* _IAVF_ETHDEV_H_ */\ndiff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c\nindex 8b1cf8f1c..a4a28b885 100644\n--- a/drivers/net/iavf/iavf_ethdev.c\n+++ b/drivers/net/iavf/iavf_ethdev.c\n@@ -1282,7 +1282,7 @@ iavf_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)\n }\n \n static int\n-iavf_check_vf_reset_done(struct iavf_hw *hw)\n+iavf_check_vf_reset_done(struct iavf_hw *hw, struct iavf_info *vf)\n {\n \tint i, reset;\n \n@@ -1299,6 +1299,9 @@ iavf_check_vf_reset_done(struct iavf_hw *hw)\n \tif (i >= IAVF_RESET_WAIT_CNT)\n \t\treturn -1;\n \n+\t/* VF is not in reset or reset is completed */\n+\tvf->vf_reset = false;\n+\n \treturn 0;\n }\n \n@@ -1666,7 +1669,7 @@ iavf_init_vf(struct rte_eth_dev *dev)\n \t\tgoto err;\n \t}\n \n-\terr = iavf_check_vf_reset_done(hw);\n+\terr = iavf_check_vf_reset_done(hw, vf);\n \tif (err) {\n \t\tPMD_INIT_LOG(ERR, \"VF is still resetting\");\n \t\tgoto err;\n@@ -1911,7 +1914,9 @@ iavf_dev_close(struct rte_eth_dev *dev)\n \n \tiavf_dev_stop(dev);\n \tiavf_flow_flush(dev, NULL);\n-\tiavf_flow_uninit(adapter);\n+\t/* if VF is in reset, adminq is disabled, skip the process via adminq */\n+\tif (!vf->vf_reset)\n+\t\tiavf_flow_uninit(adapter);\n \n \t/*\n \t * disable promiscuous mode before reset vf\ndiff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c\nindex 5e7142893..11a1ff608 100644\n--- a/drivers/net/iavf/iavf_vchnl.c\n+++ b/drivers/net/iavf/iavf_vchnl.c\n@@ -17,6 +17,7 @@\n #include <rte_eal.h>\n #include <rte_ether.h>\n #include <rte_ethdev_driver.h>\n+#include <rte_ethdev_pci.h>\n #include <rte_dev.h>\n \n #include \"iavf.h\"\n@@ -25,14 +26,54 @@\n #define MAX_TRY_TIMES 200\n #define ASQ_DELAY_MS  10\n \n+static uint32_t\n+iavf_convert_link_speed(enum virtchnl_link_speed virt_link_speed)\n+{\n+\tuint32_t speed;\n+\n+\tswitch (virt_link_speed) {\n+\tcase VIRTCHNL_LINK_SPEED_100MB:\n+\t\tspeed = 100;\n+\t\tbreak;\n+\tcase VIRTCHNL_LINK_SPEED_1GB:\n+\t\tspeed = 1000;\n+\t\tbreak;\n+\tcase VIRTCHNL_LINK_SPEED_10GB:\n+\t\tspeed = 10000;\n+\t\tbreak;\n+\tcase VIRTCHNL_LINK_SPEED_40GB:\n+\t\tspeed = 40000;\n+\t\tbreak;\n+\tcase VIRTCHNL_LINK_SPEED_20GB:\n+\t\tspeed = 20000;\n+\t\tbreak;\n+\tcase VIRTCHNL_LINK_SPEED_25GB:\n+\t\tspeed = 25000;\n+\t\tbreak;\n+\tcase VIRTCHNL_LINK_SPEED_2_5GB:\n+\t\tspeed = 2500;\n+\t\tbreak;\n+\tcase VIRTCHNL_LINK_SPEED_5GB:\n+\t\tspeed = 5000;\n+\t\tbreak;\n+\tdefault:\n+\t\tspeed = 0;\n+\t\tbreak;\n+\t}\n+\n+\treturn speed;\n+}\n+\n /* Read data in admin queue to get msg from pf driver */\n-static enum iavf_status\n+static enum iavf_aq_result\n iavf_read_msg_from_pf(struct iavf_adapter *adapter, uint16_t buf_len,\n \t\t     uint8_t *buf)\n {\n \tstruct iavf_hw *hw = IAVF_DEV_PRIVATE_TO_HW(adapter);\n \tstruct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);\n+\tstruct rte_eth_dev *dev = adapter->eth_dev;\n \tstruct iavf_arq_event_info event;\n+\tenum iavf_aq_result result = IAVF_MSG_NON;\n \tenum virtchnl_ops opcode;\n \tint ret;\n \n@@ -42,7 +83,9 @@ iavf_read_msg_from_pf(struct iavf_adapter *adapter, uint16_t buf_len,\n \t/* Can't read any msg from adminQ */\n \tif (ret) {\n \t\tPMD_DRV_LOG(DEBUG, \"Can't read msg from AQ\");\n-\t\treturn ret;\n+\t\tif (ret != IAVF_ERR_ADMIN_QUEUE_NO_WORK)\n+\t\t\tresult = IAVF_MSG_ERR;\n+\t\treturn result;\n \t}\n \n \topcode = (enum virtchnl_ops)rte_le_to_cpu_32(event.desc.cookie_high);\n@@ -52,16 +95,51 @@ iavf_read_msg_from_pf(struct iavf_adapter *adapter, uint16_t buf_len,\n \tPMD_DRV_LOG(DEBUG, \"AQ from pf carries opcode %u, retval %d\",\n \t\t    opcode, vf->cmd_retval);\n \n-\tif (opcode != vf->pend_cmd) {\n-\t\tif (opcode != VIRTCHNL_OP_EVENT) {\n-\t\t\tPMD_DRV_LOG(WARNING,\n-\t\t\t\t    \"command mismatch, expect %u, get %u\",\n-\t\t\t\t    vf->pend_cmd, opcode);\n+\tif (opcode == VIRTCHNL_OP_EVENT) {\n+\t\tstruct virtchnl_pf_event *vpe =\n+\t\t\t(struct virtchnl_pf_event *)event.msg_buf;\n+\n+\t\tresult = IAVF_MSG_SYS;\n+\t\tswitch (vpe->event) {\n+\t\tcase VIRTCHNL_EVENT_LINK_CHANGE:\n+\t\t\tvf->link_up =\n+\t\t\t\tvpe->event_data.link_event.link_status;\n+\t\t\tif (vf->vf_res->vf_cap_flags &\n+\t\t\t\tVIRTCHNL_VF_CAP_ADV_LINK_SPEED) {\n+\t\t\t\tvf->link_speed =\n+\t\t\t\t    vpe->event_data.link_event_adv.link_speed;\n+\t\t\t} else {\n+\t\t\t\tenum virtchnl_link_speed speed;\n+\t\t\t\tspeed = vpe->event_data.link_event.link_speed;\n+\t\t\t\tvf->link_speed = iavf_convert_link_speed(speed);\n+\t\t\t}\n+\t\t\tiavf_dev_link_update(dev, 0);\n+\t\t\tPMD_DRV_LOG(INFO, \"Link status update:%s\",\n+\t\t\t\t\tvf->link_up ? \"up\" : \"down\");\n+\t\t\tbreak;\n+\t\tcase VIRTCHNL_EVENT_RESET_IMPENDING:\n+\t\t\tvf->vf_reset = true;\n+\t\t\tPMD_DRV_LOG(INFO, \"VF is resetting\");\n+\t\t\tbreak;\n+\t\tcase VIRTCHNL_EVENT_PF_DRIVER_CLOSE:\n+\t\t\tvf->dev_closed = true;\n+\t\t\tPMD_DRV_LOG(INFO, \"PF driver closed\");\n+\t\t\tbreak;\n+\t\tdefault:\n+\t\t\tPMD_DRV_LOG(ERR, \"%s: Unknown event %d from pf\",\n+\t\t\t\t\t__func__, vpe->event);\n+\t\t}\n+\t}  else {\n+\t\t/* async reply msg on command issued by vf previously */\n+\t\tresult = IAVF_MSG_CMD;\n+\t\tif (opcode != vf->pend_cmd) {\n+\t\t\tPMD_DRV_LOG(WARNING, \"command mismatch, expect %u, get %u\",\n+\t\t\t\t\tvf->pend_cmd, opcode);\n+\t\t\tresult = IAVF_MSG_ERR;\n \t\t}\n-\t\treturn IAVF_ERR_OPCODE_MISMATCH;\n \t}\n \n-\treturn IAVF_SUCCESS;\n+\treturn result;\n }\n \n static int\n@@ -69,6 +147,7 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args)\n {\n \tstruct iavf_hw *hw = IAVF_DEV_PRIVATE_TO_HW(adapter);\n \tstruct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);\n+\tenum iavf_aq_result result;\n \tenum iavf_status ret;\n \tint err = 0;\n \tint i = 0;\n@@ -97,9 +176,9 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args)\n \tcase VIRTCHNL_OP_GET_SUPPORTED_RXDIDS:\n \t\t/* for init virtchnl ops, need to poll the response */\n \t\tdo {\n-\t\t\tret = iavf_read_msg_from_pf(adapter, args->out_size,\n+\t\t\tresult = iavf_read_msg_from_pf(adapter, args->out_size,\n \t\t\t\t\t\t   args->out_buffer);\n-\t\t\tif (ret == IAVF_SUCCESS)\n+\t\t\tif (result == IAVF_MSG_CMD)\n \t\t\t\tbreak;\n \t\t\trte_delay_ms(ASQ_DELAY_MS);\n \t\t} while (i++ < MAX_TRY_TIMES);\n@@ -111,7 +190,33 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args)\n \t\t}\n \t\t_clear_cmd(vf);\n \t\tbreak;\n-\n+\tcase VIRTCHNL_OP_REQUEST_QUEUES:\n+\t\t/*\n+\t\t * ignore async reply, only wait for system message,\n+\t\t * vf_reset = true if get VIRTCHNL_EVENT_RESET_IMPENDING,\n+\t\t * if not, means request queues failed.\n+\t\t */\n+\t\tdo {\n+\t\t\tresult = iavf_read_msg_from_pf(adapter, args->out_size,\n+\t\t\t\t\t\t   args->out_buffer);\n+\t\t\tif (result == IAVF_MSG_SYS && vf->vf_reset) {\n+\t\t\t\tbreak;\n+\t\t\t} else if (result == IAVF_MSG_CMD ||\n+\t\t\t\tresult == IAVF_MSG_ERR) {\n+\t\t\t\terr = -1;\n+\t\t\t\tbreak;\n+\t\t\t}\n+\t\t\trte_delay_ms(ASQ_DELAY_MS);\n+\t\t\t/* If don't read msg or read sys event, continue */\n+\t\t} while (i++ < MAX_TRY_TIMES);\n+\t\tif (i >= MAX_TRY_TIMES ||\n+\t\t    vf->cmd_retval != VIRTCHNL_STATUS_SUCCESS) {\n+\t\t\terr = -1;\n+\t\t\tPMD_DRV_LOG(ERR, \"No response or return failure (%d)\"\n+\t\t\t\t    \" for cmd %d\", vf->cmd_retval, args->ops);\n+\t\t}\n+\t\t_clear_cmd(vf);\n+\t\tbreak;\n \tdefault:\n \t\t/* For other virtchnl ops in running time,\n \t\t * wait for the cmd done flag.\n@@ -136,44 +241,6 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args)\n \treturn err;\n }\n \n-static uint32_t\n-iavf_convert_link_speed(enum virtchnl_link_speed virt_link_speed)\n-{\n-\tuint32_t speed;\n-\n-\tswitch (virt_link_speed) {\n-\tcase VIRTCHNL_LINK_SPEED_100MB:\n-\t\tspeed = 100;\n-\t\tbreak;\n-\tcase VIRTCHNL_LINK_SPEED_1GB:\n-\t\tspeed = 1000;\n-\t\tbreak;\n-\tcase VIRTCHNL_LINK_SPEED_10GB:\n-\t\tspeed = 10000;\n-\t\tbreak;\n-\tcase VIRTCHNL_LINK_SPEED_40GB:\n-\t\tspeed = 40000;\n-\t\tbreak;\n-\tcase VIRTCHNL_LINK_SPEED_20GB:\n-\t\tspeed = 20000;\n-\t\tbreak;\n-\tcase VIRTCHNL_LINK_SPEED_25GB:\n-\t\tspeed = 25000;\n-\t\tbreak;\n-\tcase VIRTCHNL_LINK_SPEED_2_5GB:\n-\t\tspeed = 2500;\n-\t\tbreak;\n-\tcase VIRTCHNL_LINK_SPEED_5GB:\n-\t\tspeed = 5000;\n-\t\tbreak;\n-\tdefault:\n-\t\tspeed = 0;\n-\t\tbreak;\n-\t}\n-\n-\treturn speed;\n-}\n-\n static void\n iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg,\n \t\t\tuint16_t msglen)\n@@ -389,7 +456,8 @@ iavf_get_vf_resource(struct iavf_adapter *adapter)\n \tcaps = IAVF_BASIC_OFFLOAD_CAPS | VIRTCHNL_VF_CAP_ADV_LINK_SPEED |\n \t\tVIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC |\n \t\tVIRTCHNL_VF_OFFLOAD_FDIR_PF |\n-\t\tVIRTCHNL_VF_OFFLOAD_ADV_RSS_PF;\n+\t\tVIRTCHNL_VF_OFFLOAD_ADV_RSS_PF |\n+\t\tVIRTCHNL_VF_OFFLOAD_REQ_QUEUES;\n \n \targs.in_args = (uint8_t *)&caps;\n \targs.in_args_size = sizeof(caps);\n@@ -1148,3 +1216,59 @@ iavf_add_del_mc_addr_list(struct iavf_adapter *adapter,\n \n \treturn 0;\n }\n+\n+int\n+iavf_request_queues(struct iavf_adapter *adapter, uint16_t num)\n+{\n+\tstruct rte_eth_dev *dev = adapter->eth_dev;\n+\tstruct iavf_info *vf =  IAVF_DEV_PRIVATE_TO_VF(adapter);\n+\tstruct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);\n+\tstruct virtchnl_vf_res_request vfres;\n+\tstruct iavf_cmd_info args;\n+\tuint16_t num_queue_pairs;\n+\tint err;\n+\n+\tif (!(vf->vf_res->vf_cap_flags &\n+\t\tVIRTCHNL_VF_OFFLOAD_REQ_QUEUES)) {\n+\t\tPMD_DRV_LOG(ERR, \"request queues not supported\");\n+\t\treturn -1;\n+\t}\n+\n+\tif (num == 0) {\n+\t\tPMD_DRV_LOG(ERR, \"queue number cannot be zero\");\n+\t\treturn -1;\n+\t}\n+\tvfres.num_queue_pairs = num;\n+\n+\targs.ops = VIRTCHNL_OP_REQUEST_QUEUES;\n+\targs.in_args = (u8 *)&vfres;\n+\targs.in_args_size = sizeof(vfres);\n+\targs.out_buffer = vf->aq_resp;\n+\targs.out_size = IAVF_AQ_BUF_SZ;\n+\n+\t/*\n+\t * disable interrupt to avoid the admin queue message to be read\n+\t * before iavf_read_msg_from_pf.\n+\t */\n+\trte_intr_disable(&pci_dev->intr_handle);\n+\terr = iavf_execute_vf_cmd(adapter, &args);\n+\trte_intr_enable(&pci_dev->intr_handle);\n+\tif (err) {\n+\t\tPMD_DRV_LOG(ERR, \"fail to execute command OP_REQUEST_QUEUES\");\n+\t\treturn err;\n+\t}\n+\n+\t/* request queues succeeded, vf is resetting */\n+\tif (vf->vf_reset) {\n+\t\tPMD_DRV_LOG(INFO, \"vf is resetting\");\n+\t\treturn 0;\n+\t}\n+\n+\t/* request additional queues failed, return available number */\n+\tnum_queue_pairs =\n+\t  ((struct virtchnl_vf_res_request *)args.out_buffer)->num_queue_pairs;\n+\tPMD_DRV_LOG(ERR, \"request queues failed, only %u queues \"\n+\t\t\"available\", num_queue_pairs);\n+\n+\treturn -1;\n+}\n",
    "prefixes": [
        "v4",
        "1/2"
    ]
}