All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ethdev: force RSS offload rules again
@ 2018-05-31 13:22 Ferruh Yigit
  2018-06-03 10:41 ` Shahaf Shuler
  0 siblings, 1 reply; 5+ messages in thread
From: Ferruh Yigit @ 2018-05-31 13:22 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: dev, Ferruh Yigit, Xueming Li, Shahaf Shuler, Wei Dai, Qi Zhang,
	Andrew Rybchenko

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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ethdev: force RSS offload rules again
  2018-05-31 13:22 [PATCH] ethdev: force RSS offload rules again Ferruh Yigit
@ 2018-06-03 10:41 ` Shahaf Shuler
  2018-06-03 14:15   ` Ferruh Yigit
  0 siblings, 1 reply; 5+ messages in thread
From: Shahaf Shuler @ 2018-06-03 10:41 UTC (permalink / raw)
  To: Ferruh Yigit, Thomas Monjalon
  Cc: dev, Xueming(Steven) Li, Wei Dai, Qi Zhang, Andrew Rybchenko

Thursday, May 31, 2018 4:23 PM, Ferruh Yigit:
> Subject: [PATCH] ethdev: force RSS offload rules again
> 
> 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()

Are the current app/examples in DPDK tree behave accordingly?  

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ethdev: force RSS offload rules again
  2018-06-03 10:41 ` Shahaf Shuler
@ 2018-06-03 14:15   ` Ferruh Yigit
  2018-06-04  7:56     ` Shahaf Shuler
  0 siblings, 1 reply; 5+ messages in thread
From: Ferruh Yigit @ 2018-06-03 14:15 UTC (permalink / raw)
  To: Shahaf Shuler, Thomas Monjalon
  Cc: dev, Xueming(Steven) Li, Wei Dai, Qi Zhang, Andrew Rybchenko

On 6/3/2018 11:41 AM, Shahaf Shuler wrote:
> Thursday, May 31, 2018 4:23 PM, Ferruh Yigit:
>> Subject: [PATCH] ethdev: force RSS offload rules again
>>
>> 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()
> 
> Are the current app/examples in DPDK tree behave accordingly?  

I tried a few which were good but I don't know about all.

That is why we should merge this patch early so that we can detect and fix ones
fails.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ethdev: force RSS offload rules again
  2018-06-03 14:15   ` Ferruh Yigit
@ 2018-06-04  7:56     ` Shahaf Shuler
  2018-06-13 15:19       ` Thomas Monjalon
  0 siblings, 1 reply; 5+ messages in thread
From: Shahaf Shuler @ 2018-06-04  7:56 UTC (permalink / raw)
  To: Ferruh Yigit, Thomas Monjalon
  Cc: dev, Xueming(Steven) Li, Wei Dai, Qi Zhang, Andrew Rybchenko

Sunday, June 3, 2018 5:15 PM, Ferruh Yigit:
> Subject: Re: [PATCH] ethdev: force RSS offload rules again
> 
> On 6/3/2018 11:41 AM, Shahaf Shuler wrote:
> > Thursday, May 31, 2018 4:23 PM, Ferruh Yigit:
> >> Subject: [PATCH] ethdev: force RSS offload rules again
> >>
> >> 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()
> >
> > Are the current app/examples in DPDK tree behave accordingly?
> 
> I tried a few which were good but I don't know about all.
> 
> That is why we should merge this patch early so that we can detect and fix
> ones fails.

Acked-by: Shahaf Shuler <shahafs@mellanox.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ethdev: force RSS offload rules again
  2018-06-04  7:56     ` Shahaf Shuler
@ 2018-06-13 15:19       ` Thomas Monjalon
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2018-06-13 15:19 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: dev, Shahaf Shuler, Xueming(Steven) Li, Wei Dai, Qi Zhang,
	Andrew Rybchenko

04/06/2018 09:56, Shahaf Shuler:
> Sunday, June 3, 2018 5:15 PM, Ferruh Yigit:
> > Subject: Re: [PATCH] ethdev: force RSS offload rules again
> > 
> > On 6/3/2018 11:41 AM, Shahaf Shuler wrote:
> > > Thursday, May 31, 2018 4:23 PM, Ferruh Yigit:
> > >> Subject: [PATCH] ethdev: force RSS offload rules again
> > >>
> > >> 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()
> > >
> > > Are the current app/examples in DPDK tree behave accordingly?
> > 
> > I tried a few which were good but I don't know about all.
> > 
> > That is why we should merge this patch early so that we can detect and fix
> > ones fails.
> 
> Acked-by: Shahaf Shuler <shahafs@mellanox.com>

Acked-by: Thomas Monjalon <thomas@monjalon.net>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-06-13 15:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-31 13:22 [PATCH] ethdev: force RSS offload rules again Ferruh Yigit
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.