DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev@dpdk.org, Ferruh Yigit <ferruh.yigit@intel.com>,
	Xueming Li <xuemingl@mellanox.com>,
	Shahaf Shuler <shahafs@mellanox.com>, Wei Dai <wei.dai@intel.com>,
	Qi Zhang <qi.z.zhang@intel.com>,
	Andrew Rybchenko <arybchenko@solarflare.com>
Subject: [dpdk-dev] [PATCH] ethdev: force RSS offload rules again
Date: Thu, 31 May 2018 14:22:45 +0100	[thread overview]
Message-ID: <20180531132245.19424-1-ferruh.yigit@intel.com> (raw)

PMDs should provide supported RSS hash functions via
dev_info.flow_type_rss_offloads variable.

There is a check in ethdev if requested RSS hash function is supported
by PMD or not.
This check has been relaxed in previous release to not return an error
when a non supported has function requested [1], this has been done to
not break the applications.

Adding the error return back.
PMDs need to provide correct list of supported hash functions and
applications need to take care this information before configuring
the RSS otherwise they will get an error from APIs:
rte_eth_dev_rss_hash_update()
rte_eth_dev_configure()

[1] af7551e2bfce ("ethdev: remove error return on RSS hash check")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
Cc: Xueming Li <xuemingl@mellanox.com>
Cc: Shahaf Shuler <shahafs@mellanox.com>
Cc: Wei Dai <wei.dai@intel.com>
Cc: Qi Zhang <qi.z.zhang@intel.com>
Cc: Andrew Rybchenko <arybchenko@solarflare.com>
---
 lib/librte_ethdev/rte_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 66e311676..a9977df97 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -1194,6 +1194,7 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
 				    port_id,
 				    dev_conf->rx_adv_conf.rss_conf.rss_hf,
 				    dev_info.flow_type_rss_offloads);
+		return -EINVAL;
 	}
 
 	/*
@@ -2928,6 +2929,7 @@ rte_eth_dev_rss_hash_update(uint16_t port_id,
 				    port_id,
 				    rss_conf->rss_hf,
 				    dev_info.flow_type_rss_offloads);
+		return -EINVAL;
 	}
 	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rss_hash_update, -ENOTSUP);
 	return eth_err(port_id, (*dev->dev_ops->rss_hash_update)(dev,
-- 
2.14.3

             reply	other threads:[~2018-05-31 13:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-31 13:22 Ferruh Yigit [this message]
2018-06-03 10:41 ` Shahaf Shuler
2018-06-03 14:15   ` Ferruh Yigit
2018-06-04  7:56     ` Shahaf Shuler
2018-06-13 15:19       ` Thomas Monjalon

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=20180531132245.19424-1-ferruh.yigit@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    --cc=shahafs@mellanox.com \
    --cc=thomas@monjalon.net \
    --cc=wei.dai@intel.com \
    --cc=xuemingl@mellanox.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).