Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/93188/?format=api
https://patches.dpdk.org/api/patches/93188/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210512071604.38696-1-alvinx.zhang@intel.com/", "project": { "id": 1, "url": "https://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": "<20210512071604.38696-1-alvinx.zhang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20210512071604.38696-1-alvinx.zhang@intel.com", "date": "2021-05-12T07:16:04", "name": "[v3] net/i40e: fix VF RSS configuration", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "482ad443df5b0a5a7eede46a719c62f0c9a928b6", "submitter": { "id": 1398, "url": "https://patches.dpdk.org/api/people/1398/?format=api", "name": "Alvin Zhang", "email": "alvinx.zhang@intel.com" }, "delegate": { "id": 1540, "url": "https://patches.dpdk.org/api/users/1540/?format=api", "username": "qzhan15", "first_name": "Qi", "last_name": "Zhang", "email": "qi.z.zhang@intel.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210512071604.38696-1-alvinx.zhang@intel.com/mbox/", "series": [ { "id": 16946, "url": "https://patches.dpdk.org/api/series/16946/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=16946", "date": "2021-05-12T07:16:04", "name": "[v3] net/i40e: fix VF RSS configuration", "version": 3, "mbox": "https://patches.dpdk.org/series/16946/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/93188/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/93188/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 19876A0C42;\n\tWed, 12 May 2021 09:16:19 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C3DFA410DE;\n\tWed, 12 May 2021 09:16:18 +0200 (CEST)", "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n by mails.dpdk.org (Postfix) with ESMTP id 85CEB4003E;\n Wed, 12 May 2021 09:16:17 +0200 (CEST)", "from fmsmga005.fm.intel.com ([10.253.24.32])\n by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 12 May 2021 00:16:14 -0700", "from shwdenpg235.ccr.corp.intel.com ([10.240.182.60])\n by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 12 May 2021 00:16:11 -0700" ], "IronPort-SDR": [ "\n ELvgQENB5niE8WWZtkjrUFM/PkgiI6TMjLKV0gfCsDVDi2rXOG3yRY4X/n905l40ki9Gqx2uTP\n TvWXEdRX780Q==", "\n nC2Q2BBdkuSVU6SOVJbOtL3AUprFDDQGMY0oUySAGBK3rsmEESNtMXnAJkat2Cl/bCZPAvsWIc\n f5OwGLO/EV5w==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6200,9189,9981\"; a=\"260890416\"", "E=Sophos;i=\"5.82,293,1613462400\"; d=\"scan'208\";a=\"260890416\"", "E=Sophos;i=\"5.82,293,1613462400\"; d=\"scan'208\";a=\"625141638\"" ], "From": "Alvin Zhang <alvinx.zhang@intel.com>", "To": "beilei.xing@intel.com,\n\tTing.Xu@intel.com", "Cc": "dev@dpdk.org,\n\tAlvin Zhang <alvinx.zhang@intel.com>,\n\tstable@dpdk.org", "Date": "Wed, 12 May 2021 15:16:04 +0800", "Message-Id": "<20210512071604.38696-1-alvinx.zhang@intel.com>", "X-Mailer": "git-send-email 2.21.0.windows.1", "In-Reply-To": "<20210512062648.32488-1-alvinx.zhang@intel.com>", "References": "<20210512062648.32488-1-alvinx.zhang@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v3] net/i40e: fix VF RSS configuration", "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 kernel driver supports VF RSS configuration message\n\"VIRTCHNL_OP_GET_RSS_HENA_CAPS and VIRTCHNL_OP_SET_RSS_HENA\",\nthis patch adds PMD support for these messages.\n\nFixes: b81295c474b0 (\"net/i40e: add user callback for VF to PF message\")\nCc: stable@dpdk.org\n\nSigned-off-by: Alvin Zhang <alvinx.zhang@intel.com>\n---\n\nv2, v3: Update codes according to comments.\n---\n drivers/net/i40e/i40e_pf.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 59 insertions(+)", "diff": "diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c\nindex 9804ed4..2e7a8ee 100644\n--- a/drivers/net/i40e/i40e_pf.c\n+++ b/drivers/net/i40e/i40e_pf.c\n@@ -29,6 +29,28 @@\n \n #define I40E_CFG_CRCSTRIP_DEFAULT 1\n \n+/* Supported RSS offloads */\n+#define I40E_DEFAULT_RSS_HENA ( \\\n+\tBIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_UDP) | \\\n+\tBIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_SCTP) | \\\n+\tBIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_TCP) | \\\n+\tBIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_OTHER) | \\\n+\tBIT_ULL(I40E_FILTER_PCTYPE_FRAG_IPV4) | \\\n+\tBIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV6_UDP) | \\\n+\tBIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV6_TCP) | \\\n+\tBIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV6_SCTP) | \\\n+\tBIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV6_OTHER) | \\\n+\tBIT_ULL(I40E_FILTER_PCTYPE_FRAG_IPV6) | \\\n+\tBIT_ULL(I40E_FILTER_PCTYPE_L2_PAYLOAD))\n+\n+#define I40E_DEFAULT_RSS_HENA_EXPANDED (I40E_DEFAULT_RSS_HENA | \\\n+\tBIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK) | \\\n+\tBIT_ULL(I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP) | \\\n+\tBIT_ULL(I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP) | \\\n+\tBIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK) | \\\n+\tBIT_ULL(I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP) | \\\n+\tBIT_ULL(I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP))\n+\n static int\n i40e_pf_host_switch_queues(struct i40e_pf_vf *vf,\n \t\t\t struct virtchnl_queue_select *qsel,\n@@ -1288,6 +1310,37 @@\n \t\t\t\t(u8 *)vfres, sizeof(*vfres));\n }\n \n+static int\n+i40e_pf_host_process_cmd_get_rss_hena(struct i40e_pf_vf *vf)\n+{\n+\tstruct virtchnl_rss_hena vrh = {0};\n+\tstruct i40e_pf *pf = vf->pf;\n+\n+\tif (pf->adapter->hw.mac.type == I40E_MAC_X722)\n+\t\tvrh.hena = I40E_DEFAULT_RSS_HENA_EXPANDED;\n+\telse\n+\t\tvrh.hena = I40E_DEFAULT_RSS_HENA;\n+\n+\treturn i40e_pf_host_send_msg_to_vf(vf, VIRTCHNL_OP_GET_RSS_HENA_CAPS,\n+\t\t\t\t\t 0, (uint8_t *)&vrh, sizeof(vrh));\n+}\n+\n+static int\n+i40e_pf_host_process_cmd_set_rss_hena(struct i40e_pf_vf *vf, uint8_t *msg)\n+{\n+\tstruct virtchnl_rss_hena *vrh =\n+\t\t(struct virtchnl_rss_hena *)msg;\n+\tstruct i40e_hw *hw = &vf->pf->adapter->hw;\n+\n+\ti40e_write_rx_ctl(hw, I40E_VFQF_HENA1(0, vf->vf_idx),\n+\t\t\t (uint32_t)vrh->hena);\n+\ti40e_write_rx_ctl(hw, I40E_VFQF_HENA1(1, vf->vf_idx),\n+\t\t\t (uint32_t)(vrh->hena >> 32));\n+\n+\treturn i40e_pf_host_send_msg_to_vf(vf, VIRTCHNL_OP_SET_RSS_HENA,\n+\t\t\t\t\t 0, NULL, 0);\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@@ -1458,6 +1511,12 @@\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+\tcase VIRTCHNL_OP_GET_RSS_HENA_CAPS:\n+\t\tret = i40e_pf_host_process_cmd_get_rss_hena(vf);\n+\t\tbreak;\n+\tcase VIRTCHNL_OP_SET_RSS_HENA:\n+\t\tret = i40e_pf_host_process_cmd_set_rss_hena(vf, msg);\n+\t\tbreak;\n \n \t/* Don't add command supported below, which will\n \t * return an error code.\n", "prefixes": [ "v3" ] }{ "id": 93188, "url": "