From: Rasesh Mody <rasesh.mody@qlogic.com>
To: <dev@dpdk.org>
Cc: <Dept-EngDPDKDev@qlogic.com>, Sony Chacko <sony.chacko@qlogic.com>
Subject: [dpdk-dev] [PATCH 2/9] qede: get hash configuration
Date: Fri, 6 May 2016 21:30:14 -0700 [thread overview]
Message-ID: <1462595421-22505-3-git-send-email-rasesh.mody@qlogic.com> (raw)
In-Reply-To: <1462595421-22505-1-git-send-email-rasesh.mody@qlogic.com>
From: Sony Chacko <sony.chacko@qlogic.com>
Add support for rss_hash_conf_get.
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
---
drivers/net/qede/qede_ethdev.c | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 84ff6f8..6614632 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -794,6 +794,38 @@ int qede_rss_hash_update(struct rte_eth_dev *eth_dev,
return qdev->ops->vport_update(edev, &vport_update_params);
}
+int qede_rss_hash_conf_get(struct rte_eth_dev *eth_dev,
+ struct rte_eth_rss_conf *rss_conf)
+{
+ struct qede_dev *qdev = eth_dev->data->dev_private;
+ uint64_t hf;
+
+ if (rss_conf->rss_key_len < sizeof(qdev->rss_params.rss_key))
+ return -EINVAL;
+
+ if (rss_conf->rss_key)
+ memcpy(rss_conf->rss_key, qdev->rss_params.rss_key,
+ sizeof(qdev->rss_params.rss_key));
+
+ hf = 0;
+ hf |= (qdev->rss_params.rss_caps & ECORE_RSS_IPV4) ?
+ ETH_RSS_IPV4 : 0;
+ hf |= (qdev->rss_params.rss_caps & ECORE_RSS_IPV6) ?
+ ETH_RSS_IPV6 : 0;
+ hf |= (qdev->rss_params.rss_caps & ECORE_RSS_IPV6) ?
+ ETH_RSS_IPV6_EX : 0;
+ hf |= (qdev->rss_params.rss_caps & ECORE_RSS_IPV4_TCP) ?
+ ETH_RSS_NONFRAG_IPV4_TCP : 0;
+ hf |= (qdev->rss_params.rss_caps & ECORE_RSS_IPV6_TCP) ?
+ ETH_RSS_NONFRAG_IPV6_TCP : 0;
+ hf |= (qdev->rss_params.rss_caps & ECORE_RSS_IPV6_TCP) ?
+ ETH_RSS_IPV6_TCP_EX : 0;
+
+ rss_conf->rss_hf = hf;
+
+ return 0;
+}
+
static const struct eth_dev_ops qede_eth_dev_ops = {
.dev_configure = qede_dev_configure,
.dev_infos_get = qede_dev_info_get,
@@ -822,6 +854,7 @@ static const struct eth_dev_ops qede_eth_dev_ops = {
.flow_ctrl_get = qede_flow_ctrl_get,
.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,
};
static const struct eth_dev_ops qede_eth_vf_dev_ops = {
@@ -847,6 +880,7 @@ static const struct eth_dev_ops qede_eth_vf_dev_ops = {
.vlan_filter_set = qede_vlan_filter_set,
.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,
};
static void qede_update_pf_params(struct ecore_dev *edev)
--
1.7.10.3
next prev parent reply other threads:[~2016-05-07 4:30 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-07 4:30 [dpdk-dev] [PATCH 0/9] qede: update qede PMD to 1.1.0.1 Rasesh Mody
2016-05-07 4:30 ` [dpdk-dev] [PATCH 1/9] qede: update hash config Rasesh Mody
2016-05-07 4:30 ` Rasesh Mody [this message]
2016-05-07 4:30 ` [dpdk-dev] [PATCH 3/9] qede: rss redirection table update Rasesh Mody
2016-05-07 4:30 ` [dpdk-dev] [PATCH 4/9] qede: rss redirection table query Rasesh Mody
2016-05-07 4:30 ` [dpdk-dev] [PATCH 5/9] qede: set mtu Rasesh Mody
2016-05-07 4:30 ` [dpdk-dev] [PATCH 6/9] qede: add support for xstats Rasesh Mody
2016-05-09 17:56 ` Van Haaren, Harry
2016-05-07 4:30 ` [dpdk-dev] [PATCH 7/9] qede: add 100g mode support Rasesh Mody
2016-06-07 11:09 ` Bruce Richardson
2016-05-07 4:30 ` [dpdk-dev] [PATCH 8/9] qede: enable vf-vf traffic with unmatched dest addr Rasesh Mody
2016-06-07 12:37 ` Bruce Richardson
2016-05-07 4:30 ` [dpdk-dev] [PATCH 9/9] qede: update version to 8.7.9.0_1.1.0.1 Rasesh Mody
2016-05-23 0:56 ` [dpdk-dev] [PATCH 0/9] qede: update qede PMD to 1.1.0.1 Rasesh Mody
2016-06-07 12:47 ` Bruce Richardson
2016-06-07 18:26 ` Rasesh Mody
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=1462595421-22505-3-git-send-email-rasesh.mody@qlogic.com \
--to=rasesh.mody@qlogic.com \
--cc=Dept-EngDPDKDev@qlogic.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).