diff mbox series

[ovs-dev,v2,8/8] netdev-dpdk: set FDIR config

Message ID 1504603381-30071-9-git-send-email-yliu@fridaylinux.org
State Superseded
Headers show
Series OVS-DPDK flow offload with rte_flow | expand

Commit Message

Yuanhan Liu Sept. 5, 2017, 9:23 a.m. UTC
From: Finn Christensen <fc@napatech.com>

The Intel i40e PMD driver requires the fdir mode set to
RTE_FDIR_MODE_PERFECT, otherwise, the flow creation would
be failed.

Co-authored-by: Yuanhan Liu <yliu@fridaylinux.org>
Signed-off-by: Finn Christensen <fc@napatech.com>
Signed-off-by: Yuanhan Liu <yliu@fridaylinux.org>
---
---
 lib/netdev-dpdk.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Simon Horman Sept. 8, 2017, 4:48 p.m. UTC | #1
On Tue, Sep 05, 2017 at 05:23:01PM +0800, Yuanhan Liu wrote:
> From: Finn Christensen <fc@napatech.com>
> 
> The Intel i40e PMD driver requires the fdir mode set to
> RTE_FDIR_MODE_PERFECT, otherwise, the flow creation would
> be failed.

This appears to update a setting that is used more broadly than
with the hardware cited above. I'd value some discussion
of whether that is safe/appropriate/etc... ?

...
Yuanhan Liu Sept. 11, 2017, 6:20 a.m. UTC | #2
On Fri, Sep 08, 2017 at 06:48:16PM +0200, Simon Horman wrote:
> On Tue, Sep 05, 2017 at 05:23:01PM +0800, Yuanhan Liu wrote:
> > From: Finn Christensen <fc@napatech.com>
> > 
> > The Intel i40e PMD driver requires the fdir mode set to
> > RTE_FDIR_MODE_PERFECT, otherwise, the flow creation would
> > be failed.
> 
> This appears to update a setting that is used more broadly than
> with the hardware cited above. I'd value some discussion
> of whether that is safe/appropriate/etc... ?

Sure, and comments are welcome. For Mellanox, AFAIK, the setting is
ignored.

	--yliu
Chandran, Sugesh Sept. 11, 2017, 7:42 a.m. UTC | #3
Regards
_Sugesh


