DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] Querying for rte_flow support?
@ 2021-09-29 17:44 Stephen Hemminger
  2021-09-29 18:52 ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2021-09-29 17:44 UTC (permalink / raw)
  To: Thomas Monjalon, Ori Kam; +Cc: dev

Have a problem with auto-detecting whether device driver supports rte_flow.

Ideally in application would like to be able adapt to handle devices that
do rte_flow and those that do not.  If device does not support rte_flow,
then configure with RSS across multiple cores; if device does support rte_flow
then assign traffic to queue based on match (on MAC).

The problem is that there really is not a good API in DPDK for checking.
Most device drivers will not give the correct return to rte_flow_validate
unless the device is configured already, and some require device to be started.
In order to configure, the application has to choose how many queues to use
and that is the reason it wants to know if rte_flow will work!

The other alternative is looking at DPDK internal data structs to see
if device supports flow operations. That is not good, and causes more
issues in later releases.

Looks like rte_flow has a "chicken/egg problem" here.

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

* Re: [dpdk-dev] Querying for rte_flow support?
  2021-09-29 17:44 [dpdk-dev] Querying for rte_flow support? Stephen Hemminger
@ 2021-09-29 18:52 ` Thomas Monjalon
  2021-09-29 22:37   ` Stephen Hemminger
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Monjalon @ 2021-09-29 18:52 UTC (permalink / raw)
  To: Ori Kam, Stephen Hemminger; +Cc: dev, andrew.rybchenko, ferruh.yigit

29/09/2021 19:44, Stephen Hemminger:
> Have a problem with auto-detecting whether device driver supports rte_flow.
> 
> Ideally in application would like to be able adapt to handle devices that
> do rte_flow and those that do not.  If device does not support rte_flow,
> then configure with RSS across multiple cores; if device does support rte_flow
> then assign traffic to queue based on match (on MAC).
> 
> The problem is that there really is not a good API in DPDK for checking.
> Most device drivers will not give the correct return to rte_flow_validate
> unless the device is configured already, and some require device to be started.
> In order to configure, the application has to choose how many queues to use
> and that is the reason it wants to know if rte_flow will work!
> 
> The other alternative is looking at DPDK internal data structs to see
> if device supports flow operations. That is not good, and causes more
> issues in later releases.
> 
> Looks like rte_flow has a "chicken/egg problem" here.

I think we just need to fix drivers implementation of rte_flow_validate().
We must be able to validate a flow before starting the device.
Which drivers are refusing such check?
That's something we can check with some unit tests.



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

* Re: [dpdk-dev] Querying for rte_flow support?
  2021-09-29 18:52 ` Thomas Monjalon
@ 2021-09-29 22:37   ` Stephen Hemminger
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2021-09-29 22:37 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Ori Kam, dev, andrew.rybchenko, ferruh.yigit

On Wed, 29 Sep 2021 20:52:43 +0200
Thomas Monjalon <thomas@monjalon.net> wrote:

> 29/09/2021 19:44, Stephen Hemminger:
> > Have a problem with auto-detecting whether device driver supports rte_flow.
> > 
> > Ideally in application would like to be able adapt to handle devices that
> > do rte_flow and those that do not.  If device does not support rte_flow,
> > then configure with RSS across multiple cores; if device does support rte_flow
> > then assign traffic to queue based on match (on MAC).
> > 
> > The problem is that there really is not a good API in DPDK for checking.
> > Most device drivers will not give the correct return to rte_flow_validate
> > unless the device is configured already, and some require device to be started.
> > In order to configure, the application has to choose how many queues to use
> > and that is the reason it wants to know if rte_flow will work!
> > 
> > The other alternative is looking at DPDK internal data structs to see
> > if device supports flow operations. That is not good, and causes more
> > issues in later releases.
> > 
> > Looks like rte_flow has a "chicken/egg problem" here.  
> 
> I think we just need to fix drivers implementation of rte_flow_validate().
> We must be able to validate a flow before starting the device.
> Which drivers are refusing such check?
> That's something we can check with some unit tests.
> 
> 

The issue is with Broadcom but I see it with others.
Mostly because they validate the queue id in the flow request.

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

end of thread, other threads:[~2021-09-29 22:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-29 17:44 [dpdk-dev] Querying for rte_flow support? Stephen Hemminger
2021-09-29 18:52 ` Thomas Monjalon
2021-09-29 22:37   ` Stephen Hemminger

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).