Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/109635/?format=api
https://patches.dpdk.org/api/patches/109635/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220413160932.2074781-2-kevinx.liu@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": "<20220413160932.2074781-2-kevinx.liu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20220413160932.2074781-2-kevinx.liu@intel.com", "date": "2022-04-13T16:09:00", "name": "[v2,01/33] net/ice: enable RSS RETA ops for DCF hardware", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "61fafd32c4432fb443f591227102a8f42bb5010e", "submitter": { "id": 2440, "url": "https://patches.dpdk.org/api/people/2440/?format=api", "name": "Kevin Liu", "email": "kevinx.liu@intel.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20220413160932.2074781-2-kevinx.liu@intel.com/mbox/", "series": [ { "id": 22497, "url": "https://patches.dpdk.org/api/series/22497/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=22497", "date": "2022-04-13T16:08:59", "name": "support full function of DCF", "version": 2, "mbox": "https://patches.dpdk.org/series/22497/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/109635/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/109635/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 25C97A0508;\n\tWed, 13 Apr 2022 10:10:46 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 278D3427F6;\n\tWed, 13 Apr 2022 10:10:43 +0200 (CEST)", "from mga17.intel.com (mga17.intel.com [192.55.52.151])\n by mails.dpdk.org (Postfix) with ESMTP id 19B614068B\n for <dev@dpdk.org>; Wed, 13 Apr 2022 10:10:40 +0200 (CEST)", "from orsmga006.jf.intel.com ([10.7.209.51])\n by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 13 Apr 2022 01:10:40 -0700", "from intel-cd-odc-kevin.cd.intel.com ([10.240.178.195])\n by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 13 Apr 2022 01:10:38 -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=1649837441; x=1681373441;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=J4Wo64ItQBH4N6CEJHCXCjbSj6gRI5z9jkTbPzFPbys=;\n b=GbQf6PlS2IWkZa0nExl8bqnef7BeXzCctHNnsLapE7gN90KY/Hu2si1t\n 7MHusmIX/1F2YbJfmXAWQ3uH3COoDTj0bTkbbzkYRN4PRx2EMhMFjHrbt\n 8RK57+8enbri2f9cgDEOKxh+JwrBya2/4eWtC+/u22yWcSInMDW6BMEzR\n Kqg3ohbIwX0nO1EA283UKbxnNvpRbUF8hsTKVEmaUubXloud0D+SNaIds\n 8ii9Z4fjMOxebVUyvCQwGtqLFcBZqUzkHko7gvqmGLP9Buy3wIjg+jv3Q\n o5faaeMugTtp3i9bKOIoO+8eMz9A+vfCeTLPaiLYJ+i0ahbvj4A5s890I A==;", "X-IronPort-AV": [ "E=McAfee;i=\"6400,9594,10315\"; a=\"243189017\"", "E=Sophos;i=\"5.90,256,1643702400\"; d=\"scan'208\";a=\"243189017\"", "E=Sophos;i=\"5.90,256,1643702400\"; d=\"scan'208\";a=\"526847464\"" ], "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 v2 01/33] net/ice: enable RSS RETA ops for DCF hardware", "Date": "Wed, 13 Apr 2022 16:09:00 +0000", "Message-Id": "<20220413160932.2074781-2-kevinx.liu@intel.com>", "X-Mailer": "git-send-email 2.33.1", "In-Reply-To": "<20220413160932.2074781-1-kevinx.liu@intel.com>", "References": "<20220407105706.18889-1-kevinx.liu@intel.com>\n <20220413160932.2074781-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\nRSS RETA should be updated and queried by application,\nAdd related ops ('.reta_update', '.reta_query') for DCF.\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 | 2 +-\n drivers/net/ice/ice_dcf.h | 1 +\n drivers/net/ice/ice_dcf_ethdev.c | 77 ++++++++++++++++++++++++++++++++\n 3 files changed, 79 insertions(+), 1 deletion(-)", "diff": "diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c\nindex 7f0c074b01..070d1b71ac 100644\n--- a/drivers/net/ice/ice_dcf.c\n+++ b/drivers/net/ice/ice_dcf.c\n@@ -790,7 +790,7 @@ ice_dcf_configure_rss_key(struct ice_dcf_hw *hw)\n \treturn err;\n }\n \n-static int\n+int\n ice_dcf_configure_rss_lut(struct ice_dcf_hw *hw)\n {\n \tstruct virtchnl_rss_lut *rss_lut;\ndiff --git a/drivers/net/ice/ice_dcf.h b/drivers/net/ice/ice_dcf.h\nindex 6ec766ebda..b2c6aa2684 100644\n--- a/drivers/net/ice/ice_dcf.h\n+++ b/drivers/net/ice/ice_dcf.h\n@@ -122,6 +122,7 @@ int ice_dcf_send_aq_cmd(void *dcf_hw, struct ice_aq_desc *desc,\n int ice_dcf_handle_vsi_update_event(struct ice_dcf_hw *hw);\n int ice_dcf_init_hw(struct rte_eth_dev *eth_dev, struct ice_dcf_hw *hw);\n void ice_dcf_uninit_hw(struct rte_eth_dev *eth_dev, 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_config_irq_map(struct ice_dcf_hw *hw);\ndiff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c\nindex 59610e058f..1ac66ed990 100644\n--- a/drivers/net/ice/ice_dcf_ethdev.c\n+++ b/drivers/net/ice/ice_dcf_ethdev.c\n@@ -761,6 +761,81 @@ ice_dcf_dev_flow_ops_get(struct rte_eth_dev *dev,\n \treturn 0;\n }\n \n+static int\n+ice_dcf_dev_rss_reta_update(struct rte_eth_dev *dev,\n+\t\t\tstruct rte_eth_rss_reta_entry64 *reta_conf,\n+\t\t\tuint16_t reta_size)\n+{\n+\tstruct ice_dcf_adapter *adapter = dev->data->dev_private;\n+\tstruct ice_dcf_hw *hw = &adapter->real_hw;\n+\tuint8_t *lut;\n+\tuint16_t i, idx, shift;\n+\tint ret;\n+\n+\tif (!(hw->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RSS_PF))\n+\t\treturn -ENOTSUP;\n+\n+\tif (reta_size != hw->vf_res->rss_lut_size) {\n+\t\tPMD_DRV_LOG(ERR, \"The size of hash lookup table configured \"\n+\t\t\t\"(%d) doesn't match the number of hardware can \"\n+\t\t\t\"support (%d)\", reta_size, hw->vf_res->rss_lut_size);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tlut = rte_zmalloc(\"rss_lut\", reta_size, 0);\n+\tif (!lut) {\n+\t\tPMD_DRV_LOG(ERR, \"No memory can be allocated\");\n+\t\treturn -ENOMEM;\n+\t}\n+\t/* store the old lut table temporarily */\n+\trte_memcpy(lut, hw->rss_lut, reta_size);\n+\n+\tfor (i = 0; i < reta_size; i++) {\n+\t\tidx = i / RTE_ETH_RETA_GROUP_SIZE;\n+\t\tshift = i % RTE_ETH_RETA_GROUP_SIZE;\n+\t\tif (reta_conf[idx].mask & (1ULL << shift))\n+\t\t\tlut[i] = reta_conf[idx].reta[shift];\n+\t}\n+\n+\trte_memcpy(hw->rss_lut, lut, reta_size);\n+\t/* send virtchnnl ops to configure rss*/\n+\tret = ice_dcf_configure_rss_lut(hw);\n+\tif (ret) /* revert back */\n+\t\trte_memcpy(hw->rss_lut, lut, reta_size);\n+\trte_free(lut);\n+\n+\treturn ret;\n+}\n+\n+static int\n+ice_dcf_dev_rss_reta_query(struct rte_eth_dev *dev,\n+\t\t struct rte_eth_rss_reta_entry64 *reta_conf,\n+\t\t uint16_t reta_size)\n+{\n+\tstruct ice_dcf_adapter *adapter = dev->data->dev_private;\n+\tstruct ice_dcf_hw *hw = &adapter->real_hw;\n+\tuint16_t i, idx, shift;\n+\n+\tif (!(hw->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RSS_PF))\n+\t\treturn -ENOTSUP;\n+\n+\tif (reta_size != hw->vf_res->rss_lut_size) {\n+\t\tPMD_DRV_LOG(ERR, \"The size of hash lookup table configured \"\n+\t\t\t\"(%d) doesn't match the number of hardware can \"\n+\t\t\t\"support (%d)\", reta_size, hw->vf_res->rss_lut_size);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tfor (i = 0; i < reta_size; i++) {\n+\t\tidx = i / RTE_ETH_RETA_GROUP_SIZE;\n+\t\tshift = i % RTE_ETH_RETA_GROUP_SIZE;\n+\t\tif (reta_conf[idx].mask & (1ULL << shift))\n+\t\t\treta_conf[idx].reta[shift] = hw->rss_lut[i];\n+\t}\n+\n+\treturn 0;\n+}\n+\n #define ICE_DCF_32_BIT_WIDTH (CHAR_BIT * 4)\n #define ICE_DCF_48_BIT_WIDTH (CHAR_BIT * 6)\n #define ICE_DCF_48_BIT_MASK RTE_LEN2MASK(ICE_DCF_48_BIT_WIDTH, uint64_t)\n@@ -1107,6 +1182,8 @@ static const struct eth_dev_ops ice_dcf_eth_dev_ops = {\n \t.udp_tunnel_port_add\t = ice_dcf_dev_udp_tunnel_port_add,\n \t.udp_tunnel_port_del\t = ice_dcf_dev_udp_tunnel_port_del,\n \t.tm_ops_get = ice_dcf_tm_ops_get,\n+\t.reta_update = ice_dcf_dev_rss_reta_update,\n+\t.reta_query = ice_dcf_dev_rss_reta_query,\n };\n \n static int\n", "prefixes": [ "v2", "01/33" ] }{ "id": 109635, "url": "