diff mbox series

[ovs-dev] netdev-offload-dpdk: setting RSS hash types in RSS action

Message ID 20220316080842.811478-1-baymaxhuang@gmail.com
State Accepted
Commit 48ae7b802bb35ecaf95b6b83e8a063fce714ff72
Headers show
Series [ovs-dev] netdev-offload-dpdk: setting RSS hash types in RSS action | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/intel-ovs-compilation fail test: fail

Commit Message

Harold Huang March 16, 2022, 8:08 a.m. UTC
When we send parallel flows such as VXLAN to a PF[1] port in OVS-DPDK with
multiple PMDs. OVS will create a RTE flow with Mark and RSS actions to send
flows to the software data path. But the RSS action does not work well and
all the flows are forwarded to a single PMD. This is because RSS hash types
should be set in RSS action.

[1]: In our testbed, a Mellanox ConnectX-6 is used as a PF port.

Signed-off-by: Harold Huang <baymaxhuang@gmail.com>
---
 lib/netdev-offload-dpdk.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Tonghao Zhang March 16, 2022, 8:32 a.m. UTC | #1
On Wed, Mar 16, 2022 at 4:09 PM Harold Huang <baymaxhuang@gmail.com> wrote:
>
> When we send parallel flows such as VXLAN to a PF[1] port in OVS-DPDK with
> multiple PMDs. OVS will create a RTE flow with Mark and RSS actions to send
> flows to the software data path. But the RSS action does not work well and
> all the flows are forwarded to a single PMD. This is because RSS hash types
> should be set in RSS action.
>
> [1]: In our testbed, a Mellanox ConnectX-6 is used as a PF port.
One question, did you test this patch on another NIC. e.g. ixgbe, i40e
we hope ovs can run on more NIC.
> Signed-off-by: Harold Huang <baymaxhuang@gmail.com>
> ---
>  lib/netdev-offload-dpdk.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c
> index 94dc6a9b7..1b8fba2e3 100644
> --- a/lib/netdev-offload-dpdk.c
> +++ b/lib/netdev-offload-dpdk.c
> @@ -18,6 +18,7 @@
>
>  #include <sys/types.h>
>  #include <netinet/ip6.h>
> +#include <rte_ethdev.h>
>  #include <rte_flow.h>
>  #include <rte_gre.h>
>
> @@ -1697,7 +1698,7 @@ add_flow_mark_rss_actions(struct flow_actions *actions,
>          .conf = (struct rte_flow_action_rss) {
>              .func = RTE_ETH_HASH_FUNCTION_DEFAULT,
>              .level = 0,
> -            .types = 0,
> +            .types = RTE_ETH_RSS_IP | RTE_ETH_RSS_UDP | RTE_ETH_RSS_TCP,
>              .queue_num = netdev_n_rxq(netdev),
>              .queue = rss_data->queue,
>              .key_len = 0,
> --
> 2.27.0
>
Harold Huang March 17, 2022, 4:01 a.m. UTC | #2
Hi,

On Wed, Mar 16, 2022 at 4:32 PM Tonghao Zhang <xiangxia.m.yue@gmail.com> wrote:
>
> On Wed, Mar 16, 2022 at 4:09 PM Harold Huang <baymaxhuang@gmail.com> wrote:
> >
> > When we send parallel flows such as VXLAN to a PF[1] port in OVS-DPDK with
> > multiple PMDs. OVS will create a RTE flow with Mark and RSS actions to send
> > flows to the software data path. But the RSS action does not work well and
> > all the flows are forwarded to a single PMD. This is because RSS hash types
> > should be set in RSS action.
> >
> > [1]: In our testbed, a Mellanox ConnectX-6 is used as a PF port.
> One question, did you test this patch on another NIC. e.g. ixgbe, i40e
> we hope ovs can run on more NIC.

Thanks for your suggestions.  I have tested it in Intel E810, Broadcom
NetXtreme-E. All of them could work well without this patch, ie.
parallel flows are RSS to different queues. And both of them could
work well after adding this patch.  But 82599 NIC with IXGBE driver
does not support Mark action and the offloaded Mark and RSS action are
failed. AFAIK it does not matter because Mark and RSS action is used
to accelerate the software datapath with Mark ID lookup. I do not have
an I40E testbed at present.  But I guess it could also work well
because Mark id action is also supported. Last but most important, we
should make sure anding RTE_ETH_RSS_IP | RTE_ETH_RSS_UDP |
RTE_ETH_RSS_TCP  RSS types do not have a negative effect. It seems
that most physical network drivers which support mark could also
support these RSS hash types. It could be seen at [1] these RSS hash
types have been set in the DPDK port initialization.  But IMO, it is
better to find a solution from the MLX5 dpdk driver.

[1]: https://github.com/openvswitch/ovs/blob/master/lib/netdev-dpdk.c#L167


> > Signed-off-by: Harold Huang <baymaxhuang@gmail.com>
> > ---
> >  lib/netdev-offload-dpdk.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c
> > index 94dc6a9b7..1b8fba2e3 100644
> > --- a/lib/netdev-offload-dpdk.c
> > +++ b/lib/netdev-offload-dpdk.c
> > @@ -18,6 +18,7 @@
> >
> >  #include <sys/types.h>
> >  #include <netinet/ip6.h>
> > +#include <rte_ethdev.h>
> >  #include <rte_flow.h>
> >  #include <rte_gre.h>
> >
> > @@ -1697,7 +1698,7 @@ add_flow_mark_rss_actions(struct flow_actions *actions,
> >          .conf = (struct rte_flow_action_rss) {
> >              .func = RTE_ETH_HASH_FUNCTION_DEFAULT,
> >              .level = 0,
> > -            .types = 0,
> > +            .types = RTE_ETH_RSS_IP | RTE_ETH_RSS_UDP | RTE_ETH_RSS_TCP,
> >              .queue_num = netdev_n_rxq(netdev),
> >              .queue = rss_data->queue,
> >              .key_len = 0,
> > --
> > 2.27.0
> >
>
>
> --
> Best regards, Tonghao
Tonghao Zhang March 18, 2022, 5:30 a.m. UTC | #3
On Thu, Mar 17, 2022 at 12:01 PM Harold Huang <baymaxhuang@gmail.com> wrote:
>
> Hi,
>
> On Wed, Mar 16, 2022 at 4:32 PM Tonghao Zhang <xiangxia.m.yue@gmail.com> wrote:
> >
> > On Wed, Mar 16, 2022 at 4:09 PM Harold Huang <baymaxhuang@gmail.com> wrote:
> > >
> > > When we send parallel flows such as VXLAN to a PF[1] port in OVS-DPDK with
> > > multiple PMDs. OVS will create a RTE flow with Mark and RSS actions to send
> > > flows to the software data path. But the RSS action does not work well and
> > > all the flows are forwarded to a single PMD. This is because RSS hash types
> > > should be set in RSS action.
> > >
> > > [1]: In our testbed, a Mellanox ConnectX-6 is used as a PF port.
> > One question, did you test this patch on another NIC. e.g. ixgbe, i40e
> > we hope ovs can run on more NIC.
>
> Thanks for your suggestions.  I have tested it in Intel E810, Broadcom
> NetXtreme-E. All of them could work well without this patch, ie.
> parallel flows are RSS to different queues. And both of them could
> work well after adding this patch.  But 82599 NIC with IXGBE driver
> does not support Mark action and the offloaded Mark and RSS action are
> failed. AFAIK it does not matter because Mark and RSS action is used
> to accelerate the software datapath with Mark ID lookup. I do not have
> an I40E testbed at present.  But I guess it could also work well
> because Mark id action is also supported. Last but most important, we
> should make sure anding RTE_ETH_RSS_IP | RTE_ETH_RSS_UDP |
> RTE_ETH_RSS_TCP  RSS types do not have a negative effect. It seems
> that most physical network drivers which support mark could also
> support these RSS hash types. It could be seen at [1] these RSS hash
> types have been set in the DPDK port initialization.  But IMO, it is
> better to find a solution from the MLX5 dpdk driver.
>
> [1]: https://github.com/openvswitch/ovs/blob/master/lib/netdev-dpdk.c#L167
Ok, let's wait for maintainer comments.
>
> > > Signed-off-by: Harold Huang <baymaxhuang@gmail.com>
> > > ---
> > >  lib/netdev-offload-dpdk.c | 3 ++-
> > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c
> > > index 94dc6a9b7..1b8fba2e3 100644
> > > --- a/lib/netdev-offload-dpdk.c
> > > +++ b/lib/netdev-offload-dpdk.c
> > > @@ -18,6 +18,7 @@
> > >
> > >  #include <sys/types.h>
> > >  #include <netinet/ip6.h>
> > > +#include <rte_ethdev.h>
> > >  #include <rte_flow.h>
> > >  #include <rte_gre.h>
> > >
> > > @@ -1697,7 +1698,7 @@ add_flow_mark_rss_actions(struct flow_actions *actions,
> > >          .conf = (struct rte_flow_action_rss) {
> > >              .func = RTE_ETH_HASH_FUNCTION_DEFAULT,
> > >              .level = 0,
> > > -            .types = 0,
> > > +            .types = RTE_ETH_RSS_IP | RTE_ETH_RSS_UDP | RTE_ETH_RSS_TCP,
> > >              .queue_num = netdev_n_rxq(netdev),
> > >              .queue = rss_data->queue,
> > >              .key_len = 0,
> > > --
> > > 2.27.0
> > >
> >
> >
> > --
> > Best regards, Tonghao
Harold Huang March 22, 2022, 2:08 a.m. UTC | #4
Hello,
    Is there any opinion from the OVS or DPDK MLX5 driver maintainers?
This is a serious issue we've found when we use MLX5 PMD driver to
offload OVS-DPDK.

On Fri, Mar 18, 2022 at 1:31 PM Tonghao Zhang <xiangxia.m.yue@gmail.com> wrote:
>
> On Thu, Mar 17, 2022 at 12:01 PM Harold Huang <baymaxhuang@gmail.com> wrote:
> >
> > Hi,
> >
> > On Wed, Mar 16, 2022 at 4:32 PM Tonghao Zhang <xiangxia.m.yue@gmail.com> wrote:
> > >
> > > On Wed, Mar 16, 2022 at 4:09 PM Harold Huang <baymaxhuang@gmail.com> wrote:
> > > >
> > > > When we send parallel flows such as VXLAN to a PF[1] port in OVS-DPDK with
> > > > multiple PMDs. OVS will create a RTE flow with Mark and RSS actions to send
> > > > flows to the software data path. But the RSS action does not work well and
> > > > all the flows are forwarded to a single PMD. This is because RSS hash types
> > > > should be set in RSS action.
> > > >
> > > > [1]: In our testbed, a Mellanox ConnectX-6 is used as a PF port.
> > > One question, did you test this patch on another NIC. e.g. ixgbe, i40e
> > > we hope ovs can run on more NIC.
> >
> > Thanks for your suggestions.  I have tested it in Intel E810, Broadcom
> > NetXtreme-E. All of them could work well without this patch, ie.
> > parallel flows are RSS to different queues. And both of them could
> > work well after adding this patch.  But 82599 NIC with IXGBE driver
> > does not support Mark action and the offloaded Mark and RSS action are
> > failed. AFAIK it does not matter because Mark and RSS action is used
> > to accelerate the software datapath with Mark ID lookup. I do not have
> > an I40E testbed at present.  But I guess it could also work well
> > because Mark id action is also supported. Last but most important, we
> > should make sure anding RTE_ETH_RSS_IP | RTE_ETH_RSS_UDP |
> > RTE_ETH_RSS_TCP  RSS types do not have a negative effect. It seems
> > that most physical network drivers which support mark could also
> > support these RSS hash types. It could be seen at [1] these RSS hash
> > types have been set in the DPDK port initialization.  But IMO, it is
> > better to find a solution from the MLX5 dpdk driver.
> >
> > [1]: https://github.com/openvswitch/ovs/blob/master/lib/netdev-dpdk.c#L167
> Ok, let's wait for maintainer comments.
> >
> > > > Signed-off-by: Harold Huang <baymaxhuang@gmail.com>
> > > > ---
> > > >  lib/netdev-offload-dpdk.c | 3 ++-
> > > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c
> > > > index 94dc6a9b7..1b8fba2e3 100644
> > > > --- a/lib/netdev-offload-dpdk.c
> > > > +++ b/lib/netdev-offload-dpdk.c
> > > > @@ -18,6 +18,7 @@
> > > >
> > > >  #include <sys/types.h>
> > > >  #include <netinet/ip6.h>
> > > > +#include <rte_ethdev.h>
> > > >  #include <rte_flow.h>
> > > >  #include <rte_gre.h>
> > > >
> > > > @@ -1697,7 +1698,7 @@ add_flow_mark_rss_actions(struct flow_actions *actions,
> > > >          .conf = (struct rte_flow_action_rss) {
> > > >              .func = RTE_ETH_HASH_FUNCTION_DEFAULT,
> > > >              .level = 0,
> > > > -            .types = 0,
> > > > +            .types = RTE_ETH_RSS_IP | RTE_ETH_RSS_UDP | RTE_ETH_RSS_TCP,
> > > >              .queue_num = netdev_n_rxq(netdev),
> > > >              .queue = rss_data->queue,
> > > >              .key_len = 0,
> > > > --
> > > > 2.27.0
> > > >
> > >
> > >
> > > --
> > > Best regards, Tonghao
>
>
>
> --
> Best regards, Tonghao

Thanks, Harold.
Ilya Maximets June 20, 2022, 5:59 p.m. UTC | #5
On 3/22/22 03:08, Harold Huang wrote:
> Hello,
>     Is there any opinion from the OVS or DPDK MLX5 driver maintainers?
> This is a serious issue we've found when we use MLX5 PMD driver to
> offload OVS-DPDK.

It looks like DPDK is very inconsistent and drivers do not really
put any effort in setting up a "best effort" hashing mechanism.
mlx5 driver seems to use just RTE_ETH_RSS_IP.

I suppose, there is no harm in using the same set of hashing fields
as we do for RSS configuration in netdev-dpdk.

Ian, Eli, what do you think?

> 
> On Fri, Mar 18, 2022 at 1:31 PM Tonghao Zhang <xiangxia.m.yue@gmail.com> wrote:
>>
>> On Thu, Mar 17, 2022 at 12:01 PM Harold Huang <baymaxhuang@gmail.com> wrote:
>>>
>>> Hi,
>>>
>>> On Wed, Mar 16, 2022 at 4:32 PM Tonghao Zhang <xiangxia.m.yue@gmail.com> wrote:
>>>>
>>>> On Wed, Mar 16, 2022 at 4:09 PM Harold Huang <baymaxhuang@gmail.com> wrote:
>>>>>
>>>>> When we send parallel flows such as VXLAN to a PF[1] port in OVS-DPDK with
>>>>> multiple PMDs. OVS will create a RTE flow with Mark and RSS actions to send
>>>>> flows to the software data path. But the RSS action does not work well and
>>>>> all the flows are forwarded to a single PMD. This is because RSS hash types
>>>>> should be set in RSS action.
>>>>>
>>>>> [1]: In our testbed, a Mellanox ConnectX-6 is used as a PF port.
>>>> One question, did you test this patch on another NIC. e.g. ixgbe, i40e
>>>> we hope ovs can run on more NIC.
>>>
>>> Thanks for your suggestions.  I have tested it in Intel E810, Broadcom
>>> NetXtreme-E. All of them could work well without this patch, ie.
>>> parallel flows are RSS to different queues. And both of them could
>>> work well after adding this patch.  But 82599 NIC with IXGBE driver
>>> does not support Mark action and the offloaded Mark and RSS action are
>>> failed. AFAIK it does not matter because Mark and RSS action is used
>>> to accelerate the software datapath with Mark ID lookup. I do not have
>>> an I40E testbed at present.  But I guess it could also work well
>>> because Mark id action is also supported. Last but most important, we
>>> should make sure anding RTE_ETH_RSS_IP | RTE_ETH_RSS_UDP |
>>> RTE_ETH_RSS_TCP  RSS types do not have a negative effect. It seems
>>> that most physical network drivers which support mark could also
>>> support these RSS hash types. It could be seen at [1] these RSS hash
>>> types have been set in the DPDK port initialization.  But IMO, it is
>>> better to find a solution from the MLX5 dpdk driver.
>>>
>>> [1]: https://github.com/openvswitch/ovs/blob/master/lib/netdev-dpdk.c#L167
>> Ok, let's wait for maintainer comments.
>>>
>>>>> Signed-off-by: Harold Huang <baymaxhuang@gmail.com>
>>>>> ---
>>>>>  lib/netdev-offload-dpdk.c | 3 ++-
>>>>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c
>>>>> index 94dc6a9b7..1b8fba2e3 100644
>>>>> --- a/lib/netdev-offload-dpdk.c
>>>>> +++ b/lib/netdev-offload-dpdk.c
>>>>> @@ -18,6 +18,7 @@
>>>>>
>>>>>  #include <sys/types.h>
>>>>>  #include <netinet/ip6.h>
>>>>> +#include <rte_ethdev.h>
>>>>>  #include <rte_flow.h>
>>>>>  #include <rte_gre.h>
>>>>>
>>>>> @@ -1697,7 +1698,7 @@ add_flow_mark_rss_actions(struct flow_actions *actions,
>>>>>          .conf = (struct rte_flow_action_rss) {
>>>>>              .func = RTE_ETH_HASH_FUNCTION_DEFAULT,
>>>>>              .level = 0,
>>>>> -            .types = 0,
>>>>> +            .types = RTE_ETH_RSS_IP | RTE_ETH_RSS_UDP | RTE_ETH_RSS_TCP,
>>>>>              .queue_num = netdev_n_rxq(netdev),
>>>>>              .queue = rss_data->queue,
>>>>>              .key_len = 0,
>>>>> --
>>>>> 2.27.0
>>>>>
>>>>
>>>>
>>>> --
>>>> Best regards, Tonghao
>>
>>
>>
>> --
>> Best regards, Tonghao
> 
> Thanks, Harold.
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
Emma Finn June 24, 2022, 2:41 p.m. UTC | #6
> -----Original Message-----
> From: dev <ovs-dev-bounces@openvswitch.org> On Behalf Of Ilya
> Maximets
> Sent: Monday 20 June 2022 19:00
> To: ovs-dev@openvswitch.org; Stokes, Ian <ian.stokes@intel.com>
> Cc: Eli Britstein <elibr@nvidia.com>; viacheslavo@nvidia.com; Flavio Leitner
> <fbl@sysclose.org>; i.maximets@ovn.org; matan@nvidia.com
> Subject: Re: [ovs-dev] [PATCH] netdev-offload-dpdk: setting RSS hash types
> in RSS action
> 
> On 3/22/22 03:08, Harold Huang wrote:
> > Hello,
> >     Is there any opinion from the OVS or DPDK MLX5 driver maintainers?
> > This is a serious issue we've found when we use MLX5 PMD driver to
> > offload OVS-DPDK.
> 
> It looks like DPDK is very inconsistent and drivers do not really put any effort
> in setting up a "best effort" hashing mechanism.
> mlx5 driver seems to use just RTE_ETH_RSS_IP.
> 
> I suppose, there is no harm in using the same set of hashing fields as we do
> for RSS configuration in netdev-dpdk.
> 
> Ian, Eli, what do you think?
> 
Hi, 

I took this patch and tested on both Intel E810 and i40e. Flows are being offloaded correctly and this won't break MARK and RSS action for Intel NICs.

Thanks, 
Emma 

> >
> > On Fri, Mar 18, 2022 at 1:31 PM Tonghao Zhang
> <xiangxia.m.yue@gmail.com> wrote:
> >>
> >> On Thu, Mar 17, 2022 at 12:01 PM Harold Huang
> <baymaxhuang@gmail.com> wrote:
> >>>
> >>> Hi,
> >>>
> >>> On Wed, Mar 16, 2022 at 4:32 PM Tonghao Zhang
> <xiangxia.m.yue@gmail.com> wrote:
> >>>>
> >>>> On Wed, Mar 16, 2022 at 4:09 PM Harold Huang
> <baymaxhuang@gmail.com> wrote:
> >>>>>
> >>>>> When we send parallel flows such as VXLAN to a PF[1] port in
> >>>>> OVS-DPDK with multiple PMDs. OVS will create a RTE flow with Mark
> >>>>> and RSS actions to send flows to the software data path. But the
> >>>>> RSS action does not work well and all the flows are forwarded to a
> >>>>> single PMD. This is because RSS hash types should be set in RSS action.
> >>>>>
> >>>>> [1]: In our testbed, a Mellanox ConnectX-6 is used as a PF port.
> >>>> One question, did you test this patch on another NIC. e.g. ixgbe,
> >>>> i40e we hope ovs can run on more NIC.
> >>>
> >>> Thanks for your suggestions.  I have tested it in Intel E810,
> >>> Broadcom NetXtreme-E. All of them could work well without this patch,
> ie.
> >>> parallel flows are RSS to different queues. And both of them could
> >>> work well after adding this patch.  But 82599 NIC with IXGBE driver
> >>> does not support Mark action and the offloaded Mark and RSS action
> >>> are failed. AFAIK it does not matter because Mark and RSS action is
> >>> used to accelerate the software datapath with Mark ID lookup. I do
> >>> not have an I40E testbed at present.  But I guess it could also work
> >>> well because Mark id action is also supported. Last but most
> >>> important, we should make sure anding RTE_ETH_RSS_IP |
> >>> RTE_ETH_RSS_UDP | RTE_ETH_RSS_TCP  RSS types do not have a
> negative
> >>> effect. It seems that most physical network drivers which support
> >>> mark could also support these RSS hash types. It could be seen at
> >>> [1] these RSS hash types have been set in the DPDK port
> >>> initialization.  But IMO, it is better to find a solution from the MLX5 dpdk
> driver.
> >>>
> >>> [1]:
> >>> https://github.com/openvswitch/ovs/blob/master/lib/netdev-
> dpdk.c#L16
> >>> 7
> >> Ok, let's wait for maintainer comments.
> >>>
> >>>>> Signed-off-by: Harold Huang <baymaxhuang@gmail.com>
> >>>>> ---
> >>>>>  lib/netdev-offload-dpdk.c | 3 ++-
> >>>>>  1 file changed, 2 insertions(+), 1 deletion(-)
> >>>>>
> >>>>> diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c
> >>>>> index 94dc6a9b7..1b8fba2e3 100644
> >>>>> --- a/lib/netdev-offload-dpdk.c
> >>>>> +++ b/lib/netdev-offload-dpdk.c
> >>>>> @@ -18,6 +18,7 @@
> >>>>>
> >>>>>  #include <sys/types.h>
> >>>>>  #include <netinet/ip6.h>
> >>>>> +#include <rte_ethdev.h>
> >>>>>  #include <rte_flow.h>
> >>>>>  #include <rte_gre.h>
> >>>>>
> >>>>> @@ -1697,7 +1698,7 @@ add_flow_mark_rss_actions(struct
> flow_actions *actions,
> >>>>>          .conf = (struct rte_flow_action_rss) {
> >>>>>              .func = RTE_ETH_HASH_FUNCTION_DEFAULT,
> >>>>>              .level = 0,
> >>>>> -            .types = 0,
> >>>>> +            .types = RTE_ETH_RSS_IP | RTE_ETH_RSS_UDP |
> >>>>> + RTE_ETH_RSS_TCP,
> >>>>>              .queue_num = netdev_n_rxq(netdev),
> >>>>>              .queue = rss_data->queue,
> >>>>>              .key_len = 0,
> >>>>> --
> >>>>> 2.27.0
> >>>>>
> >>>>
> >>>>
> >>>> --
> >>>> Best regards, Tonghao
> >>
> >>
> >>
> >> --
> >> Best regards, Tonghao
> >
> > Thanks, Harold.
> > _______________________________________________
> > dev mailing list
> > dev@openvswitch.org
> > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> >
> 
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Eli Britstein June 24, 2022, 3:17 p.m. UTC | #7
+Ori
Ilya Maximets July 19, 2022, 8:21 p.m. UTC | #8
On 6/24/22 17:17, Eli Britstein wrote:
> +Ori
> 
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> *From:* Finn, Emma <emma.finn@intel.com>
> *Sent:* Friday, June 24, 2022 5:41 PM
> *To:* Ilya Maximets <i.maximets@ovn.org>; ovs-dev@openvswitch.org <ovs-dev@openvswitch.org>; Stokes, Ian <ian.stokes@intel.com>
> *Cc:* Eli Britstein <elibr@nvidia.com>; Slava Ovsiienko <viacheslavo@nvidia.com>; Flavio Leitner <fbl@sysclose.org>; Matan Azrad <matan@nvidia.com>
> *Subject:* RE: [ovs-dev] [PATCH] netdev-offload-dpdk: setting RSS hash types in RSS action
>  
> External email: Use caution opening links or attachments
> 
> 
>> -----Original Message-----
>> From: dev <ovs-dev-bounces@openvswitch.org> On Behalf Of Ilya
>> Maximets
>> Sent: Monday 20 June 2022 19:00
>> To: ovs-dev@openvswitch.org; Stokes, Ian <ian.stokes@intel.com>
>> Cc: Eli Britstein <elibr@nvidia.com>; viacheslavo@nvidia.com; Flavio Leitner
>> <fbl@sysclose.org>; i.maximets@ovn.org; matan@nvidia.com
>> Subject: Re: [ovs-dev] [PATCH] netdev-offload-dpdk: setting RSS hash types
>> in RSS action
>>
>> On 3/22/22 03:08, Harold Huang wrote:
>> > Hello,
>> >     Is there any opinion from the OVS or DPDK MLX5 driver maintainers?
>> > This is a serious issue we've found when we use MLX5 PMD driver to
>> > offload OVS-DPDK.
>>
>> It looks like DPDK is very inconsistent and drivers do not really put any effort
>> in setting up a "best effort" hashing mechanism.
>> mlx5 driver seems to use just RTE_ETH_RSS_IP.
>>
>> I suppose, there is no harm in using the same set of hashing fields as we do
>> for RSS configuration in netdev-dpdk.
>>
>> Ian, Eli, what do you think?
>>
> Hi,
> 
> I took this patch and tested on both Intel E810 and i40e. Flows are being offloaded correctly and this won't break MARK and RSS action for Intel NICs.

Thanks, Emma, Harold and Tonghao.  Since there is no further
progress on this topic and the patch seems to work fine, I
applied it.  Also backported down to 2.17 since this behavior
may cause significant performance issues.

Best regards, Ilya Maximets.
diff mbox series

Patch

diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c
index 94dc6a9b7..1b8fba2e3 100644
--- a/lib/netdev-offload-dpdk.c
+++ b/lib/netdev-offload-dpdk.c
@@ -18,6 +18,7 @@ 
 
 #include <sys/types.h>
 #include <netinet/ip6.h>
+#include <rte_ethdev.h>
 #include <rte_flow.h>
 #include <rte_gre.h>
 
@@ -1697,7 +1698,7 @@  add_flow_mark_rss_actions(struct flow_actions *actions,
         .conf = (struct rte_flow_action_rss) {
             .func = RTE_ETH_HASH_FUNCTION_DEFAULT,
             .level = 0,
-            .types = 0,
+            .types = RTE_ETH_RSS_IP | RTE_ETH_RSS_UDP | RTE_ETH_RSS_TCP,
             .queue_num = netdev_n_rxq(netdev),
             .queue = rss_data->queue,
             .key_len = 0,