DPDK patches and discussions
 help / color / mirror / Atom feed
From: Rasesh Mody <rasesh.mody@qlogic.com>
To: <bruce.richardson@intel.com>
Cc: <dev@dpdk.org>, <Dept-EngDPDKDev@qlogic.com>,
	Sony Chacko <sony.chacko@qlogic.com>
Subject: [dpdk-dev] [PATCH v2 3/9] qede: add support for setting rss redirection table
Date: Wed, 15 Jun 2016 22:47:05 -0700	[thread overview]
Message-ID: <1466056031-23225-4-git-send-email-rasesh.mody@qlogic.com> (raw)
In-Reply-To: <1466056031-23225-1-git-send-email-rasesh.mody@qlogic.com>

From: Sony Chacko <sony.chacko@qlogic.com>

Add support to configure rss redirection table and update
corresponding documentation.

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
---
 doc/guides/nics/overview.rst   |    2 +-
 drivers/net/qede/qede_ethdev.c |   36 ++++++++++++++++++++++++++++++++++++
 2 files changed, 37 insertions(+), 1 deletion(-)

diff --git a/doc/guides/nics/overview.rst b/doc/guides/nics/overview.rst
index 2327f5e..bc3faf8 100644
--- a/doc/guides/nics/overview.rst
+++ b/doc/guides/nics/overview.rst
@@ -103,7 +103,7 @@ Most of these differences are summarized below.
    Multicast MAC filter   Y Y         Y Y Y Y Y             Y Y     Y Y         Y Y       Y Y
    RSS hash                     Y   Y Y Y Y Y Y Y   Y Y Y Y Y Y Y Y Y Y         Y Y
    RSS key update                   Y   Y Y Y Y Y   Y Y Y Y Y Y Y Y   Y         Y Y
-   RSS reta update                  Y   Y Y Y Y Y   Y Y Y Y Y Y Y Y   Y
+   RSS reta update                  Y   Y Y Y Y Y   Y Y Y Y Y Y Y Y   Y         Y Y
    VMDq                                 Y Y     Y   Y Y     Y Y
    SR-IOV                   Y       Y   Y Y     Y   Y Y             Y Y           Y
    DCB                                  Y Y     Y   Y Y
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 6614632..2b91e09 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -826,6 +826,40 @@ int qede_rss_hash_conf_get(struct rte_eth_dev *eth_dev,
 	return 0;
 }
 
+int qede_rss_reta_update(struct rte_eth_dev *eth_dev,
+			 struct rte_eth_rss_reta_entry64 *reta_conf,
+			 uint16_t reta_size)
+{
+	struct qed_update_vport_params vport_update_params;
+	struct qede_dev *qdev = eth_dev->data->dev_private;
+	struct ecore_dev *edev = &qdev->edev;
+	uint16_t i, idx, shift;
+
+	if (reta_size > ETH_RSS_RETA_SIZE_128) {
+		DP_ERR(edev, "reta_size %d is not supported by hardware\n",
+		       reta_size);
+		return -EINVAL;
+	}
+
+	memset(&vport_update_params, 0, sizeof(vport_update_params));
+	memcpy(&vport_update_params.rss_params, &qdev->rss_params,
+	       sizeof(vport_update_params.rss_params));
+
+	for (i = 0; i < reta_size; i++) {
+		idx = i / RTE_RETA_GROUP_SIZE;
+		shift = i % RTE_RETA_GROUP_SIZE;
+		if (reta_conf[idx].mask & (1ULL << shift)) {
+			uint8_t entry = reta_conf[idx].reta[shift];
+			qdev->rss_params.rss_ind_table[i] = entry;
+		}
+	}
+
+	vport_update_params.update_rss_flg = 1;
+	vport_update_params.vport_id = 0;
+
+	return qdev->ops->vport_update(edev, &vport_update_params);
+}
+
 static const struct eth_dev_ops qede_eth_dev_ops = {
 	.dev_configure = qede_dev_configure,
 	.dev_infos_get = qede_dev_info_get,
@@ -855,6 +889,7 @@ static const struct eth_dev_ops qede_eth_dev_ops = {
 	.dev_supported_ptypes_get = qede_dev_supported_ptypes_get,
 	.rss_hash_update = qede_rss_hash_update,
 	.rss_hash_conf_get = qede_rss_hash_conf_get,
+	.reta_update  = qede_rss_reta_update,
 };
 
 static const struct eth_dev_ops qede_eth_vf_dev_ops = {
@@ -881,6 +916,7 @@ static const struct eth_dev_ops qede_eth_vf_dev_ops = {
 	.dev_supported_ptypes_get = qede_dev_supported_ptypes_get,
 	.rss_hash_update = qede_rss_hash_update,
 	.rss_hash_conf_get = qede_rss_hash_conf_get,
+	.reta_update  = qede_rss_reta_update,
 };
 
 static void qede_update_pf_params(struct ecore_dev *edev)
-- 
1.7.10.3

  parent reply	other threads:[~2016-06-16  5:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-16  5:47 [dpdk-dev] [PATCH v2 0/9] qede: update qede PMD to 1.1.0.1 Rasesh Mody
2016-06-16  5:47 ` [dpdk-dev] [PATCH v2 1/9] qede: add support for setting hash configuration Rasesh Mody
2016-06-16  5:47 ` [dpdk-dev] [PATCH v2 2/9] qede: add support for getting rss " Rasesh Mody
2016-06-16  5:47 ` Rasesh Mody [this message]
2016-06-16  5:47 ` [dpdk-dev] [PATCH v2 4/9] qede: add support for querying rss redirection table Rasesh Mody
2016-06-16  5:47 ` [dpdk-dev] [PATCH v2 5/9] qede: add support for setting the MTU Rasesh Mody
2016-06-23 15:45   ` Bruce Richardson
2016-06-16  5:47 ` [dpdk-dev] [PATCH v2 6/9] qede: add support for xstats Rasesh Mody
2016-06-28 14:31   ` Thomas Monjalon
2016-06-29  0:08     ` Rasesh Mody
2016-06-16  5:47 ` [dpdk-dev] [PATCH v2 7/9] qede: add 100g mode support Rasesh Mody
2016-06-16  5:47 ` [dpdk-dev] [PATCH v2 8/9] qede: update vport filter settings Rasesh Mody
2016-06-23 15:46   ` Bruce Richardson
2016-06-16  5:47 ` [dpdk-dev] [PATCH v2 9/9] qede: update version to 8.7.9.0_1.1.0.1 Rasesh Mody
2016-06-23 15:49 ` [dpdk-dev] [PATCH v2 0/9] qede: update qede PMD to 1.1.0.1 Bruce Richardson

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=1466056031-23225-4-git-send-email-rasesh.mody@qlogic.com \
    --to=rasesh.mody@qlogic.com \
    --cc=Dept-EngDPDKDev@qlogic.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=sony.chacko@qlogic.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).