From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <wei.zhao1@intel.com>
Received: from mga04.intel.com (mga04.intel.com [192.55.52.120])
 by dpdk.org (Postfix) with ESMTP id 5516D3772
 for <dev@dpdk.org>; Mon, 11 Mar 2019 03:02:18 +0100 (CET)
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from orsmga008.jf.intel.com ([10.7.209.65])
 by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 10 Mar 2019 19:02:17 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.58,466,1544515200"; 
 d="scan'208,217";a="124336131"
Received: from kmsmsx154.gar.corp.intel.com ([172.21.73.14])
 by orsmga008.jf.intel.com with ESMTP; 10 Mar 2019 19:02:15 -0700
Received: from pgsmsx103.gar.corp.intel.com ([169.254.2.210]) by
 KMSMSX154.gar.corp.intel.com ([169.254.12.175]) with mapi id 14.03.0415.000;
 Mon, 11 Mar 2019 10:02:01 +0800
From: "Zhao1, Wei" <wei.zhao1@intel.com>
To: "David Harton (dharton)" <dharton@cisco.com>, "dev@dpdk.org"
 <dev@dpdk.org>, "Lu, Wenzhuo" <wenzhuo.lu@intel.com>, "Ananyev, Konstantin"
 <konstantin.ananyev@intel.com>
Thread-Topic: [dpdk-dev] [PATCH] net/ixgbe: Restore vlan filter/extend for
 ixgbvef
Thread-Index: AQHU1DC8U2nIDIsEMEuKqXAypfzHnKYBSJ4g///gnoCABIpmoA==
Date: Mon, 11 Mar 2019 02:02:01 +0000
Message-ID: <A2573D2ACFCADC41BB3BE09C6DE313CA07EC47E5@PGSMSX103.gar.corp.intel.com>
References: <20190306152355.1697-1-dharton@cisco.com>
 <A2573D2ACFCADC41BB3BE09C6DE313CA07EC3163@PGSMSX103.gar.corp.intel.com>
 <CY4PR11MB170194F503DC9B69BD273D0DAA4D0@CY4PR11MB1701.namprd11.prod.outlook.com>
In-Reply-To: <CY4PR11MB170194F503DC9B69BD273D0DAA4D0@CY4PR11MB1701.namprd11.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
dlp-product: dlpe-windows
dlp-version: 11.0.400.15
dlp-reaction: no-action
x-originating-ip: [172.30.20.205]
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
X-Content-Filtered-By: Mailman/MimeDel 2.1.15
Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: Restore vlan filter/extend for
 ixgbvef
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Mon, 11 Mar 2019 02:02:19 -0000

Hi,



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

> From: David Harton (dharton) [mailto:dharton@cisco.com]

> Sent: Friday, March 8, 2019 8:39 PM

> To: Zhao1, Wei <wei.zhao1@intel.com>; dev@dpdk.org; Lu, Wenzhuo

> <wenzhuo.lu@intel.com>; Ananyev, Konstantin

> <konstantin.ananyev@intel.com>

> Subject: RE: [dpdk-dev] [PATCH] net/ixgbe: Restore vlan filter/extend for

> ixgbvef

>

> Hi

>

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

> > From: Zhao1, Wei <wei.zhao1@intel.com<mailto:wei.zhao1@intel.com>>

> > Sent: Friday, March 08, 2019 1:35 AM

> > To: David Harton (dharton) <dharton@cisco.com<mailto:dharton@cisco.com>=
>; dev@dpdk.org<mailto:dev@dpdk.org>; Lu,

> > Wenzhuo <wenzhuo.lu@intel.com<mailto:wenzhuo.lu@intel.com>>; Ananyev, K=
onstantin

> > <konstantin.ananyev@intel.com<mailto:konstantin.ananyev@intel.com>>

> > Subject: RE: [dpdk-dev] [PATCH] net/ixgbe: Restore vlan filter/extend

> > for ixgbvef

> >

> > Hi,  David Harton

> >

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

> > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of David Harton

> > > Sent: Wednesday, March 6, 2019 11:24 PM

> > > To: dev@dpdk.org<mailto:dev@dpdk.org>; Lu, Wenzhuo <wenzhuo.lu@intel.=
com<mailto:wenzhuo.lu@intel.com>>; Ananyev,

> > > Konstantin <konstantin.ananyev@intel.com<mailto:konstantin.ananyev@in=
tel.com>>

> > > Cc: David Harton <dharton@cisco.com<mailto:dharton@cisco.com>>

