DPDK patches and discussions
 help / color / mirror / Atom feed
From: Hemant Agrawal <hemant.agrawal@nxp.com>
To: <ferruh.yigit@intel.com>
Cc: <dev@dpdk.org>, <shreyansh.jain@nxp.com>
Subject: [dpdk-dev] [PATCH 23/27] net/dpaa2: add support for RSS hash update and get
Date: Fri, 25 Aug 2017 16:19:39 +0530	[thread overview]
Message-ID: <1503658183-4078-24-git-send-email-hemant.agrawal@nxp.com> (raw)
In-Reply-To: <1503658183-4078-1-git-send-email-hemant.agrawal@nxp.com>

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa2/dpaa2_ethdev.c | 42 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index dcf783b..4eeddb8 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -1422,6 +1422,46 @@ dpaa2_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
 	return ret;
 }
 
+static int
+dpaa2_dev_rss_hash_update(struct rte_eth_dev *dev,
+			  struct rte_eth_rss_conf *rss_conf)
+{
+	struct rte_eth_dev_data *data = dev->data;
+	struct rte_eth_conf *eth_conf = &data->dev_conf;
+	int ret;
+
+	PMD_INIT_FUNC_TRACE();
+
+	if (rss_conf->rss_hf) {
+		ret = dpaa2_setup_flow_dist(dev, rss_conf->rss_hf);
+		if (ret) {
+			PMD_INIT_LOG(ERR, "unable to set flow dist");
+			return ret;
+		}
+	} else {
+		ret = dpaa2_remove_flow_dist(dev, 0);
+		if (ret) {
+			PMD_INIT_LOG(ERR, "unable to remove flow dist");
+			return ret;
+		}
+	}
+	eth_conf->rx_adv_conf.rss_conf.rss_hf = rss_conf->rss_hf;
+	return 0;
+}
+
+static int
+dpaa2_dev_rss_hash_conf_get(struct rte_eth_dev *dev,
+			    struct rte_eth_rss_conf *rss_conf)
+{
+	struct rte_eth_dev_data *data = dev->data;
+	struct rte_eth_conf *eth_conf = &data->dev_conf;
+
+	/* dpaa2 does not support rss_key, so length should be 0*/
+	rss_conf->rss_key_len = 0;
+	rss_conf->rss_hf = eth_conf->rx_adv_conf.rss_conf.rss_hf;
+	return 0;
+}
+
 static struct eth_dev_ops dpaa2_ethdev_ops = {
 	.dev_configure	  = dpaa2_eth_dev_configure,
 	.dev_start	      = dpaa2_dev_start,
@@ -1451,6 +1491,8 @@ static struct eth_dev_ops dpaa2_ethdev_ops = {
 	.mac_addr_add         = dpaa2_dev_add_mac_addr,
 	.mac_addr_remove      = dpaa2_dev_remove_mac_addr,
 	.mac_addr_set         = dpaa2_dev_set_mac_addr,
+	.rss_hash_update      = dpaa2_dev_rss_hash_update,
+	.rss_hash_conf_get    = dpaa2_dev_rss_hash_conf_get,
 };
 
 static int
-- 
2.7.4

  parent reply	other threads:[~2017-08-25 10:50 UTC|newest]

Thread overview: 97+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-25 10:49 [dpdk-dev] [PATCH 00/27] NXP DPAA2 PMD updates Hemant Agrawal
2017-08-25 10:49 ` [dpdk-dev] [PATCH 01/27] bus/fslmc: qbman replace word copy with memcpy Hemant Agrawal
2017-08-25 10:49 ` [dpdk-dev] [PATCH 02/27] bus/fslmc: remove the export for qbman version function Hemant Agrawal
2017-08-25 10:49 ` [dpdk-dev] [PATCH 03/27] bus/fslmc: add qbman API to do enqueue with multiple frames Hemant Agrawal
2017-08-25 10:49 ` [dpdk-dev] [PATCH 04/27] bus/fslmc: support up to 32 frames in one volatile dequeue Hemant Agrawal
2017-08-25 10:49 ` [dpdk-dev] [PATCH 05/27] bus/fslmc: enhance the QBMAN CENA mode Hemant Agrawal
2017-08-25 10:49 ` [dpdk-dev] [PATCH 06/27] bus/fslmc: qbman remove unused funcs and align names Hemant Agrawal
2017-08-25 10:49 ` [dpdk-dev] [PATCH 07/27] bus/fslmc: cleanup compat file Hemant Agrawal
2017-08-25 10:49 ` [dpdk-dev] [PATCH 08/27] bus/fslmc: clean the qbman support code Hemant Agrawal
2017-08-25 10:49 ` [dpdk-dev] [PATCH 09/27] bus/fslmc: update MC to 10.3.x Hemant Agrawal
2017-08-25 10:49 ` [dpdk-dev] [PATCH 10/27] net/dpaa2: " Hemant Agrawal
2017-08-25 10:49 ` [dpdk-dev] [PATCH 11/27] crypto/dpaa2_sec: " Hemant Agrawal
2017-08-25 10:49 ` [dpdk-dev] [PATCH 12/27] config/dpaa2: change max lores to 16 Hemant Agrawal
2017-08-25 10:49 ` [dpdk-dev] [PATCH 13/27] bus/fslmc: add support for LX2160 platform Hemant Agrawal
2017-08-25 10:49 ` [dpdk-dev] [PATCH 14/27] net/dpaa2: add support for congestion overhead Hemant Agrawal
2017-08-25 10:49 ` [dpdk-dev] [PATCH 15/27] bus/fslmc: add support to check dpbp presence Hemant Agrawal
2017-08-25 10:49 ` [dpdk-dev] [PATCH 16/27] bus/fslmc: cleanup the dpaa2 interrupt support Hemant Agrawal
2017-08-25 10:49 ` [dpdk-dev] [PATCH 17/27] net/dpaa2: add support for link status event Hemant Agrawal
2017-08-25 10:49 ` [dpdk-dev] [PATCH 18/27] bus/fslmc: enable link status interrupt Hemant Agrawal
2017-08-25 10:49 ` [dpdk-dev] [PATCH 19/27] net/dpaa2: check physical link state on up cmd Hemant Agrawal
2017-08-25 10:49 ` [dpdk-dev] [PATCH 20/27] net/dpaa2: improve error and logs for flow distribution Hemant Agrawal
2017-08-25 10:49 ` [dpdk-dev] [PATCH 21/27] net/dpaa2: increase the dist param to 64 bit Hemant Agrawal
2017-08-25 10:49 ` [dpdk-dev] [PATCH 22/27] net/dpaa2: remove RSS restriction with num of queues Hemant Agrawal
2017-08-25 10:49 ` Hemant Agrawal [this message]
2017-08-25 10:49 ` [dpdk-dev] [PATCH 24/27] net/dpaa2: add support for extra stats Hemant Agrawal
2017-08-25 10:49 ` [dpdk-dev] [PATCH 25/27] net/dpaa2: fix the Tx handling of non HW pool bufs Hemant Agrawal
2017-08-25 10:49 ` [dpdk-dev] [PATCH 26/27] net/dpaa2: improve debug messaging Hemant Agrawal
2017-08-25 10:49 ` [dpdk-dev] [PATCH 27/27] net/dpaa2: log that VLAN extend offload not supported Hemant Agrawal
2017-09-08  8:44 ` [dpdk-dev] [PATCH v2 00/30] NXP DPAA2 PMD updates Hemant Agrawal
2017-09-08  8:44   ` [dpdk-dev] [PATCH v2 01/30] bus/fslmc: qbman replace word copy with memcpy Hemant Agrawal
2017-09-08  8:44   ` [dpdk-dev] [PATCH v2 02/30] bus/fslmc: remove the export for qbman version function Hemant Agrawal
2017-09-08  8:45   ` [dpdk-dev] [PATCH v2 03/30] bus/fslmc: add qbman API to do enqueue with multiple frames Hemant Agrawal
2017-09-08  8:45   ` [dpdk-dev] [PATCH v2 04/30] bus/fslmc: support up to 32 frames in one volatile dequeue Hemant Agrawal
2017-09-08  8:45   ` [dpdk-dev] [PATCH v2 05/30] bus/fslmc: enhance the QBMAN CENA mode Hemant Agrawal
2017-09-15 12:26     ` Ferruh Yigit
2017-09-15 12:32       ` Hemant Agrawal
2017-09-08  8:45   ` [dpdk-dev] [PATCH v2 06/30] bus/fslmc: qbman remove unused funcs and align names Hemant Agrawal
2017-09-08  8:45   ` [dpdk-dev] [PATCH v2 07/30] bus/fslmc: cleanup compat file Hemant Agrawal
2017-09-08  8:45   ` [dpdk-dev] [PATCH v2 08/30] bus/fslmc: clean the qbman support code Hemant Agrawal
2017-09-08  8:45   ` [dpdk-dev] [PATCH v2 09/30] bus/fslmc: update MC to 10.3.x Hemant Agrawal
2017-09-08  8:45   ` [dpdk-dev] [PATCH v2 10/30] net/dpaa2: " Hemant Agrawal
2017-09-08  8:45   ` [dpdk-dev] [PATCH v2 11/30] crypto/dpaa2_sec: " Hemant Agrawal
2017-09-15 12:37     ` Ferruh Yigit
2017-09-15 12:45       ` Hemant Agrawal
2017-09-08  8:45   ` [dpdk-dev] [PATCH v2 12/30] config/dpaa2: change max lores to 16 Hemant Agrawal
2017-09-08  8:45   ` [dpdk-dev] [PATCH v2 13/30] bus/fslmc: add support for LX2160 platform Hemant Agrawal
2017-09-08  8:45   ` [dpdk-dev] [PATCH v2 14/30] net/dpaa2: add support for congestion overhead Hemant Agrawal
2017-09-08  8:45   ` [dpdk-dev] [PATCH v2 15/30] bus/fslmc: add support to check dpbp presence Hemant Agrawal
2017-09-08  8:45   ` [dpdk-dev] [PATCH v2 16/30] bus/fslmc: cleanup the dpaa2 interrupt support Hemant Agrawal
2017-09-08  8:45   ` [dpdk-dev] [PATCH v2 17/30] net/dpaa2: add support for link status event Hemant Agrawal
2017-09-08  8:45   ` [dpdk-dev] [PATCH v2 18/30] bus/fslmc: enable link status interrupt Hemant Agrawal
2017-09-08  8:45   ` [dpdk-dev] [PATCH v2 19/30] net/dpaa2: check physical link state on up cmd Hemant Agrawal
2017-09-08  8:45   ` [dpdk-dev] [PATCH v2 20/30] net/dpaa2: improve error and logs for flow distribution Hemant Agrawal
2017-09-08  8:45   ` [dpdk-dev] [PATCH v2 21/30] net/dpaa2: increase the dist param to 64 bit Hemant Agrawal
2017-09-08  8:45   ` [dpdk-dev] [PATCH v2 22/30] net/dpaa2: remove RSS restriction with num of queues Hemant Agrawal
2017-09-08  8:45   ` [dpdk-dev] [PATCH v2 23/30] net/dpaa2: add support for RSS hash update and get Hemant Agrawal
2017-09-08  8:45   ` [dpdk-dev] [PATCH v2 24/30] bus/dpaa2: add support for hw extra stats API Hemant Agrawal
2017-09-15 11:38     ` Ferruh Yigit
2017-09-15 11:45       ` Hemant Agrawal
2017-09-08  8:45   ` [dpdk-dev] [PATCH v2 25/30] net/dpaa2: add support for extra stats Hemant Agrawal
2017-09-08  8:45   ` [dpdk-dev] [PATCH v2 26/30] net/dpaa2: fix the Tx handling of non HW pool bufs Hemant Agrawal
2017-09-08  8:45   ` [dpdk-dev] [PATCH v2 27/30] net/dpaa2: log that VLAN extend offload not supported Hemant Agrawal
2017-09-08  8:45   ` [dpdk-dev] [PATCH v2 28/30] net/dpaa2: checksum support as per user config Hemant Agrawal
2017-09-08  8:45   ` [dpdk-dev] [PATCH v2 29/30] net/dpaa2: improve debug messaging Hemant Agrawal
2017-09-08  8:45   ` [dpdk-dev] [PATCH v2 30/30] bus/dpaa2: improve debug log messages Hemant Agrawal
2017-09-16 10:52   ` [dpdk-dev] [PATCH v3 00/27] NXP DPAA2 PMD updates Hemant Agrawal
2017-09-16 10:52     ` [dpdk-dev] [PATCH v3 01/27] bus/fslmc: qbman replace word copy with memcpy Hemant Agrawal
2017-09-16 10:52     ` [dpdk-dev] [PATCH v3 02/27] bus/fslmc: remove the export for qbman version function Hemant Agrawal
2017-09-16 10:52     ` [dpdk-dev] [PATCH v3 03/27] bus/fslmc: add qbman API to do enqueue with multiple frames Hemant Agrawal
2017-09-18 20:18       ` Ferruh Yigit
2017-09-16 10:52     ` [dpdk-dev] [PATCH v3 04/27] bus/fslmc: support up to 32 frames in one volatile dequeue Hemant Agrawal
2017-09-16 10:52     ` [dpdk-dev] [PATCH v3 05/27] bus/fslmc: enhance the QBMAN CENA mode Hemant Agrawal
2017-09-16 10:52     ` [dpdk-dev] [PATCH v3 06/27] bus/fslmc: qbman remove unused funcs and align names Hemant Agrawal
2017-09-18 20:19       ` Ferruh Yigit
2017-09-16 10:52     ` [dpdk-dev] [PATCH v3 07/27] bus/fslmc: cleanup compat file Hemant Agrawal
2017-09-16 10:52     ` [dpdk-dev] [PATCH v3 08/27] bus/fslmc: clean the qbman support code Hemant Agrawal
2017-09-16 10:52     ` [dpdk-dev] [PATCH v3 09/27] config/dpaa2: change max lores to 16 Hemant Agrawal
2017-09-16 10:52     ` [dpdk-dev] [PATCH v3 10/27] bus/fslmc: add support for LX2160 platform Hemant Agrawal
2017-09-16 10:52     ` [dpdk-dev] [PATCH v3 11/27] net/dpaa2: add support for congestion overhead Hemant Agrawal
2017-09-16 10:52     ` [dpdk-dev] [PATCH v3 12/27] bus/fslmc: add support to check dpbp presence Hemant Agrawal
2017-09-16 10:52     ` [dpdk-dev] [PATCH v3 13/27] bus/fslmc: cleanup the dpaa2 interrupt support Hemant Agrawal
2017-09-16 10:52     ` [dpdk-dev] [PATCH v3 14/27] net/dpaa2: add support for link status event Hemant Agrawal
2017-09-16 10:52     ` [dpdk-dev] [PATCH v3 15/27] bus/fslmc: enable link status interrupt Hemant Agrawal
2017-09-16 10:52     ` [dpdk-dev] [PATCH v3 16/27] net/dpaa2: check physical link state on up cmd Hemant Agrawal
2017-09-16 10:52     ` [dpdk-dev] [PATCH v3 17/27] net/dpaa2: improve error and logs for flow distribution Hemant Agrawal
2017-09-16 10:52     ` [dpdk-dev] [PATCH v3 18/27] net/dpaa2: increase the dist param to 64 bit Hemant Agrawal
2017-09-16 10:52     ` [dpdk-dev] [PATCH v3 19/27] net/dpaa2: remove RSS restriction with num of queues Hemant Agrawal
2017-09-16 10:52     ` [dpdk-dev] [PATCH v3 20/27] net/dpaa2: add support for RSS hash update and get Hemant Agrawal
2017-09-16 10:52     ` [dpdk-dev] [PATCH v3 21/27] net/dpaa2: add support for extra stats Hemant Agrawal
2017-09-16 10:52     ` [dpdk-dev] [PATCH v3 22/27] net/dpaa2: fix the Tx handling of non HW pool bufs Hemant Agrawal
2017-09-16 10:52     ` [dpdk-dev] [PATCH v3 23/27] net/dpaa2: log that VLAN extend offload not supported Hemant Agrawal
2017-09-16 10:52     ` [dpdk-dev] [PATCH v3 24/27] net/dpaa2: checksum support as per user config Hemant Agrawal
2017-09-16 10:52     ` [dpdk-dev] [PATCH v3 25/27] net/dpaa2: improve debug messaging Hemant Agrawal
2017-09-16 10:52     ` [dpdk-dev] [PATCH v3 26/27] bus/dpaa2: improve debug log messages Hemant Agrawal
2017-09-16 10:52     ` [dpdk-dev] [PATCH v3 27/27] bus/fslmc: add devices in sorted order Hemant Agrawal
2017-09-18 20:20     ` [dpdk-dev] [PATCH v3 00/27] NXP DPAA2 PMD updates Ferruh Yigit
2017-10-06  1:30     ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1503658183-4078-24-git-send-email-hemant.agrawal@nxp.com \
    --to=hemant.agrawal@nxp.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=shreyansh.jain@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).