Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/109384/?format=api
http://patches.dpdk.org/api/patches/109384/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220407105706.18889-33-kevinx.liu@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": "<20220407105706.18889-33-kevinx.liu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20220407105706.18889-33-kevinx.liu@intel.com", "date": "2022-04-07T10:56:59", "name": "[32/39] net/ice: add DCF request queues function", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "a1bde1c496c723aeab1da720b3f9df25ba5c1592", "submitter": { "id": 2440, "url": "http://patches.dpdk.org/api/people/2440/?format=api", "name": "Kevin Liu", "email": "kevinx.liu@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/20220407105706.18889-33-kevinx.liu@intel.com/mbox/", "series": [ { "id": 22387, "url": "http://patches.dpdk.org/api/series/22387/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=22387", "date": "2022-04-07T10:56:27", "name": "support full function of DCF", "version": 1, "mbox": "http://patches.dpdk.org/series/22387/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/109384/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/109384/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 4D289A0508;\n\tThu, 7 Apr 2022 05:01:17 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 8A8FC42897;\n\tThu, 7 Apr 2022 04:59:47 +0200 (CEST)", "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n by mails.dpdk.org (Postfix) with ESMTP id 72E79428CF\n for <dev@dpdk.org>; Thu, 7 Apr 2022 04:59:45 +0200 (CEST)", "from orsmga008.jf.intel.com ([10.7.209.65])\n by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 06 Apr 2022 19:59:45 -0700", "from intel-cd-odc-kevin.cd.intel.com ([10.240.178.195])\n by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 06 Apr 2022 19:59:43 -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=1649300385; x=1680836385;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=6KzqEBVsvyg0i/PP2YE/43Tc7/hjP8rCs0NaDhIsKAA=;\n b=DW5GVwe6pEw3aq9nbRQdNAa/N1rol8y2oaT/RU3A8KAiJ0B80EUOT+Sv\n ympx3B9cjnshJAGPPwAlUS6ULX/06IocmNiHQSf/ZF5BUIL4EJ/tAKdIO\n 99h2uPNEfcb7mAEV8o4Gic3L8PLMWPjjUbVdH8N76W/ZEQfwspaTmFWKX\n Hcqtz5ePol+yCBm0sjwUV9yEMq8d8b9bHw4AA5GqbSOCaKG6T2ceBVpp6\n aLhAUQq3nUM3rQPTGCO9XwNwFb4bRT0keEigbNjZ+W0Bun/0tPXirNK4j\n lHmz8bJZAv3IZOsszvNrnpyACt9FXUwdzJyvNh37kq8pTBEQo7NUmn2eD g==;", "X-IronPort-AV": [ "E=McAfee;i=\"6200,9189,10309\"; a=\"248738492\"", "E=Sophos;i=\"5.90,241,1643702400\"; d=\"scan'208\";a=\"248738492\"", "E=Sophos;i=\"5.90,241,1643702400\"; d=\"scan'208\";a=\"570850798\"" ], "From": "Kevin Liu <kevinx.liu@intel.com>", "To": "dev@dpdk.org", "Cc": "qiming.yang@intel.com, qi.z.zhang@intel.com, stevex.yang@intel.com,\n Kevin Liu <kevinx.liu@intel.com>", "Subject": "[PATCH 32/39] net/ice: add DCF request queues function", "Date": "Thu, 7 Apr 2022 10:56:59 +0000", "Message-Id": "<20220407105706.18889-33-kevinx.liu@intel.com>", "X-Mailer": "git-send-email 2.33.1", "In-Reply-To": "<20220407105706.18889-1-kevinx.liu@intel.com>", "References": "<20220407105706.18889-1-kevinx.liu@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": "From: Steve Yang <stevex.yang@intel.com>\n\nAdd a new virtchnl function to request additional queues from PF. Current\ndefault queue pairs number is 16. In order to support up to 256 queue\npairs DCF port, enable this request queues function.\n\nSigned-off-by: Steve Yang <stevex.yang@intel.com>\nSigned-off-by: Kevin Liu <kevinx.liu@intel.com>\n---\n drivers/net/ice/ice_dcf.c | 98 +++++++++++++++++++++++++++++++++------\n drivers/net/ice/ice_dcf.h | 1 +\n 2 files changed, 86 insertions(+), 13 deletions(-)", "diff": "diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c\nindex 8c47f96341..2e651adda7 100644\n--- a/drivers/net/ice/ice_dcf.c\n+++ b/drivers/net/ice/ice_dcf.c\n@@ -257,7 +257,7 @@ ice_dcf_get_vf_resource(struct ice_dcf_hw *hw)\n \t VIRTCHNL_VF_CAP_ADV_LINK_SPEED | VIRTCHNL_VF_CAP_DCF |\n \t VIRTCHNL_VF_OFFLOAD_VLAN_V2 |\n \t VF_BASE_MODE_OFFLOADS | VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC |\n-\t VIRTCHNL_VF_OFFLOAD_QOS;\n+\t VIRTCHNL_VF_OFFLOAD_QOS | VIRTCHNL_VF_OFFLOAD_REQ_QUEUES;\n \n \terr = ice_dcf_send_cmd_req_no_irq(hw, VIRTCHNL_OP_GET_VF_RESOURCES,\n \t\t\t\t\t (uint8_t *)&caps, sizeof(caps));\n@@ -468,18 +468,38 @@ ice_dcf_execute_virtchnl_cmd(struct ice_dcf_hw *hw,\n \t\tgoto ret;\n \t}\n \n-\tdo {\n-\t\tif (!cmd->pending)\n-\t\t\tbreak;\n-\n-\t\trte_delay_ms(ICE_DCF_ARQ_CHECK_TIME);\n-\t} while (i++ < ICE_DCF_ARQ_MAX_RETRIES);\n-\n-\tif (cmd->v_ret != IAVF_SUCCESS) {\n-\t\terr = -1;\n-\t\tPMD_DRV_LOG(ERR,\n-\t\t\t \"No response (%d times) or return failure (%d) for cmd %d\",\n-\t\t\t i, cmd->v_ret, cmd->v_op);\n+\tswitch (cmd->v_op) {\n+\tcase VIRTCHNL_OP_REQUEST_QUEUES:\n+\t\terr = ice_dcf_recv_cmd_rsp_no_irq(hw,\n+\t\t\t\t\t\t VIRTCHNL_OP_REQUEST_QUEUES,\n+\t\t\t\t\t\t cmd->rsp_msgbuf,\n+\t\t\t\t\t\t cmd->rsp_buflen,\n+\t\t\t\t\t\t NULL);\n+\t\tif (err != IAVF_SUCCESS || !hw->resetting) {\n+\t\t\terr = -1;\n+\t\t\tPMD_DRV_LOG(ERR,\n+\t\t\t\t \"Failed to get response of \"\n+\t\t\t\t \"VIRTCHNL_OP_REQUEST_QUEUES %d\",\n+\t\t\t\t err);\n+\t\t}\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+\t\t */\n+\t\tdo {\n+\t\t\tif (!cmd->pending)\n+\t\t\t\tbreak;\n+\t\t\trte_delay_ms(ICE_DCF_ARQ_CHECK_TIME);\n+\t\t} while (i++ < ICE_DCF_ARQ_MAX_RETRIES);\n+\n+\t\tif (cmd->v_ret != IAVF_SUCCESS) {\n+\t\t\terr = -1;\n+\t\t\tPMD_DRV_LOG(ERR,\n+\t\t\t\t \"No response (%d times) or \"\n+\t\t\t\t \"return failure (%d) for cmd %d\",\n+\t\t\t\t i, cmd->v_ret, cmd->v_op);\n+\t\t}\n \t}\n \n ret:\n@@ -1012,6 +1032,58 @@ ice_dcf_configure_queues(struct ice_dcf_hw *hw)\n \treturn err;\n }\n \n+int\n+ice_dcf_request_queues(struct ice_dcf_hw *hw, uint16_t num)\n+{\n+\tstruct virtchnl_vf_res_request vfres;\n+\tstruct dcf_virtchnl_cmd args;\n+\tuint16_t num_queue_pairs;\n+\tint err;\n+\n+\tif (!(hw->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+\tmemset(&args, 0, sizeof(args));\n+\targs.v_op = VIRTCHNL_OP_REQUEST_QUEUES;\n+\n+\targs.req_msg = (u8 *)&vfres;\n+\targs.req_msglen = sizeof(vfres);\n+\n+\targs.rsp_msgbuf = hw->arq_buf;\n+\targs.rsp_msglen = ICE_DCF_AQ_BUF_SZ;\n+\targs.rsp_buflen = ICE_DCF_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(hw->eth_dev->intr_handle);\n+\terr = ice_dcf_execute_virtchnl_cmd(hw, &args);\n+\trte_intr_enable(hw->eth_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 additional queues failed, return available number */\n+\tnum_queue_pairs = ((struct virtchnl_vf_res_request *)\n+\t\t\t\targs.rsp_msgbuf)->num_queue_pairs;\n+\tPMD_DRV_LOG(ERR,\n+\t\t \"request queues failed, only %u queues available\",\n+\t\t num_queue_pairs);\n+\n+\treturn -1;\n+}\n+\n int\n ice_dcf_config_irq_map(struct ice_dcf_hw *hw)\n {\ndiff --git a/drivers/net/ice/ice_dcf.h b/drivers/net/ice/ice_dcf.h\nindex 42f4404a37..46e0010848 100644\n--- a/drivers/net/ice/ice_dcf.h\n+++ b/drivers/net/ice/ice_dcf.h\n@@ -129,6 +129,7 @@ int ice_dcf_configure_rss_key(struct ice_dcf_hw *hw);\n int ice_dcf_configure_rss_lut(struct ice_dcf_hw *hw);\n int ice_dcf_init_rss(struct ice_dcf_hw *hw);\n int ice_dcf_configure_queues(struct ice_dcf_hw *hw);\n+int ice_dcf_request_queues(struct ice_dcf_hw *hw, uint16_t num);\n int ice_dcf_config_irq_map(struct ice_dcf_hw *hw);\n int ice_dcf_switch_queue(struct ice_dcf_hw *hw, uint16_t qid, bool rx, bool on);\n int ice_dcf_disable_queues(struct ice_dcf_hw *hw);\n", "prefixes": [ "32/39" ] }{ "id": 109384, "url": "