> -----Original Message-----
> From: ovs-dev-bounces@openvswitch.org [mailto:ovs-dev-
> bounces@openvswitch.org] On Behalf Of Yuanhan Liu
> Sent: Tuesday, September 5, 2017 10:23 AM
> To: dev@openvswitch.org
> Subject: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set FDIR config
> 
> From: Finn Christensen <fc@napatech.com>
> 
> The Intel i40e PMD driver requires the fdir mode set to
> RTE_FDIR_MODE_PERFECT, otherwise, the flow creation would be failed.
[Sugesh] this means it doesn't honor the flow masks which passed onto rte_flow_*?
> 
> Co-authored-by: Yuanhan Liu <yliu@fridaylinux.org>
> Signed-off-by: Finn Christensen <fc@napatech.com>
> Signed-off-by: Yuanhan Liu <yliu@fridaylinux.org>
> ---
> ---
>  lib/netdev-dpdk.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index e363c92..beb7b68
> 100644
> --- a/lib/netdev-dpdk.c
> +++ b/lib/netdev-dpdk.c
> @@ -177,6 +177,9 @@ static const struct rte_eth_conf port_conf = {
>      .txmode = {
>          .mq_mode = ETH_MQ_TX_NONE,
>      },
> +    .fdir_conf = {
> +        .mode = RTE_FDIR_MODE_PERFECT,
> +    },
>  };
> 
>  /*
> --
> 2.7.4
> 
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Yuanhan Liu Sept. 11, 2017, 7:54 a.m. UTC | #4
On Mon, Sep 11, 2017 at 07:42:57AM +0000, Chandran, Sugesh wrote:
> 
> 
> Regards
> _Sugesh
> 
> 
> > -----Original Message-----
> > From: ovs-dev-bounces@openvswitch.org [mailto:ovs-dev-
> > bounces@openvswitch.org] On Behalf Of Yuanhan Liu
> > Sent: Tuesday, September 5, 2017 10:23 AM
> > To: dev@openvswitch.org
> > Subject: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set FDIR config
> > 
> > From: Finn Christensen <fc@napatech.com>
> > 
> > The Intel i40e PMD driver requires the fdir mode set to
> > RTE_FDIR_MODE_PERFECT, otherwise, the flow creation would be failed.
> [Sugesh] this means it doesn't honor the flow masks which passed onto rte_flow_*?

IIRC, that's what I found after divig the code. It's an issue reported/fixed
by Finn. I also don't have the nic for testing.

	--yliu
Finn Christensen Sept. 11, 2017, 8:14 a.m. UTC | #5
-----Original Message-----
From: ovs-dev-bounces@openvswitch.org [mailto:ovs-dev-bounces@openvswitch.org] On Behalf Of Yuanhan Liu
Sent: 11. september 2017 09:55
To: Chandran, Sugesh <sugesh.chandran@intel.com>
Cc: dev@openvswitch.org
Subject: Re: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set FDIR config

On Mon, Sep 11, 2017 at 07:42:57AM +0000, Chandran, Sugesh wrote:
> 
> 
> Regards
> _Sugesh
> 
> 
> > -----Original Message-----
> > From: ovs-dev-bounces@openvswitch.org [mailto:ovs-dev- 
> > bounces@openvswitch.org] On Behalf Of Yuanhan Liu
> > Sent: Tuesday, September 5, 2017 10:23 AM
> > To: dev@openvswitch.org
> > Subject: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set FDIR config
> > 
> > From: Finn Christensen <fc@napatech.com>
> > 
> > The Intel i40e PMD driver requires the fdir mode set to 
> > RTE_FDIR_MODE_PERFECT, otherwise, the flow creation would be failed.
> [Sugesh] this means it doesn't honor the flow masks which passed onto rte_flow_*?

IIRC, that's what I found after divig the code. It's an issue reported/fixed by Finn. I also don't have the nic for testing.

[Finn] Yes, this was needed to make our test setup using an XL710 work, with the rte_flow implementation.
It's a while ago so I don't exactly remember how we ended up with this solution. However, we are definitely not
Intel XL710 experts, so there might be other ways to achieve the rte_flow functionality.
This issue, and problem raised about the overall change in configuration impact on NICs using this setting (Napatech 
does not use it), I think should be reviewed/verified by NIC vendors using it.

	--yliu
Darrell Ball Sept. 12, 2017, 8:35 a.m. UTC | #6
On 9/10/17, 11:21 PM, "ovs-dev-bounces@openvswitch.org on behalf of Yuanhan Liu" <ovs-dev-bounces@openvswitch.org on behalf of yliu@fridaylinux.org> wrote:

    On Fri, Sep 08, 2017 at 06:48:16PM +0200, Simon Horman wrote:
    > On Tue, Sep 05, 2017 at 05:23:01PM +0800, Yuanhan Liu wrote:
    > > From: Finn Christensen <fc@napatech.com>
    > > 
    > > The Intel i40e PMD driver requires the fdir mode set to
    > > RTE_FDIR_MODE_PERFECT, otherwise, the flow creation would
    > > be failed.
    > 
    > This appears to update a setting that is used more broadly than
    > with the hardware cited above. I'd value some discussion
    > of whether that is safe/appropriate/etc... ?
    
    Sure, and comments are welcome. For Mellanox, AFAIK, the setting is
    ignored.


[Darrell] There was an earlier request that we explain the setting with a comment in the code itself. It is selectively honoured.

Flow Director setting modes: none, signature or perfect.
Enumerator:
RTE_FDIR_MODE_NONE 	Disable FDIR support.
RTE_FDIR_MODE_SIGNATURE 	Enable FDIR signature filter mode.
RTE_FDIR_MODE_PERFECT 	Enable FDIR perfect filter mode.
RTE_FDIR_MODE_PERFECT_MAC_VLAN 	Enable FDIR filter mode - MAC VLAN.
RTE_FDIR_MODE_PERFECT_TUNNEL 	Enable FDIR filter mode - tunnel.



    
    	--yliu
    _______________________________________________
    dev mailing list
    dev@openvswitch.org
    https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.openvswitch.org_mailman_listinfo_ovs-2Ddev&d=DwICAg&c=uilaK90D4TOVoH58JNXRgQ&r=BVhFA09CGX7JQ5Ih-uZnsw&m=HgMbtZrcMFWRL4NcADpvGei5A-3TvTB8rd9Zodnc-b4&s=RF8VUON-r0t8-dSvGpKAdhrd8q8Zdl8Vjmj9d1Eev8I&e=
Darrell Ball Sept. 13, 2017, 1:57 a.m. UTC | #7
On 9/11/17, 1:14 AM, "ovs-dev-bounces@openvswitch.org on behalf of Finn Christensen" <ovs-dev-bounces@openvswitch.org on behalf of fc@napatech.com> wrote:

    -----Original Message-----
    From: ovs-dev-bounces@openvswitch.org [mailto:ovs-dev-bounces@openvswitch.org] On Behalf Of Yuanhan Liu
    Sent: 11. september 2017 09:55
    To: Chandran, Sugesh <sugesh.chandran@intel.com>
    Cc: dev@openvswitch.org
    Subject: Re: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set FDIR config
    
    On Mon, Sep 11, 2017 at 07:42:57AM +0000, Chandran, Sugesh wrote:
    > 
    > 
    > Regards
    > _Sugesh
    > 
    > 
    > > -----Original Message-----
    > > From: ovs-dev-bounces@openvswitch.org [mailto:ovs-dev- 
    > > bounces@openvswitch.org] On Behalf Of Yuanhan Liu
    > > Sent: Tuesday, September 5, 2017 10:23 AM
    > > To: dev@openvswitch.org
    > > Subject: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set FDIR config
    > > 
    > > From: Finn Christensen <fc@napatech.com>
    > > 
    > > The Intel i40e PMD driver requires the fdir mode set to 
    > > RTE_FDIR_MODE_PERFECT, otherwise, the flow creation would be failed.
    > [Sugesh] this means it doesn't honor the flow masks which passed onto rte_flow_*?
    
    IIRC, that's what I found after divig the code. It's an issue reported/fixed by Finn. I also don't have the nic for testing.
    
    [Finn] Yes, this was needed to make our test setup using an XL710 work, with the rte_flow implementation.
    It's a while ago so I don't exactly remember how we ended up with this solution. However, we are definitely not
    Intel XL710 experts, so there might be other ways to achieve the rte_flow functionality.
    This issue, and problem raised about the overall change in configuration impact on NICs using this setting (Napatech 
    does not use it), I think should be reviewed/verified by NIC vendors using it.


[Darrell] We need to confirm the masking in the flow (but from what I see, it is ignored as Sugesh mentioned),
                which would be a significant difference.
                I guess we need input from Intel flow director folks to be sure and check if this can be done otherwise.
                What about the 82599 as another example ?
                
                
       
               

    
    	--yliu
    _______________________________________________
    dev mailing list
    dev@openvswitch.org
    https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.openvswitch.org_mailman_listinfo_ovs-2Ddev&d=DwICAg&c=uilaK90D4TOVoH58JNXRgQ&r=BVhFA09CGX7JQ5Ih-uZnsw&m=MnFLi9pqa8AAxTecf0rx1ZIKcaMXyRz3GI8IUJSNBgE&s=mzq2ViO4y-0Dg2ViC_jgcIvw4dmc39-_BjWqDKrpG2A&e= 
    _______________________________________________
    dev mailing list
    dev@openvswitch.org
    https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.openvswitch.org_mailman_listinfo_ovs-2Ddev&d=DwICAg&c=uilaK90D4TOVoH58JNXRgQ&r=BVhFA09CGX7JQ5Ih-uZnsw&m=MnFLi9pqa8AAxTecf0rx1ZIKcaMXyRz3GI8IUJSNBgE&s=mzq2ViO4y-0Dg2ViC_jgcIvw4dmc39-_BjWqDKrpG2A&e=
Yuanhan Liu Sept. 14, 2017, 3:18 a.m. UTC | #8
On Wed, Sep 13, 2017 at 01:57:22AM +0000, Darrell Ball wrote:
> 
> 
> On 9/11/17, 1:14 AM, "ovs-dev-bounces@openvswitch.org on behalf of Finn Christensen" <ovs-dev-bounces@openvswitch.org on behalf of fc@napatech.com> wrote:
> 
>     -----Original Message-----
>     From: ovs-dev-bounces@openvswitch.org [mailto:ovs-dev-bounces@openvswitch.org] On Behalf Of Yuanhan Liu
>     Sent: 11. september 2017 09:55
>     To: Chandran, Sugesh <sugesh.chandran@intel.com>
>     Cc: dev@openvswitch.org
>     Subject: Re: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set FDIR config
>     
>     On Mon, Sep 11, 2017 at 07:42:57AM +0000, Chandran, Sugesh wrote:
>     > 
>     > 
>     > Regards
>     > _Sugesh
>     > 
>     > 
>     > > -----Original Message-----
>     > > From: ovs-dev-bounces@openvswitch.org [mailto:ovs-dev- 
>     > > bounces@openvswitch.org] On Behalf Of Yuanhan Liu
>     > > Sent: Tuesday, September 5, 2017 10:23 AM
>     > > To: dev@openvswitch.org
>     > > Subject: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set FDIR config
>     > > 
>     > > From: Finn Christensen <fc@napatech.com>
>     > > 
>     > > The Intel i40e PMD driver requires the fdir mode set to 
>     > > RTE_FDIR_MODE_PERFECT, otherwise, the flow creation would be failed.
>     > [Sugesh] this means it doesn't honor the flow masks which passed onto rte_flow_*?
>     
>     IIRC, that's what I found after divig the code. It's an issue reported/fixed by Finn. I also don't have the nic for testing.
>     
>     [Finn] Yes, this was needed to make our test setup using an XL710 work, with the rte_flow implementation.
>     It's a while ago so I don't exactly remember how we ended up with this solution. However, we are definitely not
>     Intel XL710 experts, so there might be other ways to achieve the rte_flow functionality.
>     This issue, and problem raised about the overall change in configuration impact on NICs using this setting (Napatech 
>     does not use it), I think should be reviewed/verified by NIC vendors using it.
> 
> 
> [Darrell] We need to confirm the masking in the flow (but from what I see, it is ignored as Sugesh mentioned),
>                 which would be a significant difference.
>                 I guess we need input from Intel flow director folks to be sure and check if this can be done otherwise.
>                 What about the 82599 as another example ?


I will leave this to Intel folks.

	--yliu
Chandran, Sugesh Sept. 14, 2017, 5:36 p.m. UTC | #9
Regards
_Sugesh

> -----Original Message-----
> From: Yuanhan Liu [mailto:yliu@fridaylinux.org]
> Sent: Thursday, September 14, 2017 4:19 AM
> To: Darrell Ball <dball@vmware.com>
> Cc: Finn Christensen <fc@napatech.com>; Chandran, Sugesh
> <sugesh.chandran@intel.com>; dev@openvswitch.org
> Subject: Re: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set FDIR config
> 
> On Wed, Sep 13, 2017 at 01:57:22AM +0000, Darrell Ball wrote:
> >
> >
> > On 9/11/17, 1:14 AM, "ovs-dev-bounces@openvswitch.org on behalf of
> Finn Christensen" <ovs-dev-bounces@openvswitch.org on behalf of
> fc@napatech.com> wrote:
> >
> >     -----Original Message-----
> >     From: ovs-dev-bounces@openvswitch.org [mailto:ovs-dev-
> bounces@openvswitch.org] On Behalf Of Yuanhan Liu
> >     Sent: 11. september 2017 09:55
> >     To: Chandran, Sugesh <sugesh.chandran@intel.com>
> >     Cc: dev@openvswitch.org
> >     Subject: Re: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set FDIR config
> >
> >     On Mon, Sep 11, 2017 at 07:42:57AM +0000, Chandran, Sugesh wrote:
> >     >
> >     >
> >     > Regards
> >     > _Sugesh
> >     >
> >     >
> >     > > -----Original Message-----
> >     > > From: ovs-dev-bounces@openvswitch.org [mailto:ovs-dev-
> >     > > bounces@openvswitch.org] On Behalf Of Yuanhan Liu
> >     > > Sent: Tuesday, September 5, 2017 10:23 AM
> >     > > To: dev@openvswitch.org
> >     > > Subject: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set FDIR config
> >     > >
> >     > > From: Finn Christensen <fc@napatech.com>
> >     > >
> >     > > The Intel i40e PMD driver requires the fdir mode set to
> >     > > RTE_FDIR_MODE_PERFECT, otherwise, the flow creation would be
> failed.
> >     > [Sugesh] this means it doesn't honor the flow masks which passed onto
> rte_flow_*?
> >
> >     IIRC, that's what I found after divig the code. It's an issue reported/fixed
> by Finn. I also don't have the nic for testing.
> >
> >     [Finn] Yes, this was needed to make our test setup using an XL710 work,
> with the rte_flow implementation.
> >     It's a while ago so I don't exactly remember how we ended up with this
> solution. However, we are definitely not
> >     Intel XL710 experts, so there might be other ways to achieve the
> rte_flow functionality.
> >     This issue, and problem raised about the overall change in configuration
> impact on NICs using this setting (Napatech
> >     does not use it), I think should be reviewed/verified by NIC vendors
> using it.
> >
> >
> > [Darrell] We need to confirm the masking in the flow (but from what I see,
> it is ignored as Sugesh mentioned),
> >                 which would be a significant difference.
> >                 I guess we need input from Intel flow director folks to be sure and
> check if this can be done otherwise.
> >                 What about the 82599 as another example ?
> 
> 
> I will leave this to Intel folks.
[Sugesh] From the 82599 datasheet 

=======
The 82599 support two types of filtering modes (static setting by the FDIRCTRL.PerfectMatch
bit):
* Perfect match filters - The hardware checks a match between the masked fields of
the received packets and the programmed filters. Masked fields should be
programmed as zeros in the filter context. The 82599 support up to 8 K - 2 perfect
match filters.
* Signature filters - The hardware checks a match between a hash-based signature of
the masked fields of the received packet. The 82599 supports up to 32 K - 2
signature filters.
* Notation - The Perfect Match fields and Signature field are denoted as Flow ID fields.
The 82599 supports masking / range for the previously described fields. These masks are
defined globally for all filters in the FDIR...M register.
=======
So my understanding is even if it can support masking, the mask is global and not per flow.

Again I will confirm this and provide more details.

> 
> 	--yliu
Darrell Ball Sept. 14, 2017, 5:46 p.m. UTC | #10
On 9/14/17, 10:36 AM, "Chandran, Sugesh" <sugesh.chandran@intel.com> wrote:

    
    
    Regards
    _Sugesh
    
    > -----Original Message-----

    > From: Yuanhan Liu [mailto:yliu@fridaylinux.org]

    > Sent: Thursday, September 14, 2017 4:19 AM

    > To: Darrell Ball <dball@vmware.com>

    > Cc: Finn Christensen <fc@napatech.com>; Chandran, Sugesh

    > <sugesh.chandran@intel.com>; dev@openvswitch.org

    > Subject: Re: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set FDIR config

    > 

    > On Wed, Sep 13, 2017 at 01:57:22AM +0000, Darrell Ball wrote:

    > >

    > >

    > > On 9/11/17, 1:14 AM, "ovs-dev-bounces@openvswitch.org on behalf of

    > Finn Christensen" <ovs-dev-bounces@openvswitch.org on behalf of

    > fc@napatech.com> wrote:

    > >

    > >     -----Original Message-----

    > >     From: ovs-dev-bounces@openvswitch.org [mailto:ovs-dev-

    > bounces@openvswitch.org] On Behalf Of Yuanhan Liu

    > >     Sent: 11. september 2017 09:55

    > >     To: Chandran, Sugesh <sugesh.chandran@intel.com>

    > >     Cc: dev@openvswitch.org

    > >     Subject: Re: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set FDIR config

    > >

    > >     On Mon, Sep 11, 2017 at 07:42:57AM +0000, Chandran, Sugesh wrote:

    > >     >

    > >     >

    > >     > Regards

    > >     > _Sugesh

    > >     >

    > >     >

    > >     > > -----Original Message-----

    > >     > > From: ovs-dev-bounces@openvswitch.org [mailto:ovs-dev-

    > >     > > bounces@openvswitch.org] On Behalf Of Yuanhan Liu

    > >     > > Sent: Tuesday, September 5, 2017 10:23 AM

    > >     > > To: dev@openvswitch.org

    > >     > > Subject: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set FDIR config

    > >     > >

    > >     > > From: Finn Christensen <fc@napatech.com>

    > >     > >

    > >     > > The Intel i40e PMD driver requires the fdir mode set to

    > >     > > RTE_FDIR_MODE_PERFECT, otherwise, the flow creation would be

    > failed.

    > >     > [Sugesh] this means it doesn't honor the flow masks which passed onto

    > rte_flow_*?

    > >

    > >     IIRC, that's what I found after divig the code. It's an issue reported/fixed

    > by Finn. I also don't have the nic for testing.

    > >

    > >     [Finn] Yes, this was needed to make our test setup using an XL710 work,

    > with the rte_flow implementation.

    > >     It's a while ago so I don't exactly remember how we ended up with this

    > solution. However, we are definitely not

    > >     Intel XL710 experts, so there might be other ways to achieve the

    > rte_flow functionality.

    > >     This issue, and problem raised about the overall change in configuration

    > impact on NICs using this setting (Napatech

    > >     does not use it), I think should be reviewed/verified by NIC vendors

    > using it.

    > >

    > >

    > > [Darrell] We need to confirm the masking in the flow (but from what I see,

    > it is ignored as Sugesh mentioned),

    > >                 which would be a significant difference.

    > >                 I guess we need input from Intel flow director folks to be sure and

    > check if this can be done otherwise.

    > >                 What about the 82599 as another example ?

    > 

    > 

    > I will leave this to Intel folks.

    [Sugesh] From the 82599 datasheet 
    
    =======
    The 82599 support two types of filtering modes (static setting by the FDIRCTRL.PerfectMatch
    bit):
    * Perfect match filters - The hardware checks a match between the masked fields of
    the received packets and the programmed filters. Masked fields should be
    programmed as zeros in the filter context. The 82599 support up to 8 K - 2 perfect
    match filters.
    * Signature filters - The hardware checks a match between a hash-based signature of
    the masked fields of the received packet. The 82599 supports up to 32 K - 2
    signature filters.
    * Notation - The Perfect Match fields and Signature field are denoted as Flow ID fields.
    The 82599 supports masking / range for the previously described fields. These masks are
    defined globally for all filters in the FDIR...M register.
    =======
    So my understanding is even if it can support masking, the mask is global and not per flow.

[Darrell] That was my interpretation as well; same across flow director usages.

    Again I will confirm this and provide more details.

[Darrell] One question is – ‘is there some way to enable per flow masking’ with this config ?
                A second request is – ‘is there another option than RTE_FDIR_MODE_PERFECT
                or similar’ to use to achieve the result ?

    
    > 

    > 	--yliu
Chandran, Sugesh Sept. 20, 2017, 1:47 p.m. UTC | #11
Regards
_Sugesh


> -----Original Message-----

> From: Darrell Ball [mailto:dball@vmware.com]

> Sent: Thursday, September 14, 2017 6:46 PM

> To: Chandran, Sugesh <sugesh.chandran@intel.com>; Yuanhan Liu

> <yliu@fridaylinux.org>

> Cc: Finn Christensen <fc@napatech.com>; dev@openvswitch.org

> Subject: Re: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set FDIR config

> 

> 

> 

> On 9/14/17, 10:36 AM, "Chandran, Sugesh" <sugesh.chandran@intel.com>

> wrote:

> 

> 

> 

>     Regards

>     _Sugesh

> 

>     > -----Original Message-----

>     > From: Yuanhan Liu [mailto:yliu@fridaylinux.org]

>     > Sent: Thursday, September 14, 2017 4:19 AM

>     > To: Darrell Ball <dball@vmware.com>

>     > Cc: Finn Christensen <fc@napatech.com>; Chandran, Sugesh

>     > <sugesh.chandran@intel.com>; dev@openvswitch.org

>     > Subject: Re: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set FDIR config

>     >

>     > On Wed, Sep 13, 2017 at 01:57:22AM +0000, Darrell Ball wrote:

>     > >

>     > >

>     > > On 9/11/17, 1:14 AM, "ovs-dev-bounces@openvswitch.org on behalf of

>     > Finn Christensen" <ovs-dev-bounces@openvswitch.org on behalf of

>     > fc@napatech.com> wrote:

>     > >

>     > >     -----Original Message-----

>     > >     From: ovs-dev-bounces@openvswitch.org [mailto:ovs-dev-

>     > bounces@openvswitch.org] On Behalf Of Yuanhan Liu

>     > >     Sent: 11. september 2017 09:55

>     > >     To: Chandran, Sugesh <sugesh.chandran@intel.com>

>     > >     Cc: dev@openvswitch.org

>     > >     Subject: Re: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set FDIR config

>     > >

>     > >     On Mon, Sep 11, 2017 at 07:42:57AM +0000, Chandran, Sugesh wrote:

>     > >     >

>     > >     >

>     > >     > Regards

>     > >     > _Sugesh

>     > >     >

>     > >     >

>     > >     > > -----Original Message-----

>     > >     > > From: ovs-dev-bounces@openvswitch.org [mailto:ovs-dev-

>     > >     > > bounces@openvswitch.org] On Behalf Of Yuanhan Liu

>     > >     > > Sent: Tuesday, September 5, 2017 10:23 AM

>     > >     > > To: dev@openvswitch.org

>     > >     > > Subject: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set FDIR config

>     > >     > >

>     > >     > > From: Finn Christensen <fc@napatech.com>

>     > >     > >

>     > >     > > The Intel i40e PMD driver requires the fdir mode set to

>     > >     > > RTE_FDIR_MODE_PERFECT, otherwise, the flow creation would be

>     > failed.

>     > >     > [Sugesh] this means it doesn't honor the flow masks which passed

> onto

>     > rte_flow_*?

>     > >

>     > >     IIRC, that's what I found after divig the code. It's an issue reported/fixed

>     > by Finn. I also don't have the nic for testing.

>     > >

>     > >     [Finn] Yes, this was needed to make our test setup using an XL710 work,

>     > with the rte_flow implementation.

>     > >     It's a while ago so I don't exactly remember how we ended up with this

>     > solution. However, we are definitely not

>     > >     Intel XL710 experts, so there might be other ways to achieve the

>     > rte_flow functionality.

>     > >     This issue, and problem raised about the overall change in configuration

>     > impact on NICs using this setting (Napatech

>     > >     does not use it), I think should be reviewed/verified by NIC vendors

>     > using it.

>     > >

>     > >

>     > > [Darrell] We need to confirm the masking in the flow (but from what I see,

>     > it is ignored as Sugesh mentioned),

>     > >                 which would be a significant difference.

>     > >                 I guess we need input from Intel flow director folks to be sure and

>     > check if this can be done otherwise.

>     > >                 What about the 82599 as another example ?

>     >

>     >

>     > I will leave this to Intel folks.

>     [Sugesh] From the 82599 datasheet

> 

>     =======

>     The 82599 support two types of filtering modes (static setting by the

> FDIRCTRL.PerfectMatch

>     bit):

>     * Perfect match filters - The hardware checks a match between the masked

> fields of

>     the received packets and the programmed filters. Masked fields should be

>     programmed as zeros in the filter context. The 82599 support up to 8 K - 2

> perfect

>     match filters.

>     * Signature filters - The hardware checks a match between a hash-based

> signature of

>     the masked fields of the received packet. The 82599 supports up to 32 K - 2

>     signature filters.

>     * Notation - The Perfect Match fields and Signature field are denoted as Flow

> ID fields.

>     The 82599 supports masking / range for the previously described fields. These

> masks are

>     defined globally for all filters in the FDIR...M register.

>     =======

>     So my understanding is even if it can support masking, the mask is global and

> not per flow.

> 

> [Darrell] That was my interpretation as well; same across flow director usages.

> 

>     Again I will confirm this and provide more details.

> 

> [Darrell] One question is – ‘is there some way to enable per flow masking’ with

> this config ?

[Sugesh] No for Intel NIC. It’s a silicon limitation on Fortville. The mask is a global config.
>                 A second request is – ‘is there another option than

> RTE_FDIR_MODE_PERFECT

>                 or similar’ to use to achieve the result ?

[Sugesh] For Fortville this is the only option that can use for per flow.

> 

> 

>     >

>     > 	--yliu

>
Darrell Ball Sept. 21, 2017, 8:04 a.m. UTC | #12
Hi Yuanhan/Finn

I think we may need to caveat the Fortville nics due to the global mask
limitation; we also discussed this in the dpdk meeting yesterday.

What do you think ?

Thanks Darrell

On 9/20/17, 6:47 AM, "Chandran, Sugesh" <sugesh.chandran@intel.com> wrote:

    
    
    Regards
    _Sugesh
    
    
    > -----Original Message-----

    > From: Darrell Ball [mailto:dball@vmware.com]

    > Sent: Thursday, September 14, 2017 6:46 PM

    > To: Chandran, Sugesh <sugesh.chandran@intel.com>; Yuanhan Liu

    > <yliu@fridaylinux.org>

    > Cc: Finn Christensen <fc@napatech.com>; dev@openvswitch.org

    > Subject: Re: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set FDIR config

    > 

    > 

    > 

    > On 9/14/17, 10:36 AM, "Chandran, Sugesh" <sugesh.chandran@intel.com>

    > wrote:

    > 

    > 

    > 

    >     Regards

    >     _Sugesh

    > 

    >     > -----Original Message-----

    >     > From: Yuanhan Liu [mailto:yliu@fridaylinux.org]

    >     > Sent: Thursday, September 14, 2017 4:19 AM

    >     > To: Darrell Ball <dball@vmware.com>

    >     > Cc: Finn Christensen <fc@napatech.com>; Chandran, Sugesh

    >     > <sugesh.chandran@intel.com>; dev@openvswitch.org

    >     > Subject: Re: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set FDIR config

    >     >

    >     > On Wed, Sep 13, 2017 at 01:57:22AM +0000, Darrell Ball wrote:

    >     > >

    >     > >

    >     > > On 9/11/17, 1:14 AM, "ovs-dev-bounces@openvswitch.org on behalf of

    >     > Finn Christensen" <ovs-dev-bounces@openvswitch.org on behalf of

    >     > fc@napatech.com> wrote:

    >     > >

    >     > >     -----Original Message-----

    >     > >     From: ovs-dev-bounces@openvswitch.org [mailto:ovs-dev-

    >     > bounces@openvswitch.org] On Behalf Of Yuanhan Liu

    >     > >     Sent: 11. september 2017 09:55

    >     > >     To: Chandran, Sugesh <sugesh.chandran@intel.com>

    >     > >     Cc: dev@openvswitch.org

    >     > >     Subject: Re: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set FDIR config

    >     > >

    >     > >     On Mon, Sep 11, 2017 at 07:42:57AM +0000, Chandran, Sugesh wrote:

    >     > >     >

    >     > >     >

    >     > >     > Regards

    >     > >     > _Sugesh

    >     > >     >

    >     > >     >

    >     > >     > > -----Original Message-----

    >     > >     > > From: ovs-dev-bounces@openvswitch.org [mailto:ovs-dev-

    >     > >     > > bounces@openvswitch.org] On Behalf Of Yuanhan Liu

    >     > >     > > Sent: Tuesday, September 5, 2017 10:23 AM

    >     > >     > > To: dev@openvswitch.org

    >     > >     > > Subject: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set FDIR config

    >     > >     > >

    >     > >     > > From: Finn Christensen <fc@napatech.com>

    >     > >     > >

    >     > >     > > The Intel i40e PMD driver requires the fdir mode set to

    >     > >     > > RTE_FDIR_MODE_PERFECT, otherwise, the flow creation would be

    >     > failed.

    >     > >     > [Sugesh] this means it doesn't honor the flow masks which passed

    > onto

    >     > rte_flow_*?

    >     > >

    >     > >     IIRC, that's what I found after divig the code. It's an issue reported/fixed

    >     > by Finn. I also don't have the nic for testing.

    >     > >

    >     > >     [Finn] Yes, this was needed to make our test setup using an XL710 work,

    >     > with the rte_flow implementation.

    >     > >     It's a while ago so I don't exactly remember how we ended up with this

    >     > solution. However, we are definitely not

    >     > >     Intel XL710 experts, so there might be other ways to achieve the

    >     > rte_flow functionality.

    >     > >     This issue, and problem raised about the overall change in configuration

    >     > impact on NICs using this setting (Napatech

    >     > >     does not use it), I think should be reviewed/verified by NIC vendors

    >     > using it.

    >     > >

    >     > >

    >     > > [Darrell] We need to confirm the masking in the flow (but from what I see,

    >     > it is ignored as Sugesh mentioned),

    >     > >                 which would be a significant difference.

    >     > >                 I guess we need input from Intel flow director folks to be sure and

    >     > check if this can be done otherwise.

    >     > >                 What about the 82599 as another example ?

    >     >

    >     >

    >     > I will leave this to Intel folks.

    >     [Sugesh] From the 82599 datasheet

    > 

    >     =======

    >     The 82599 support two types of filtering modes (static setting by the

    > FDIRCTRL.PerfectMatch

    >     bit):

    >     * Perfect match filters - The hardware checks a match between the masked

    > fields of

    >     the received packets and the programmed filters. Masked fields should be

    >     programmed as zeros in the filter context. The 82599 support up to 8 K - 2

    > perfect

    >     match filters.

    >     * Signature filters - The hardware checks a match between a hash-based

    > signature of

    >     the masked fields of the received packet. The 82599 supports up to 32 K - 2

    >     signature filters.

    >     * Notation - The Perfect Match fields and Signature field are denoted as Flow

    > ID fields.

    >     The 82599 supports masking / range for the previously described fields. These

    > masks are

    >     defined globally for all filters in the FDIR...M register.

    >     =======

    >     So my understanding is even if it can support masking, the mask is global and

    > not per flow.

    > 

    > [Darrell] That was my interpretation as well; same across flow director usages.

    > 

    >     Again I will confirm this and provide more details.

    > 

    > [Darrell] One question is – ‘is there some way to enable per flow masking’ with

    > this config ?

    [Sugesh] No for Intel NIC. It’s a silicon limitation on Fortville. The mask is a global config.
    >                 A second request is – ‘is there another option than

    > RTE_FDIR_MODE_PERFECT

    >                 or similar’ to use to achieve the result ?

    [Sugesh] For Fortville this is the only option that can use for per flow.
    
    > 

    > 

    >     >

    >     > 	--yliu

    >
Yuanhan Liu Sept. 21, 2017, 8:54 a.m. UTC | #13
On Thu, Sep 21, 2017 at 08:04:45AM +0000, Darrell Ball wrote:
> Hi Yuanhan/Finn
> 
> I think we may need to caveat the Fortville nics due to the global mask
> limitation;

Sorry, I didn't follow you. Like how? Or what specifically I could/should
do?

	--yliu

> we also discussed this in the dpdk meeting yesterday.
> 
> What do you think ?
> 
> Thanks Darrell
> 
> On 9/20/17, 6:47 AM, "Chandran, Sugesh" <sugesh.chandran@intel.com> wrote:
> 
>     
>     
>     Regards
>     _Sugesh
>     
>     
>     > -----Original Message-----
>     > From: Darrell Ball [mailto:dball@vmware.com]
>     > Sent: Thursday, September 14, 2017 6:46 PM
>     > To: Chandran, Sugesh <sugesh.chandran@intel.com>; Yuanhan Liu
>     > <yliu@fridaylinux.org>
>     > Cc: Finn Christensen <fc@napatech.com>; dev@openvswitch.org
>     > Subject: Re: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set FDIR config
>     > 
>     > 
>     > 
>     > On 9/14/17, 10:36 AM, "Chandran, Sugesh" <sugesh.chandran@intel.com>
>     > wrote:
>     > 
>     > 
>     > 
>     >     Regards
>     >     _Sugesh
>     > 
>     >     > -----Original Message-----
>     >     > From: Yuanhan Liu [mailto:yliu@fridaylinux.org]
>     >     > Sent: Thursday, September 14, 2017 4:19 AM
>     >     > To: Darrell Ball <dball@vmware.com>
>     >     > Cc: Finn Christensen <fc@napatech.com>; Chandran, Sugesh
>     >     > <sugesh.chandran@intel.com>; dev@openvswitch.org
>     >     > Subject: Re: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set FDIR config
>     >     >
>     >     > On Wed, Sep 13, 2017 at 01:57:22AM +0000, Darrell Ball wrote:
>     >     > >
>     >     > >
>     >     > > On 9/11/17, 1:14 AM, "ovs-dev-bounces@openvswitch.org on behalf of
>     >     > Finn Christensen" <ovs-dev-bounces@openvswitch.org on behalf of
>     >     > fc@napatech.com> wrote:
>     >     > >
>     >     > >     -----Original Message-----
>     >     > >     From: ovs-dev-bounces@openvswitch.org [mailto:ovs-dev-
>     >     > bounces@openvswitch.org] On Behalf Of Yuanhan Liu
>     >     > >     Sent: 11. september 2017 09:55
>     >     > >     To: Chandran, Sugesh <sugesh.chandran@intel.com>
>     >     > >     Cc: dev@openvswitch.org
>     >     > >     Subject: Re: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set FDIR config
>     >     > >
>     >     > >     On Mon, Sep 11, 2017 at 07:42:57AM +0000, Chandran, Sugesh wrote:
>     >     > >     >
>     >     > >     >
>     >     > >     > Regards
>     >     > >     > _Sugesh
>     >     > >     >
>     >     > >     >
>     >     > >     > > -----Original Message-----
>     >     > >     > > From: ovs-dev-bounces@openvswitch.org [mailto:ovs-dev-
>     >     > >     > > bounces@openvswitch.org] On Behalf Of Yuanhan Liu
>     >     > >     > > Sent: Tuesday, September 5, 2017 10:23 AM
>     >     > >     > > To: dev@openvswitch.org
>     >     > >     > > Subject: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set FDIR config
>     >     > >     > >
>     >     > >     > > From: Finn Christensen <fc@napatech.com>
>     >     > >     > >
>     >     > >     > > The Intel i40e PMD driver requires the fdir mode set to
>     >     > >     > > RTE_FDIR_MODE_PERFECT, otherwise, the flow creation would be
>     >     > failed.
>     >     > >     > [Sugesh] this means it doesn't honor the flow masks which passed
>     > onto
>     >     > rte_flow_*?
>     >     > >
>     >     > >     IIRC, that's what I found after divig the code. It's an issue reported/fixed
>     >     > by Finn. I also don't have the nic for testing.
>     >     > >
>     >     > >     [Finn] Yes, this was needed to make our test setup using an XL710 work,
>     >     > with the rte_flow implementation.
>     >     > >     It's a while ago so I don't exactly remember how we ended up with this
>     >     > solution. However, we are definitely not
>     >     > >     Intel XL710 experts, so there might be other ways to achieve the
>     >     > rte_flow functionality.
>     >     > >     This issue, and problem raised about the overall change in configuration
>     >     > impact on NICs using this setting (Napatech
>     >     > >     does not use it), I think should be reviewed/verified by NIC vendors
>     >     > using it.
>     >     > >
>     >     > >
>     >     > > [Darrell] We need to confirm the masking in the flow (but from what I see,
>     >     > it is ignored as Sugesh mentioned),
>     >     > >                 which would be a significant difference.
>     >     > >                 I guess we need input from Intel flow director folks to be sure and
>     >     > check if this can be done otherwise.
>     >     > >                 What about the 82599 as another example ?
>     >     >
>     >     >
>     >     > I will leave this to Intel folks.
>     >     [Sugesh] From the 82599 datasheet
>     > 
>     >     =======
>     >     The 82599 support two types of filtering modes (static setting by the
>     > FDIRCTRL.PerfectMatch
>     >     bit):
>     >     * Perfect match filters - The hardware checks a match between the masked
>     > fields of
>     >     the received packets and the programmed filters. Masked fields should be
>     >     programmed as zeros in the filter context. The 82599 support up to 8 K - 2
>     > perfect
>     >     match filters.
>     >     * Signature filters - The hardware checks a match between a hash-based
>     > signature of
>     >     the masked fields of the received packet. The 82599 supports up to 32 K - 2
>     >     signature filters.
>     >     * Notation - The Perfect Match fields and Signature field are denoted as Flow
>     > ID fields.
>     >     The 82599 supports masking / range for the previously described fields. These
>     > masks are
>     >     defined globally for all filters in the FDIR...M register.
>     >     =======
>     >     So my understanding is even if it can support masking, the mask is global and
>     > not per flow.
>     > 
>     > [Darrell] That was my interpretation as well; same across flow director usages.
>     > 
>     >     Again I will confirm this and provide more details.
>     > 
>     > [Darrell] One question is – ‘is there some way to enable per flow masking’ with
>     > this config ?
>     [Sugesh] No for Intel NIC. It’s a silicon limitation on Fortville. The mask is a global config.
>     >                 A second request is – ‘is there another option than
>     > RTE_FDIR_MODE_PERFECT
>     >                 or similar’ to use to achieve the result ?
>     [Sugesh] For Fortville this is the only option that can use for per flow.
>     
>     > 
>     > 
>     >     >
>     >     > 	--yliu
>     > 
>     
>     
>
Darrell Ball Sept. 21, 2017, 9 a.m. UTC | #14
On 9/21/17, 1:54 AM, "Yuanhan Liu" <yliu@fridaylinux.org> wrote:

    On Thu, Sep 21, 2017 at 08:04:45AM +0000, Darrell Ball wrote:
    > Hi Yuanhan/Finn

    > 

    > I think we may need to caveat the Fortville nics due to the global mask

    > limitation;

    
    Sorry, I didn't follow you. Like how? Or what specifically I could/should
    do?


I meant to say that we would not need this patch 8, since it can only allow exact match anyways.
This would not fit well with the other nics support and the overall design.
We would also add some comments to the documentation describing the non-support for Fortville
for the feature.

Darrell
    
    	--yliu
    
    > we also discussed this in the dpdk meeting yesterday.

    > 

    > What do you think ?

    > 

    > Thanks Darrell

    > 

    > On 9/20/17, 6:47 AM, "Chandran, Sugesh" <sugesh.chandran@intel.com> wrote:

    > 

    >     

    >     

    >     Regards

    >     _Sugesh

    >     

    >     

    >     > -----Original Message-----

    >     > From: Darrell Ball [mailto:dball@vmware.com]

    >     > Sent: Thursday, September 14, 2017 6:46 PM

    >     > To: Chandran, Sugesh <sugesh.chandran@intel.com>; Yuanhan Liu

    >     > <yliu@fridaylinux.org>

    >     > Cc: Finn Christensen <fc@napatech.com>; dev@openvswitch.org

    >     > Subject: Re: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set FDIR config

    >     > 

    >     > 

    >     > 

    >     > On 9/14/17, 10:36 AM, "Chandran, Sugesh" <sugesh.chandran@intel.com>

    >     > wrote:

    >     > 

    >     > 

    >     > 

    >     >     Regards

    >     >     _Sugesh

    >     > 

    >     >     > -----Original Message-----

    >     >     > From: Yuanhan Liu [mailto:yliu@fridaylinux.org]

    >     >     > Sent: Thursday, September 14, 2017 4:19 AM

    >     >     > To: Darrell Ball <dball@vmware.com>

    >     >     > Cc: Finn Christensen <fc@napatech.com>; Chandran, Sugesh

    >     >     > <sugesh.chandran@intel.com>; dev@openvswitch.org

    >     >     > Subject: Re: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set FDIR config

    >     >     >

    >     >     > On Wed, Sep 13, 2017 at 01:57:22AM +0000, Darrell Ball wrote:

    >     >     > >

    >     >     > >

    >     >     > > On 9/11/17, 1:14 AM, "ovs-dev-bounces@openvswitch.org on behalf of

    >     >     > Finn Christensen" <ovs-dev-bounces@openvswitch.org on behalf of

    >     >     > fc@napatech.com> wrote:

    >     >     > >

    >     >     > >     -----Original Message-----

    >     >     > >     From: ovs-dev-bounces@openvswitch.org [mailto:ovs-dev-

    >     >     > bounces@openvswitch.org] On Behalf Of Yuanhan Liu

    >     >     > >     Sent: 11. september 2017 09:55

    >     >     > >     To: Chandran, Sugesh <sugesh.chandran@intel.com>

    >     >     > >     Cc: dev@openvswitch.org

    >     >     > >     Subject: Re: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set FDIR config

    >     >     > >

    >     >     > >     On Mon, Sep 11, 2017 at 07:42:57AM +0000, Chandran, Sugesh wrote:

    >     >     > >     >

    >     >     > >     >

    >     >     > >     > Regards

    >     >     > >     > _Sugesh

    >     >     > >     >

    >     >     > >     >

    >     >     > >     > > -----Original Message-----

    >     >     > >     > > From: ovs-dev-bounces@openvswitch.org [mailto:ovs-dev-

    >     >     > >     > > bounces@openvswitch.org] On Behalf Of Yuanhan Liu

    >     >     > >     > > Sent: Tuesday, September 5, 2017 10:23 AM

    >     >     > >     > > To: dev@openvswitch.org

    >     >     > >     > > Subject: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set FDIR config

    >     >     > >     > >

    >     >     > >     > > From: Finn Christensen <fc@napatech.com>

    >     >     > >     > >

    >     >     > >     > > The Intel i40e PMD driver requires the fdir mode set to

    >     >     > >     > > RTE_FDIR_MODE_PERFECT, otherwise, the flow creation would be

    >     >     > failed.

    >     >     > >     > [Sugesh] this means it doesn't honor the flow masks which passed

    >     > onto

    >     >     > rte_flow_*?

    >     >     > >

    >     >     > >     IIRC, that's what I found after divig the code. It's an issue reported/fixed

    >     >     > by Finn. I also don't have the nic for testing.

    >     >     > >

    >     >     > >     [Finn] Yes, this was needed to make our test setup using an XL710 work,

    >     >     > with the rte_flow implementation.

    >     >     > >     It's a while ago so I don't exactly remember how we ended up with this

    >     >     > solution. However, we are definitely not

    >     >     > >     Intel XL710 experts, so there might be other ways to achieve the

    >     >     > rte_flow functionality.

    >     >     > >     This issue, and problem raised about the overall change in configuration

    >     >     > impact on NICs using this setting (Napatech

    >     >     > >     does not use it), I think should be reviewed/verified by NIC vendors

    >     >     > using it.

    >     >     > >

    >     >     > >

    >     >     > > [Darrell] We need to confirm the masking in the flow (but from what I see,

    >     >     > it is ignored as Sugesh mentioned),

    >     >     > >                 which would be a significant difference.

    >     >     > >                 I guess we need input from Intel flow director folks to be sure and

    >     >     > check if this can be done otherwise.

    >     >     > >                 What about the 82599 as another example ?

    >     >     >

    >     >     >

    >     >     > I will leave this to Intel folks.

    >     >     [Sugesh] From the 82599 datasheet

    >     > 

    >     >     =======

    >     >     The 82599 support two types of filtering modes (static setting by the

    >     > FDIRCTRL.PerfectMatch

    >     >     bit):

    >     >     * Perfect match filters - The hardware checks a match between the masked

    >     > fields of

    >     >     the received packets and the programmed filters. Masked fields should be

    >     >     programmed as zeros in the filter context. The 82599 support up to 8 K - 2

    >     > perfect

    >     >     match filters.

    >     >     * Signature filters - The hardware checks a match between a hash-based

    >     > signature of

    >     >     the masked fields of the received packet. The 82599 supports up to 32 K - 2

    >     >     signature filters.

    >     >     * Notation - The Perfect Match fields and Signature field are denoted as Flow

    >     > ID fields.

    >     >     The 82599 supports masking / range for the previously described fields. These

    >     > masks are

    >     >     defined globally for all filters in the FDIR...M register.

    >     >     =======

    >     >     So my understanding is even if it can support masking, the mask is global and

    >     > not per flow.

    >     > 

    >     > [Darrell] That was my interpretation as well; same across flow director usages.

    >     > 

    >     >     Again I will confirm this and provide more details.

    >     > 

    >     > [Darrell] One question is – ‘is there some way to enable per flow masking’ with

    >     > this config ?

    >     [Sugesh] No for Intel NIC. It’s a silicon limitation on Fortville. The mask is a global config.

    >     >                 A second request is – ‘is there another option than

    >     > RTE_FDIR_MODE_PERFECT

    >     >                 or similar’ to use to achieve the result ?

    >     [Sugesh] For Fortville this is the only option that can use for per flow.

    >     

    >     > 

    >     > 

    >     >     >

    >     >     > 	--yliu

    >     > 

    >     

    >     

    >
Finn Christensen Sept. 21, 2017, 9:05 a.m. UTC | #15
-----Original Message-----
    From: Darrell Ball [mailto:dball@vmware.com]

    Sent: 21. september 2017 11:00
    To: Yuanhan Liu <yliu@fridaylinux.org>
    Cc: Chandran, Sugesh <sugesh.chandran@intel.com>; Finn Christensen
    <fc@napatech.com>; dev@openvswitch.org
    Subject: Re: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set FDIR config
    
    
    
    On 9/21/17, 1:54 AM, "Yuanhan Liu" <yliu@fridaylinux.org> wrote:
    
        On Thu, Sep 21, 2017 at 08:04:45AM +0000, Darrell Ball wrote:
        > Hi Yuanhan/Finn

        >

        > I think we may need to caveat the Fortville nics due to the global mask

        > limitation;

    
        Sorry, I didn't follow you. Like how? Or what specifically I could/should
        do?
    
    
    I meant to say that we would not need this patch 8, since it can only allow
    exact match anyways.
    This would not fit well with the other nics support and the overall design.
    We would also add some comments to the documentation describing the
    non-support for Fortville for the feature.
    
    Darrell

[Finn] Agreed. This will not work well.
    
        	--yliu
    
        > we also discussed this in the dpdk meeting yesterday.

        >

        > What do you think ?

        >

        > Thanks Darrell

        >

        > On 9/20/17, 6:47 AM, "Chandran, Sugesh"

    <sugesh.chandran@intel.com> wrote:
        >

        >

        >

        >     Regards

        >     _Sugesh

        >

        >

        >     > -----Original Message-----

        >     > From: Darrell Ball [mailto:dball@vmware.com]

        >     > Sent: Thursday, September 14, 2017 6:46 PM

        >     > To: Chandran, Sugesh <sugesh.chandran@intel.com>; Yuanhan Liu

        >     > <yliu@fridaylinux.org>

        >     > Cc: Finn Christensen <fc@napatech.com>; dev@openvswitch.org

        >     > Subject: Re: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set FDIR config

        >     >

        >     >

        >     >

        >     > On 9/14/17, 10:36 AM, "Chandran, Sugesh"

    <sugesh.chandran@intel.com>
        >     > wrote:

        >     >

        >     >

        >     >

        >     >     Regards

        >     >     _Sugesh

        >     >

        >     >     > -----Original Message-----

        >     >     > From: Yuanhan Liu [mailto:yliu@fridaylinux.org]

        >     >     > Sent: Thursday, September 14, 2017 4:19 AM

        >     >     > To: Darrell Ball <dball@vmware.com>

        >     >     > Cc: Finn Christensen <fc@napatech.com>; Chandran, Sugesh

        >     >     > <sugesh.chandran@intel.com>; dev@openvswitch.org

        >     >     > Subject: Re: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set FDIR

    config
        >     >     >

        >     >     > On Wed, Sep 13, 2017 at 01:57:22AM +0000, Darrell Ball wrote:

        >     >     > >

        >     >     > >

        >     >     > > On 9/11/17, 1:14 AM, "ovs-dev-bounces@openvswitch.org

    on behalf of
        >     >     > Finn Christensen" <ovs-dev-bounces@openvswitch.org on

    behalf of
        >     >     > fc@napatech.com> wrote:

        >     >     > >

        >     >     > >     -----Original Message-----

        >     >     > >     From: ovs-dev-bounces@openvswitch.org [mailto:ovs-dev-

        >     >     > bounces@openvswitch.org] On Behalf Of Yuanhan Liu

        >     >     > >     Sent: 11. september 2017 09:55

        >     >     > >     To: Chandran, Sugesh <sugesh.chandran@intel.com>

        >     >     > >     Cc: dev@openvswitch.org

        >     >     > >     Subject: Re: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set

    FDIR config
        >     >     > >

        >     >     > >     On Mon, Sep 11, 2017 at 07:42:57AM +0000, Chandran,

    Sugesh wrote:
        >     >     > >     >

        >     >     > >     >

        >     >     > >     > Regards

        >     >     > >     > _Sugesh

        >     >     > >     >

        >     >     > >     >

        >     >     > >     > > -----Original Message-----

        >     >     > >     > > From: ovs-dev-bounces@openvswitch.org [mailto:ovs-

    dev-
        >     >     > >     > > bounces@openvswitch.org] On Behalf Of Yuanhan Liu

        >     >     > >     > > Sent: Tuesday, September 5, 2017 10:23 AM

        >     >     > >     > > To: dev@openvswitch.org

        >     >     > >     > > Subject: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set

    FDIR config
        >     >     > >     > >

        >     >     > >     > > From: Finn Christensen <fc@napatech.com>

        >     >     > >     > >

        >     >     > >     > > The Intel i40e PMD driver requires the fdir mode set to

        >     >     > >     > > RTE_FDIR_MODE_PERFECT, otherwise, the flow

    creation would be
        >     >     > failed.

        >     >     > >     > [Sugesh] this means it doesn't honor the flow masks

    which passed
        >     > onto

        >     >     > rte_flow_*?

        >     >     > >

        >     >     > >     IIRC, that's what I found after divig the code. It's an issue

    reported/fixed
        >     >     > by Finn. I also don't have the nic for testing.

        >     >     > >

        >     >     > >     [Finn] Yes, this was needed to make our test setup using an

    XL710 work,
        >     >     > with the rte_flow implementation.

        >     >     > >     It's a while ago so I don't exactly remember how we ended

    up with this
        >     >     > solution. However, we are definitely not

        >     >     > >     Intel XL710 experts, so there might be other ways to

    achieve the
        >     >     > rte_flow functionality.

        >     >     > >     This issue, and problem raised about the overall change in

    configuration
        >     >     > impact on NICs using this setting (Napatech

        >     >     > >     does not use it), I think should be reviewed/verified by NIC

    vendors
        >     >     > using it.

        >     >     > >

        >     >     > >

        >     >     > > [Darrell] We need to confirm the masking in the flow (but

    from what I see,
        >     >     > it is ignored as Sugesh mentioned),

        >     >     > >                 which would be a significant difference.

        >     >     > >                 I guess we need input from Intel flow director folks to

    be sure and
        >     >     > check if this can be done otherwise.

        >     >     > >                 What about the 82599 as another example ?

        >     >     >

        >     >     >

        >     >     > I will leave this to Intel folks.

        >     >     [Sugesh] From the 82599 datasheet

        >     >

        >     >     =======

        >     >     The 82599 support two types of filtering modes (static setting by

    the
        >     > FDIRCTRL.PerfectMatch

        >     >     bit):

        >     >     * Perfect match filters - The hardware checks a match between

    the masked
        >     > fields of

        >     >     the received packets and the programmed filters. Masked fields

    should be
        >     >     programmed as zeros in the filter context. The 82599 support up

    to 8 K - 2
        >     > perfect

        >     >     match filters.

        >     >     * Signature filters - The hardware checks a match between a

    hash-based
        >     > signature of

        >     >     the masked fields of the received packet. The 82599 supports up

    to 32 K - 2
        >     >     signature filters.

        >     >     * Notation - The Perfect Match fields and Signature field are

    denoted as Flow
        >     > ID fields.

        >     >     The 82599 supports masking / range for the previously described

    fields. These
        >     > masks are

        >     >     defined globally for all filters in the FDIR...M register.

        >     >     =======

        >     >     So my understanding is even if it can support masking, the mask

    is global and
        >     > not per flow.

        >     >

        >     > [Darrell] That was my interpretation as well; same across flow

    director usages.
        >     >

        >     >     Again I will confirm this and provide more details.

        >     >

        >     > [Darrell] One question is – ‘is there some way to enable per flow

    masking’ with
        >     > this config ?

        >     [Sugesh] No for Intel NIC. It’s a silicon limitation on Fortville. The

    mask is a global config.
        >     >                 A second request is – ‘is there another option than

        >     > RTE_FDIR_MODE_PERFECT

        >     >                 or similar’ to use to achieve the result ?

        >     [Sugesh] For Fortville this is the only option that can use for per flow.

        >

        >     >

        >     >

        >     >     >

        >     >     > 	--yliu

        >     >

        >

        >

        >
Yuanhan Liu Sept. 21, 2017, 9:07 a.m. UTC | #16
On Thu, Sep 21, 2017 at 09:00:10AM +0000, Darrell Ball wrote:
> 
> 
> On 9/21/17, 1:54 AM, "Yuanhan Liu" <yliu@fridaylinux.org> wrote:
> 
>     On Thu, Sep 21, 2017 at 08:04:45AM +0000, Darrell Ball wrote:
>     > Hi Yuanhan/Finn
>     > 
>     > I think we may need to caveat the Fortville nics due to the global mask
>     > limitation;
>     
>     Sorry, I didn't follow you. Like how? Or what specifically I could/should
>     do?
> 
> 
> I meant to say that we would not need this patch 8, since it can only allow exact match anyways.
> This would not fit well with the other nics support and the overall design.
> We would also add some comments to the documentation describing the non-support for Fortville
> for the feature.

I see. Thanks.

	--yliu
>     
>     > we also discussed this in the dpdk meeting yesterday.
>     > 
>     > What do you think ?
>     > 
>     > Thanks Darrell
>     > 
>     > On 9/20/17, 6:47 AM, "Chandran, Sugesh" <sugesh.chandran@intel.com> wrote:
>     > 
>     >     
>     >     
>     >     Regards
>     >     _Sugesh
>     >     
>     >     
>     >     > -----Original Message-----
>     >     > From: Darrell Ball [mailto:dball@vmware.com]
>     >     > Sent: Thursday, September 14, 2017 6:46 PM
>     >     > To: Chandran, Sugesh <sugesh.chandran@intel.com>; Yuanhan Liu
>     >     > <yliu@fridaylinux.org>
>     >     > Cc: Finn Christensen <fc@napatech.com>; dev@openvswitch.org
>     >     > Subject: Re: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set FDIR config
>     >     > 
>     >     > 
>     >     > 
>     >     > On 9/14/17, 10:36 AM, "Chandran, Sugesh" <sugesh.chandran@intel.com>
>     >     > wrote:
>     >     > 
>     >     > 
>     >     > 
>     >     >     Regards
>     >     >     _Sugesh
>     >     > 
>     >     >     > -----Original Message-----
>     >     >     > From: Yuanhan Liu [mailto:yliu@fridaylinux.org]
>     >     >     > Sent: Thursday, September 14, 2017 4:19 AM
>     >     >     > To: Darrell Ball <dball@vmware.com>
>     >     >     > Cc: Finn Christensen <fc@napatech.com>; Chandran, Sugesh
>     >     >     > <sugesh.chandran@intel.com>; dev@openvswitch.org
>     >     >     > Subject: Re: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set FDIR config
>     >     >     >
>     >     >     > On Wed, Sep 13, 2017 at 01:57:22AM +0000, Darrell Ball wrote:
>     >     >     > >
>     >     >     > >
>     >     >     > > On 9/11/17, 1:14 AM, "ovs-dev-bounces@openvswitch.org on behalf of
>     >     >     > Finn Christensen" <ovs-dev-bounces@openvswitch.org on behalf of
>     >     >     > fc@napatech.com> wrote:
>     >     >     > >
>     >     >     > >     -----Original Message-----
>     >     >     > >     From: ovs-dev-bounces@openvswitch.org [mailto:ovs-dev-
>     >     >     > bounces@openvswitch.org] On Behalf Of Yuanhan Liu
>     >     >     > >     Sent: 11. september 2017 09:55
>     >     >     > >     To: Chandran, Sugesh <sugesh.chandran@intel.com>
>     >     >     > >     Cc: dev@openvswitch.org
>     >     >     > >     Subject: Re: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set FDIR config
>     >     >     > >
>     >     >     > >     On Mon, Sep 11, 2017 at 07:42:57AM +0000, Chandran, Sugesh wrote:
>     >     >     > >     >
>     >     >     > >     >
>     >     >     > >     > Regards
>     >     >     > >     > _Sugesh
>     >     >     > >     >
>     >     >     > >     >
>     >     >     > >     > > -----Original Message-----
>     >     >     > >     > > From: ovs-dev-bounces@openvswitch.org [mailto:ovs-dev-
>     >     >     > >     > > bounces@openvswitch.org] On Behalf Of Yuanhan Liu
>     >     >     > >     > > Sent: Tuesday, September 5, 2017 10:23 AM
>     >     >     > >     > > To: dev@openvswitch.org
>     >     >     > >     > > Subject: [ovs-dev] [PATCH v2 8/8] netdev-dpdk: set FDIR config
>     >     >     > >     > >
>     >     >     > >     > > From: Finn Christensen <fc@napatech.com>
>     >     >     > >     > >
>     >     >     > >     > > The Intel i40e PMD driver requires the fdir mode set to
>     >     >     > >     > > RTE_FDIR_MODE_PERFECT, otherwise, the flow creation would be
>     >     >     > failed.
>     >     >     > >     > [Sugesh] this means it doesn't honor the flow masks which passed
>     >     > onto
>     >     >     > rte_flow_*?
>     >     >     > >
>     >     >     > >     IIRC, that's what I found after divig the code. It's an issue reported/fixed
>     >     >     > by Finn. I also don't have the nic for testing.
>     >     >     > >
>     >     >     > >     [Finn] Yes, this was needed to make our test setup using an XL710 work,
>     >     >     > with the rte_flow implementation.
>     >     >     > >     It's a while ago so I don't exactly remember how we ended up with this
>     >     >     > solution. However, we are definitely not
>     >     >     > >     Intel XL710 experts, so there might be other ways to achieve the
>     >     >     > rte_flow functionality.
>     >     >     > >     This issue, and problem raised about the overall change in configuration
>     >     >     > impact on NICs using this setting (Napatech
>     >     >     > >     does not use it), I think should be reviewed/verified by NIC vendors
>     >     >     > using it.
>     >     >     > >
>     >     >     > >
>     >     >     > > [Darrell] We need to confirm the masking in the flow (but from what I see,
>     >     >     > it is ignored as Sugesh mentioned),
>     >     >     > >                 which would be a significant difference.
>     >     >     > >                 I guess we need input from Intel flow director folks to be sure and
>     >     >     > check if this can be done otherwise.
>     >     >     > >                 What about the 82599 as another example ?
>     >     >     >
>     >     >     >
>     >     >     > I will leave this to Intel folks.
>     >     >     [Sugesh] From the 82599 datasheet
>     >     > 
>     >     >     =======
>     >     >     The 82599 support two types of filtering modes (static setting by the
>     >     > FDIRCTRL.PerfectMatch
>     >     >     bit):
>     >     >     * Perfect match filters - The hardware checks a match between the masked
>     >     > fields of
>     >     >     the received packets and the programmed filters. Masked fields should be
>     >     >     programmed as zeros in the filter context. The 82599 support up to 8 K - 2
>     >     > perfect
>     >     >     match filters.
>     >     >     * Signature filters - The hardware checks a match between a hash-based
>     >     > signature of
>     >     >     the masked fields of the received packet. The 82599 supports up to 32 K - 2
>     >     >     signature filters.
>     >     >     * Notation - The Perfect Match fields and Signature field are denoted as Flow
>     >     > ID fields.
>     >     >     The 82599 supports masking / range for the previously described fields. These
>     >     > masks are
>     >     >     defined globally for all filters in the FDIR...M register.
>     >     >     =======
>     >     >     So my understanding is even if it can support masking, the mask is global and
>     >     > not per flow.
>     >     > 
>     >     > [Darrell] That was my interpretation as well; same across flow director usages.
>     >     > 
>     >     >     Again I will confirm this and provide more details.
>     >     > 
>     >     > [Darrell] One question is – ‘is there some way to enable per flow masking’ with
>     >     > this config ?
>     >     [Sugesh] No for Intel NIC. It’s a silicon limitation on Fortville. The mask is a global config.
>     >     >                 A second request is – ‘is there another option than
>     >     > RTE_FDIR_MODE_PERFECT
>     >     >                 or similar’ to use to achieve the result ?
>     >     [Sugesh] For Fortville this is the only option that can use for per flow.
>     >     
>     >     > 
>     >     > 
>     >     >     >
>     >     >     > 	--yliu
>     >     > 
>     >     
>     >     
>     > 
>     
>
diff mbox series

Patch

diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index e363c92..beb7b68 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -177,6 +177,9 @@  static const struct rte_eth_conf port_conf = {
     .txmode = {
         .mq_mode = ETH_MQ_TX_NONE,
     },
+    .fdir_conf = {
+        .mode = RTE_FDIR_MODE_PERFECT,
+    },
 };
 
 /*