Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/49095/?format=api
http://patches.dpdk.org/api/patches/49095/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20181219133743.57423-3-zhirun.yan@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": "<20181219133743.57423-3-zhirun.yan@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20181219133743.57423-3-zhirun.yan@intel.com", "date": "2018-12-19T13:37:42", "name": "[v8,2/3] net/i40e: support PF respond VF request more queues", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "8cbc4d99eafd0d35e57e23af1c6b8b58c7d45c45", "submitter": { "id": 1154, "url": "http://patches.dpdk.org/api/people/1154/?format=api", "name": "Yan, Zhirun", "email": "zhirun.yan@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/20181219133743.57423-3-zhirun.yan@intel.com/mbox/", "series": [ { "id": 2856, "url": "http://patches.dpdk.org/api/series/2856/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=2856", "date": "2018-12-19T13:37:40", "name": "Support request more queues", "version": 8, "mbox": "http://patches.dpdk.org/series/2856/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/49095/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/49095/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 0C63A1B81C;\n\tWed, 19 Dec 2018 07:02:28 +0100 (CET)", "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n\tby dpdk.org (Postfix) with ESMTP id 26B721B6B6\n\tfor <dev@dpdk.org>; Wed, 19 Dec 2018 07:02:23 +0100 (CET)", "from fmsmga008.fm.intel.com ([10.253.24.58])\n\tby orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t18 Dec 2018 22:02:22 -0800", "from dpdk-server.sh.intel.com ([10.67.110.170])\n\tby fmsmga008.fm.intel.com with ESMTP; 18 Dec 2018 22:02:20 -0800" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.56,371,1539673200\"; d=\"scan'208\";a=\"110558283\"", "From": "Zhirun Yan <zhirun.yan@intel.com>", "To": "dev@dpdk.org,\n\tqi.z.zhang@intel.com", "Cc": "Zhirun Yan <zhirun.yan@intel.com>,\n\tHaiyue Wang <haiyue.wang@intel.com>", "Date": "Wed, 19 Dec 2018 13:37:42 +0000", "Message-Id": "<20181219133743.57423-3-zhirun.yan@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20181219133743.57423-1-zhirun.yan@intel.com>", "References": "<20181219130856.19862-4-zhirun.yan@intel.com>\n\t<20181219133743.57423-1-zhirun.yan@intel.com>", "Subject": "[dpdk-dev] [PATCH v8 2/3] net/i40e: support PF respond VF request\n\tmore queues", "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "This patch respond the VIRTCHNL_OP_REQUEST_QUEUES msg from VF, and\nprocess to allocated more queues for the requested VF. If successful,\nPF will notify VF to reset. If unsuccessful, PF will send message to\ninform VF.\n\nSigned-off-by: Zhirun Yan <zhirun.yan@intel.com>\nSigned-off-by: Haiyue Wang <haiyue.wang@intel.com>\n---\n drivers/net/i40e/i40e_pf.c | 68 ++++++++++++++++++++++++++++++++++++++\n 1 file changed, 68 insertions(+)", "diff": "diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c\nindex dd3962d38..092e0d3e9 100644\n--- a/drivers/net/i40e/i40e_pf.c\n+++ b/drivers/net/i40e/i40e_pf.c\n@@ -1218,6 +1218,69 @@ i40e_notify_vf_link_status(struct rte_eth_dev *dev, struct i40e_pf_vf *vf)\n \t\t\tI40E_SUCCESS, (uint8_t *)&event, sizeof(event));\n }\n \n+/**\n+ * i40e_vc_notify_vf_reset\n+ * @vf: pointer to the VF structure\n+ *\n+ * indicate a pending reset to the given VF\n+ **/\n+static void\n+i40e_vc_notify_vf_reset(struct i40e_pf_vf *vf)\n+{\n+\tstruct i40e_hw *hw = I40E_PF_TO_HW(vf->pf);\n+\tstruct virtchnl_pf_event pfe;\n+\tint abs_vf_id;\n+\tuint16_t vf_id = vf->vf_idx;\n+\n+\tabs_vf_id = vf_id + hw->func_caps.vf_base_id;\n+\tpfe.event = VIRTCHNL_EVENT_RESET_IMPENDING;\n+\tpfe.severity = PF_EVENT_SEVERITY_CERTAIN_DOOM;\n+\ti40e_aq_send_msg_to_vf(hw, abs_vf_id, VIRTCHNL_OP_EVENT, 0, (u8 *)&pfe,\n+\t\t\t sizeof(struct virtchnl_pf_event), NULL);\n+}\n+\n+static int\n+i40e_pf_host_process_cmd_request_queues(struct i40e_pf_vf *vf, uint8_t *msg)\n+{\n+\tstruct virtchnl_vf_res_request *vfres =\n+\t\t(struct virtchnl_vf_res_request *)msg;\n+\tstruct i40e_pf *pf;\n+\tuint32_t req_pairs = vfres->num_queue_pairs;\n+\tuint32_t cur_pairs = vf->vsi->nb_used_qps;\n+\n+\tpf = vf->pf;\n+\n+\tif (req_pairs <= 0) {\n+\t\tPMD_DRV_LOG(ERR,\n+\t\t\t \"VF %d tried to request %d queues. Ignoring.\\n\",\n+\t\t\t vf->vf_idx,\n+\t\t\t I40E_MAX_QP_NUM_PER_VF);\n+\t} else if (req_pairs > I40E_MAX_QP_NUM_PER_VF) {\n+\t\tPMD_DRV_LOG(ERR,\n+\t\t\t \"VF %d tried to request more than %d queues.\\n\",\n+\t\t\t vf->vf_idx,\n+\t\t\t I40E_MAX_QP_NUM_PER_VF);\n+\t\tvfres->num_queue_pairs = I40E_MAX_QP_NUM_PER_VF;\n+\t} else if (req_pairs > cur_pairs + pf->qp_pool.num_free) {\n+\t\tPMD_DRV_LOG(ERR,\n+\t\t\t \"VF %d requested %d more queues, but noly %d left\\n\",\n+\t\t\t vf->vf_idx,\n+\t\t\t req_pairs - cur_pairs,\n+\t\t\t pf->qp_pool.num_free);\n+\t\tvfres->num_queue_pairs = pf->qp_pool.num_free + cur_pairs;\n+\t} else {\n+\t\ti40e_vc_notify_vf_reset(vf);\n+\t\tvf->vsi->nb_qps = req_pairs;\n+\t\tpf->vf_nb_qps = req_pairs;\n+\t\ti40e_pf_host_process_cmd_reset_vf(vf);\n+\n+\t\treturn 0;\n+\t}\n+\n+\treturn i40e_pf_host_send_msg_to_vf(vf, VIRTCHNL_OP_REQUEST_QUEUES, 0,\n+\t\t\t\t(u8 *)vfres, sizeof(*vfres));\n+}\n+\n void\n i40e_pf_host_handle_vf_msg(struct rte_eth_dev *dev,\n \t\t\t uint16_t abs_vf_id, uint32_t opcode,\n@@ -1351,6 +1414,11 @@ i40e_pf_host_handle_vf_msg(struct rte_eth_dev *dev,\n \t\tPMD_DRV_LOG(INFO, \"OP_CONFIG_RSS_KEY received\");\n \t\ti40e_pf_host_process_cmd_set_rss_key(vf, msg, msglen, b_op);\n \t\tbreak;\n+\tcase VIRTCHNL_OP_REQUEST_QUEUES:\n+\t\tPMD_DRV_LOG(INFO, \"OP_REQUEST_QUEUES received\");\n+\t\ti40e_pf_host_process_cmd_request_queues(vf, msg);\n+\t\tbreak;\n+\n \t/* Don't add command supported below, which will\n \t * return an error code.\n \t */\n", "prefixes": [ "v8", "2/3" ] }{ "id": 49095, "url": "