Skip to contentSkip to conversation

netdev-offload-dpdk: Use has_vlan match attribute

PATCH Ilya Maximets 2 participants 3 messages Aug 24, 2021 3 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): SN6PR11MB316556D38F83BA754D38C0BDEAC59@SN6PR11MB3165.namprd11.prod.outlook.com

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 28 lines · Eli Britstein
Quoted 13 lines · Emma

External email: Use caution opening links or attachments

-----Original Message-----
From: Eli Britstein <[email protected]>
Sent: Monday 16 August 2021 14:55
To: [email protected]; Ilya Maximets <[email protected]>
Cc: Finn, Emma <[email protected]>; Stokes, Ian <[email protected]>; Sriharsha Basavapatna <[email protected]>; Gaetan Rivet <[email protected]>; Majd Dibbiny <[email protected]>; Eli Britstein <[email protected]>; Salem Sol <[email protected]>
Subject: [PATCH V3 1/2] netdev-offload-dpdk: Use has_vlan match attribute

DPDK 20.11 introduced an ability to specify existance/non-existance of VLAN tag by [1]. Use this attribute.

Quoted 8 lines

[1]: 09315fc83861 ("ethdev: add VLAN attributes to ethernet and VLAN items")

Hi Eli,

I tested this but currently we don't have support in the i40e pmd for the has_vlan match attribute and with these patches it is breaking offload for VLAN packets on Intel devices.

Hi Emma,

Thanks for testing.

Quoted 7 lines

Is adding such support in your plans?

How do you suggest to proceed? It is needed in order to fix OVS bug.

Thanks,

Eli

The "Table 1.2 rte_flow items availability in networking drivers"
here: https://doc.dpdk.org/guides/nics/overview.html
says that both ixgbe and i40e has a full support for 'vlan' and 'eth' items. Is it a bug? Should it be 'partial' instead?

In general, this sounds like a big limitation of rte_flow API. I mean the fact that there is no way to get what is implemented by a particular driver and what is not implemented in runtime. Someone should, probably, work on adding this kind of API to DPDK. Otherwise, we will stuck with inability to use certain actions/matches unless all the drivers supports them (which is also hard to check taking documentation issues into account). If I missed it and the API actually exists, we should definitely start using it.

CC dpdk-dev and rte_flow maintainers.

Thoughts?

Best regards, Ilya Maximets.

#4 lore raw
Quoted 51 lines · Ilya Maximets

External email: Use caution opening links or attachments

Quoted 26 lines · Eli Britstein
Quoted 13 lines · Emma

External email: Use caution opening links or attachments

-----Original Message-----
From: Eli Britstein <[email protected]>
Sent: Monday 16 August 2021 14:55
To: [email protected]; Ilya Maximets <[email protected]>
Cc: Finn, Emma <[email protected]>; Stokes, Ian <[email protected]>; Sriharsha Basavapatna <[email protected]>; Gaetan Rivet <[email protected]>; Majd Dibbiny <[email protected]>; Eli Britstein <[email protected]>; Salem Sol <[email protected]>
Subject: [PATCH V3 1/2] netdev-offload-dpdk: Use has_vlan match attribute

DPDK 20.11 introduced an ability to specify existance/non-existance of VLAN tag by [1]. Use this attribute.

Quoted 8 lines

[1]: 09315fc83861 ("ethdev: add VLAN attributes to ethernet and VLAN items")

Hi Eli,

I tested this but currently we don't have support in the i40e pmd for the has_vlan match attribute and with these patches it is breaking offload for VLAN packets on Intel devices.

Hi Emma,

Thanks for testing.

Quoted 7 lines

Is adding such support in your plans?

How do you suggest to proceed? It is needed in order to fix OVS bug.

Thanks,

Eli

The "Table 1.2 rte_flow items availability in networking drivers"
here: https://doc.dpdk.org/guides/nics/overview.html
says that both ixgbe and i40e has a full support for 'vlan' and 'eth' items. Is it a bug? Should it be 'partial' instead?

In general, this sounds like a big limitation of rte_flow API. I mean the fact that there is no way to get what is implemented by a particular driver and what is not implemented in runtime. Someone should, probably, work on adding this kind of API to DPDK. Otherwise, we will stuck with inability to use certain actions/matches unless all the drivers supports them (which is also hard to check taking documentation issues into account). If I missed it and the API actually exists, we should definitely start using it.

