DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/2] net/bonding: fix dedicated queues flow rule issue
@ 2021-10-05 17:16 Martin Havlik
  2021-10-27  9:55 ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Havlik @ 2021-10-05 17:16 UTC (permalink / raw)
  To: xhavli56
  Cc: Jan Viktorin, dev, chas3, humin29, ferruh.yigit, thomas,
	andrew.rybchenko, haiyue.wang, ivan.ilchenko, aman.deep.singh,
	kirankn, lirongqing, ajit.khaparde

This patchset stems from [1].

Not all PMDs allow RTE flow rule creation before device start.
Introduced capability marks the ones that allow it.
The capability is then used to fix flow rule creation for 
dedicated queues in slave devices in bonding.

The introduced capa _will need to be set_ for all appropriate PMDs
in `rte_eth_dev_info->dev_capa`.
That is not pretty, but it holds the semantics of a capability
correctly, as opposed to making it a requirement to have the device
started before creating flow rules.

[1] https://www.mail-archive.com/dev@dpdk.org/msg214840.html

Martin Havlik (2):
  lib/ethdev: introduce RTE_ETH_DEV_CAPA_FLOW_CREATE_BEFORE_START
  net/bonding: require started device for dedicated queues

 drivers/net/bonding/rte_eth_bond_pmd.c | 25 +++++++++++++++++++------
 lib/ethdev/rte_ethdev.h                |  2 ++
 2 files changed, 21 insertions(+), 6 deletions(-)

-- 
2.27.0


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

* Re: [dpdk-dev] [PATCH 0/2] net/bonding: fix dedicated queues flow rule issue
  2021-10-05 17:16 [dpdk-dev] [PATCH 0/2] net/bonding: fix dedicated queues flow rule issue Martin Havlik
@ 2021-10-27  9:55 ` Ferruh Yigit
  2021-11-07 11:03   ` Havlík Martin
  0 siblings, 1 reply; 3+ messages in thread
From: Ferruh Yigit @ 2021-10-27  9:55 UTC (permalink / raw)
  To: Martin Havlik
  Cc: Jan Viktorin, dev, chas3, humin29, thomas, andrew.rybchenko,
	haiyue.wang, ivan.ilchenko, aman.deep.singh, kirankn, lirongqing,
	ajit.khaparde, Ori Kam, Dmitry Kozlyuk

On 10/5/2021 6:16 PM, Martin Havlik wrote:
> This patchset stems from [1].
> 
> Not all PMDs allow RTE flow rule creation before device start.
> Introduced capability marks the ones that allow it.
> The capability is then used to fix flow rule creation for
> dedicated queues in slave devices in bonding.
> 
> The introduced capa _will need to be set_ for all appropriate PMDs
> in `rte_eth_dev_info->dev_capa`.
> That is not pretty, but it holds the semantics of a capability
> correctly, as opposed to making it a requirement to have the device
> started before creating flow rules.
> 

+Ori & Dmitry.

I think right now the method to check if device supports adding flow
rules when stopped is run 'rte_flow_create()' when device is stopped
and check return value.

Can we do similar in the bonding?

I am not clear if there is an error to differentiate flow create is
failed because device is stopped (or from some other reason).


And other option is, what happens if rule is always created after
device started?

> [1] https://www.mail-archive.com/dev@dpdk.org/msg214840.html
> 
> Martin Havlik (2):
>    lib/ethdev: introduce RTE_ETH_DEV_CAPA_FLOW_CREATE_BEFORE_START
>    net/bonding: require started device for dedicated queues
> 
>   drivers/net/bonding/rte_eth_bond_pmd.c | 25 +++++++++++++++++++------
>   lib/ethdev/rte_ethdev.h                |  2 ++
>   2 files changed, 21 insertions(+), 6 deletions(-)
> 


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

* Re: [dpdk-dev] [PATCH 0/2] net/bonding: fix dedicated queues flow rule issue
  2021-10-27  9:55 ` Ferruh Yigit
@ 2021-11-07 11:03   ` Havlík Martin
  0 siblings, 0 replies; 3+ messages in thread
From: Havlík Martin @ 2021-11-07 11:03 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: Jan Viktorin, dev, chas3, humin29, thomas, andrew.rybchenko,
	haiyue.wang, ivan.ilchenko, aman.deep.singh, kirankn, lirongqing,
	ajit.khaparde, Ori Kam, Dmitry Kozlyuk

Dne 2021-10-27 11:55, Ferruh Yigit napsal:
> On 10/5/2021 6:16 PM, Martin Havlik wrote:
>> This patchset stems from [1].
>> 
>> Not all PMDs allow RTE flow rule creation before device start.
>> Introduced capability marks the ones that allow it.
>> The capability is then used to fix flow rule creation for
>> dedicated queues in slave devices in bonding.
>> 
>> The introduced capa _will need to be set_ for all appropriate PMDs
>> in `rte_eth_dev_info->dev_capa`.
>> That is not pretty, but it holds the semantics of a capability
>> correctly, as opposed to making it a requirement to have the device
>> started before creating flow rules.
>> 
> 
> +Ori & Dmitry.
> 
> I think right now the method to check if device supports adding flow
> rules when stopped is run 'rte_flow_create()' when device is stopped
> and check return value.
> 
> Can we do similar in the bonding?
It might be a possible solution. The only thing I'm not sure about is 
that different PMDs may require different flow rule specifications for 
the rule to be valid, e.g. what pattern and action to set to this tryout 
flow rule? We would have to make sure the rule can be created on any PMD 
so failure would mean only one thing - device doesn't support creating 
flow rules when stopped.

Is that possible? Is it already a thing that is used somewhere?
> 
> I am not clear if there is an error to differentiate flow create is
> failed because device is stopped (or from some other reason).
> 
> 
> And other option is, what happens if rule is always created after
> device started?
That is what I originally proposed [here], but it didn't gain much 
favour so the idea got lost in the discussion.

[here] https://mails.dpdk.org/archives/dev/2021-June/212210.html
> 
>> [1] https://www.mail-archive.com/dev@dpdk.org/msg214840.html
>> 
>> Martin Havlik (2):
>>    lib/ethdev: introduce RTE_ETH_DEV_CAPA_FLOW_CREATE_BEFORE_START
>>    net/bonding: require started device for dedicated queues
>> 
>>   drivers/net/bonding/rte_eth_bond_pmd.c | 25 
>> +++++++++++++++++++------
>>   lib/ethdev/rte_ethdev.h                |  2 ++
>>   2 files changed, 21 insertions(+), 6 deletions(-)
>> 

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

end of thread, other threads:[~2021-11-07 11:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-05 17:16 [dpdk-dev] [PATCH 0/2] net/bonding: fix dedicated queues flow rule issue Martin Havlik
2021-10-27  9:55 ` Ferruh Yigit
2021-11-07 11:03   ` Havlík Martin

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