+Ori

________________________________
From: Finn, Emma <emma.f...@intel.com>
Sent: Friday, June 24, 2022 5:41 PM
To: Ilya Maximets <i.maxim...@ovn.org>; ovs-dev@openvswitch.org 
<ovs-dev@openvswitch.org>; Stokes, Ian <ian.sto...@intel.com>
Cc: Eli Britstein <el...@nvidia.com>; Slava Ovsiienko <viachesl...@nvidia.com>; 
Flavio Leitner <f...@sysclose.org>; Matan Azrad <ma...@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-boun...@openvswitch.org> On Behalf Of Ilya
> Maximets
> Sent: Monday 20 June 2022 19:00
> To: ovs-dev@openvswitch.org; Stokes, Ian <ian.sto...@intel.com>
> Cc: Eli Britstein <el...@nvidia.com>; viachesl...@nvidia.com; Flavio Leitner
> <f...@sysclose.org>; i.maxim...@ovn.org; ma...@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....@gmail.com> wrote:
> >>
> >> On Thu, Mar 17, 2022 at 12:01 PM Harold Huang
> <baymaxhu...@gmail.com> wrote:
> >>>
> >>> Hi,
> >>>
> >>> On Wed, Mar 16, 2022 at 4:32 PM Tonghao Zhang
> <xiangxia.m....@gmail.com> wrote:
> >>>>
> >>>> On Wed, Mar 16, 2022 at 4:09 PM Harold Huang
> <baymaxhu...@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://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fopenvswitch%2Fovs%2Fblob%2Fmaster%2Flib%2Fnetdev-&amp;data=05%7C01%7Celibr%40nvidia.com%7C32f22d1688cb4e0434e808da55ef9bb5%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C637916784861900812%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=wuia5DfwM4Esw3y1yd8cZE5%2BJyPzzXTm2zKKhat%2FxJk%3D&amp;reserved=0
> dpdk.c#L16
> >>> 7
> >> Ok, let's wait for maintainer comments.
> >>>
> >>>>> Signed-off-by: Harold Huang <baymaxhu...@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
> > d...@openvswitch.org
> > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.openvswitch.org%2Fmailman%2Flistinfo%2Fovs-dev&amp;data=05%7C01%7Celibr%40nvidia.com%7C32f22d1688cb4e0434e808da55ef9bb5%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C637916784861900812%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=0%2B6GtkL%2FcYGidcFQ6vBlTm5AQ%2FXt7DIVySmLKC6ytlU%3D&amp;reserved=0
> >
>
> _______________________________________________
> dev mailing list
> d...@openvswitch.org
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.openvswitch.org%2Fmailman%2Flistinfo%2Fovs-dev&amp;data=05%7C01%7Celibr%40nvidia.com%7C32f22d1688cb4e0434e808da55ef9bb5%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C637916784861900812%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=0%2B6GtkL%2FcYGidcFQ6vBlTm5AQ%2FXt7DIVySmLKC6ytlU%3D&amp;reserved=0
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to