Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/121324/?format=api
http://patchwork.dpdk.org/api/patches/121324/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20221223015558.3143279-13-mingxia.liu@intel.com/", "project": { "id": 1, "url": "http://patchwork.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": "<20221223015558.3143279-13-mingxia.liu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20221223015558.3143279-13-mingxia.liu@intel.com", "date": "2022-12-23T01:55:49", "name": "[12/21] net/cpfl: support RSS", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "fe2bc1e9184ebc46291b637707456ac53712e94c", "submitter": { "id": 2514, "url": "http://patchwork.dpdk.org/api/people/2514/?format=api", "name": "Liu, Mingxia", "email": "mingxia.liu@intel.com" }, "delegate": { "id": 319, "url": "http://patchwork.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20221223015558.3143279-13-mingxia.liu@intel.com/mbox/", "series": [ { "id": 26253, "url": "http://patchwork.dpdk.org/api/series/26253/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=26253", "date": "2022-12-23T01:55:37", "name": "add support for cpfl PMD in DPDK", "version": 1, "mbox": "http://patchwork.dpdk.org/series/26253/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/121324/comments/", "check": "warning", "checks": "http://patchwork.dpdk.org/api/patches/121324/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 ED97FA0093;\n\tFri, 23 Dec 2022 03:53:00 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id B2C7A42D42;\n\tFri, 23 Dec 2022 03:52:09 +0100 (CET)", "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by mails.dpdk.org (Postfix) with ESMTP id 0444242D3D\n for <dev@dpdk.org>; Fri, 23 Dec 2022 03:52:06 +0100 (CET)", "from orsmga006.jf.intel.com ([10.7.209.51])\n by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 22 Dec 2022 18:52:06 -0800", "from dpdk-mingxial-01.sh.intel.com ([10.67.119.112])\n by orsmga006.jf.intel.com with ESMTP; 22 Dec 2022 18:52:05 -0800" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1671763927; x=1703299927;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=FYJl27+vbiIMBjndFaL6czs4GteLCisMEovveyBP/6I=;\n b=GemgOo8/UWG1z8ws3ciQBtIZtQ7ekmHVB4ogQzqnRFyeB1w71SLly0Qb\n nsUpYj7yLH9zViOknMGyljHxmsL5pRZ9yL+bKKzXe60bC5UrdDjQoLX3+\n tDo5UNofHNy+WmlnZcWG/ONPeLAg9xewC3UXW+D51FudzEq4t+7d0IEAz\n 82WhPF3r44XjH1xOP0velkRiGwuRO51cfE2MWsfTgurG0tKwt1EwboIlW\n 3H6CkqvndS5pcG+/vkMaKhBod9+Pg8OXbsVs9Z7PJ22nV1zRX9kiex3W/\n /pfrmHJOAidA8RW4NHdzSK2rseZL4kpuSjioKiLng+l/Y3nOYgychoQAw A==;", "X-IronPort-AV": [ "E=McAfee;i=\"6500,9779,10569\"; a=\"321467118\"", "E=Sophos;i=\"5.96,267,1665471600\"; d=\"scan'208\";a=\"321467118\"", "E=McAfee;i=\"6500,9779,10569\"; a=\"629707179\"", "E=Sophos;i=\"5.96,267,1665471600\"; d=\"scan'208\";a=\"629707179\"" ], "X-ExtLoop1": "1", "From": "Mingxia Liu <mingxia.liu@intel.com>", "To": "dev@dpdk.org", "Cc": "jingjing.wu@intel.com, beilei.xing@intel.com, qi.z.zhang@intel.com,\n Mingxia Liu <mingxia.liu@intel.com>", "Subject": "[PATCH 12/21] net/cpfl: support RSS", "Date": "Fri, 23 Dec 2022 01:55:49 +0000", "Message-Id": "<20221223015558.3143279-13-mingxia.liu@intel.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20221223015558.3143279-1-mingxia.liu@intel.com>", "References": "<20221223015558.3143279-1-mingxia.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": "Add RSS support.\n\nSigned-off-by: Mingxia Liu <mingxia.liu@intel.com>\n---\n drivers/net/cpfl/cpfl_ethdev.c | 52 ++++++++++++++++++++++++++++++++++\n drivers/net/cpfl/cpfl_ethdev.h | 15 ++++++++++\n 2 files changed, 67 insertions(+)", "diff": "diff --git a/drivers/net/cpfl/cpfl_ethdev.c b/drivers/net/cpfl/cpfl_ethdev.c\nindex ccd9783f5c..8e1d60e2d0 100644\n--- a/drivers/net/cpfl/cpfl_ethdev.c\n+++ b/drivers/net/cpfl/cpfl_ethdev.c\n@@ -97,6 +97,8 @@ cpfl_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)\n \tdev_info->max_mtu = dev_info->max_rx_pktlen - CPFL_ETH_OVERHEAD;\n \tdev_info->min_mtu = RTE_ETHER_MIN_MTU;\n \n+\tdev_info->flow_type_rss_offloads = CPFL_RSS_OFFLOAD_ALL;\n+\n \tdev_info->tx_offload_capa = RTE_ETH_TX_OFFLOAD_MULTI_SEGS;\n \n \tdev_info->default_txconf = (struct rte_eth_txconf) {\n@@ -153,10 +155,49 @@ cpfl_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)\n \treturn ptypes;\n }\n \n+static int\n+cpfl_init_rss(struct idpf_vport *vport)\n+{\n+\tstruct rte_eth_rss_conf *rss_conf;\n+\tstruct rte_eth_dev_data *dev_data;\n+\tuint16_t i, nb_q;\n+\tint ret = 0;\n+\n+\tdev_data = vport->dev_data;\n+\trss_conf = &dev_data->dev_conf.rx_adv_conf.rss_conf;\n+\tnb_q = dev_data->nb_rx_queues;\n+\n+\tif (rss_conf->rss_key == NULL) {\n+\t\tfor (i = 0; i < vport->rss_key_size; i++)\n+\t\t\tvport->rss_key[i] = (uint8_t)rte_rand();\n+\t} else if (rss_conf->rss_key_len != vport->rss_key_size) {\n+\t\tPMD_INIT_LOG(ERR, \"Invalid RSS key length in RSS configuration, should be %d\",\n+\t\t\t vport->rss_key_size);\n+\t\treturn -EINVAL;\n+\t} else {\n+\t\trte_memcpy(vport->rss_key, rss_conf->rss_key,\n+\t\t\t vport->rss_key_size);\n+\t}\n+\n+\tfor (i = 0; i < vport->rss_lut_size; i++)\n+\t\tvport->rss_lut[i] = i % nb_q;\n+\n+\tvport->rss_hf = IDPF_DEFAULT_RSS_HASH_EXPANDED;\n+\n+\tret = idpf_config_rss(vport);\n+\tif (ret != 0)\n+\t\tPMD_INIT_LOG(ERR, \"Failed to configure RSS\");\n+\n+\treturn ret;\n+}\n+\n static int\n cpfl_dev_configure(struct rte_eth_dev *dev)\n {\n+\tstruct idpf_vport *vport = dev->data->dev_private;\n \tstruct rte_eth_conf *conf = &dev->data->dev_conf;\n+\tstruct idpf_adapter *adapter = vport->adapter;\n+\tint ret;\n \n \tif (conf->link_speeds & RTE_ETH_LINK_SPEED_FIXED) {\n \t\tPMD_INIT_LOG(ERR, \"Setting link speed is not supported\");\n@@ -195,6 +236,17 @@ cpfl_dev_configure(struct rte_eth_dev *dev)\n \t\treturn -ENOTSUP;\n \t}\n \n+\tif (adapter->caps.rss_caps != 0 && dev->data->nb_rx_queues != 0) {\n+\t\tret = cpfl_init_rss(vport);\n+\t\tif (ret != 0) {\n+\t\t\tPMD_INIT_LOG(ERR, \"Failed to init rss\");\n+\t\t\treturn ret;\n+\t\t}\n+\t} else {\n+\t\tPMD_INIT_LOG(ERR, \"RSS is not supported.\");\n+\t\treturn -1;\n+\t}\n+\n \treturn 0;\n }\n \ndiff --git a/drivers/net/cpfl/cpfl_ethdev.h b/drivers/net/cpfl/cpfl_ethdev.h\nindex 714149df32..03b87a9976 100644\n--- a/drivers/net/cpfl/cpfl_ethdev.h\n+++ b/drivers/net/cpfl/cpfl_ethdev.h\n@@ -35,6 +35,21 @@\n #define CPFL_ETH_OVERHEAD \\\n \t(RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN + CPFL_VLAN_TAG_SIZE * 2)\n \n+#define CPFL_RSS_OFFLOAD_ALL (\t\t\t\t\\\n+\t\tRTE_ETH_RSS_IPV4 |\t\\\n+\t\tRTE_ETH_RSS_FRAG_IPV4 |\t\\\n+\t\tRTE_ETH_RSS_NONFRAG_IPV4_TCP |\t\\\n+\t\tRTE_ETH_RSS_NONFRAG_IPV4_UDP |\t\\\n+\t\tRTE_ETH_RSS_NONFRAG_IPV4_SCTP |\t\\\n+\t\tRTE_ETH_RSS_NONFRAG_IPV4_OTHER |\t\\\n+\t\tRTE_ETH_RSS_IPV6 |\t\\\n+\t\tRTE_ETH_RSS_FRAG_IPV6 |\t\\\n+\t\tRTE_ETH_RSS_NONFRAG_IPV6_TCP |\t\\\n+\t\tRTE_ETH_RSS_NONFRAG_IPV6_UDP |\t\\\n+\t\tRTE_ETH_RSS_NONFRAG_IPV6_SCTP |\t\\\n+\t\tRTE_ETH_RSS_NONFRAG_IPV6_OTHER |\t\\\n+\t\tRTE_ETH_RSS_L2_PAYLOAD)\n+\n #define CPFL_ADAPTER_NAME_LEN\t(PCI_PRI_STR_SIZE + 1)\n \n #define CPFL_ALARM_INTERVAL\t50000 /* us */\n", "prefixes": [ "12/21" ] }{ "id": 121324, "url": "