Quoted 3 lines
CC dpdk-dev and rte_flow maintainers.

Thoughts?

There is such an API - rte_flow_validate().

However, in OVS, as each flow is independent and can have different matches and actions, we just call rte_flow_create(). The PMD (at least mlx5) first internally validates it (as if rte_flow_validate() is called), and bail out with a failure in case validate fails.

Can you suggest an effective way to utilize it in OVS?

In theory, if the API exists in rte_flow, OVS should not care if all PMDs support it or not.

In practice, the "has_vlan" field was introduced only in 20.11, and apparently Intel has not adapted i40e PMD, so it breaks their offloads. I suspected this so I've added Emma and Ian to review it.

I don't know i40e HW capabilities, but at least from PMD point of view, it can be silently ignored until a proper support is added.

Quoted 2 lines

Best regards, Ilya Maximets.

#5 lore raw
Quoted 55 lines · Eli Britstein
Quoted 53 lines · Ilya Maximets

External email: Use caution opening links or attachments

Quoted 26 lines · Eli Britstein
Quoted 13 lines · Emma

External email: Use caution opening links or attachments

-----Original Message-----
From: Eli Britstein <[email protected]>
Sent: Monday 16 August 2021 14:55
To: [email protected]; Ilya Maximets <[email protected]>
Cc: Finn, Emma <[email protected]>; Stokes, Ian <[email protected]>; Sriharsha Basavapatna <[email protected]>; Gaetan Rivet <[email protected]>; Majd Dibbiny <[email protected]>; Eli Britstein <[email protected]>; Salem Sol <[email protected]>
Subject: [PATCH V3 1/2] netdev-offload-dpdk: Use has_vlan match attribute

DPDK 20.11 introduced an ability to specify existance/non-existance of VLAN tag by [1]. Use this attribute.

Quoted 8 lines

[1]: 09315fc83861 ("ethdev: add VLAN attributes to ethernet and VLAN items")

Hi Eli,

I tested this but currently we don't have support in the i40e pmd for the has_vlan match attribute and with these patches it is breaking offload for VLAN packets on Intel devices.

Hi Emma,

Thanks for testing.

Quoted 7 lines

Is adding such support in your plans?

How do you suggest to proceed? It is needed in order to fix OVS bug.

Thanks,

Eli

The "Table 1.2 rte_flow items availability in networking drivers"
here: https://doc.dpdk.org/guides/nics/overview.html
says that both ixgbe and i40e has a full support for 'vlan' and 'eth' items.  Is it a bug?  Should it be 'partial' instead?

In general, this sounds like a big limitation of rte_flow API. I mean the fact that there is no way to get what is implemented by a particular driver and what is not implemented in runtime. Someone should, probably, work on adding this kind of API to DPDK. Otherwise, we will stuck with inability to use certain actions/matches unless all the drivers supports them (which is also hard to check taking documentation issues into account).  If I missed it and the API actually exists, we should definitely start using it.

CC dpdk-dev and rte_flow maintainers.
Quoted 7 lines
Quoted 1 line

Thoughts?

There is such an API - rte_flow_validate().

However, in OVS, as each flow is independent and can have different matches and actions, we just call rte_flow_create(). The PMD (at least mlx5) first internally validates it (as if rte_flow_validate() is called), and bail out with a failure in case validate fails.

Can you suggest an effective way to utilize it in OVS?

This one is hard to use. And I guess, it's hard to determine what exactly is not supported as some things can be only supported in certain combinations or otherwise not supported in certain combinations. So, rte_flow_validate() doesn't seem to be suitable for checking particular features and alternating the flow construction based on that. If we had clear yes/no flags for all features that could be easily probed/verified or otherwise retrived from the driver, that would be better.

But it seems to be a problem for current rte_flow implementations in actual drivers.

Quoted 9 lines

In theory, if the API exists in rte_flow, OVS should not care if all PMDs support it or not.

In practice, the "has_vlan" field was introduced only in 20.11, and apparently Intel has not adapted i40e PMD, so it breaks their offloads. I suspected this so I've added Emma and Ian to review it.

I don't know i40e HW capabilities, but at least from PMD point of view, it can be silently ignored until a proper support is added.

Quoted 2 lines

Best regards, Ilya Maximets.