> > > Subject: [dpdk-dev] [PATCH] net/ixgbe: Restore vlan filter/extend

> > > for ixgbvef

> > >

> > > ixgevf vlan strip and extend capabilities were removed when

> > > migrating to the bit flags implementation.

> > >

> > > Restoring the capbility to enable these offloads at configuration tim=
e.

> > >

> > > Fixes: ec3b1124d14d (\"net/ixgbe: convert to new Rx offloads API\")

> > > Signed-off-by: David Harton <dharton@cisco.com<mailto:dharton@cisco.c=
om>>

> > > ---

> > >  drivers/net/ixgbe/ixgbe_rxtx.c | 6 ++----

> > >  1 file changed, 2 insertions(+), 4 deletions(-)

> > >

> > > diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c

> > > b/drivers/net/ixgbe/ixgbe_rxtx.c index e92a70fb3..95c32257c 100644

> > > --- a/drivers/net/ixgbe/ixgbe_rxtx.c

> > > +++ b/drivers/net/ixgbe/ixgbe_rxtx.c

> > > @@ -2853,15 +2853,13 @@ ixgbe_get_rx_port_offloads(struct

> > > rte_eth_dev

> > > *dev)

> > >                         DEV_RX_OFFLOAD_TCP_CKSUM   |

> > >                         DEV_RX_OFFLOAD_KEEP_CRC    |

> > >                         DEV_RX_OFFLOAD_JUMBO_FRAME |

> > > +                     DEV_RX_OFFLOAD_VLAN_FILTER |

> > > +                     DEV_RX_OFFLOAD_VLAN_EXTEND |

> > >                         DEV_RX_OFFLOAD_SCATTER;

> > >

> >

> > Why do we  set   DEV_RX_OFFLOAD_VLAN_EXTEND for ixgbevf ?

> > It seems Ixgbevf do not support this configuration. Only pf does.

> > But this ixgbe_get_rx_port_offloads () is used by both vf and pf.

>

> I'm personally happy only to move FILTER but I noticed that EXTEND used t=
o

> be 'supported' and I see references to it elsewhere in ixgbevf code:

>

> ixgbevf_dev_start()

>     /* Set HW strip */

>     mask =3D ETH_VLAN_STRIP_MASK | ETH_VLAN_FILTER_MASK |

>         ETH_VLAN_EXTEND_MASK;

>

> ixgbe_vlan_offload_config()

>     if (mask & ETH_VLAN_EXTEND_MASK) {

>         if (rxmode->offloads & DEV_RX_OFFLOAD_VLAN_EXTEND)

>             ixgbe_vlan_hw_extend_enable(dev);

>         else

>             ixgbe_vlan_hw_extend_disable(dev);

>     }

>

> These uses imply that EXTEND should be supported, correct?



No, not ixgbe_vlan_offload_config, but ixgbevf_vlan_offload_config,

ixgbevf_dev_start() is below:



                /* Set HW strip */

                mask =3D ETH_VLAN_STRIP_MASK | ETH_VLAN_FILTER_MASK |

                                ETH_VLAN_EXTEND_MASK;

                err =3D ixgbevf_vlan_offload_config(dev, mask);







static int

ixgbevf_vlan_offload_config(struct rte_eth_dev *dev, int mask)

{

                struct ixgbe_rx_queue *rxq;

                uint16_t i;

                int on =3D 0;



                /* VF function only support hw strip feature, others are no=
t support */

                if (mask & ETH_VLAN_STRIP_MASK) {

                                for (i =3D 0; i < dev->data->nb_rx_queues; =
i++) {

                                                rxq =3D dev->data->rx_queue=
s[i];

                                                on =3D !!(rxq->offloads & D=
EV_RX_OFFLOAD_VLAN_STRIP);

                                                ixgbevf_vlan_strip_queue_se=
t(dev, i, on);

                                }

                }



                return 0;

}







>

> Thanks,

> Dave

>

> >

> >

> > >      if (hw->mac.type =3D=3D ixgbe_mac_82598EB)

> > >                      offloads |=3D DEV_RX_OFFLOAD_VLAN_STRIP;

> > >

> > > -   if (ixgbe_is_vf(dev) =3D=3D 0)

> > > -                   offloads |=3D (DEV_RX_OFFLOAD_VLAN_FILTER |

> > > -                                        DEV_RX_OFFLOAD_VLAN_EXTEND);

> > > -

> > >      /*

> > >       * RSC is only supported by 82599 and x540 PF devices in a non-S=
R-

> > > IOV

> > >       * mode.

> > > --

> > > 2.19.1