From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 620289A9E for ; Tue, 2 Jun 2015 04:46:18 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 01 Jun 2015 19:46:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,536,1427785200"; d="scan'208";a="703685441" Received: from pgsmsx104.gar.corp.intel.com ([10.221.44.91]) by orsmga001.jf.intel.com with ESMTP; 01 Jun 2015 19:46:16 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by PGSMSX104.gar.corp.intel.com (10.221.44.91) with Microsoft SMTP Server (TLS) id 14.3.224.2; Tue, 2 Jun 2015 10:45:13 +0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.94]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.23]) with mapi id 14.03.0224.002; Tue, 2 Jun 2015 10:45:12 +0800 From: "Zhang, Helin" To: Olivier MATZ Thread-Topic: [dpdk-dev] [PATCH 3/5] i40e: support double vlan stripping and insertion Thread-Index: AQHQnEgGOe4twwHUs0CCN3G/ZDifQZ2Yg56A Date: Tue, 2 Jun 2015 02:45:11 +0000 Message-ID: References: <1430793143-3610-1-git-send-email-helin.zhang@intel.com> <1432629400-25303-1-git-send-email-helin.zhang@intel.com> <1432629400-25303-4-git-send-email-helin.zhang@intel.com> <556C1CD7.80805@6wind.com> In-Reply-To: <556C1CD7.80805@6wind.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH 3/5] i40e: support double vlan stripping and insertion X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2015 02:46:19 -0000 > -----Original Message----- > From: Olivier MATZ [mailto:olivier.matz@6wind.com] > Sent: Monday, June 1, 2015 4:51 PM > To: Zhang, Helin; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH 3/5] i40e: support double vlan stripping a= nd > insertion >=20 > Hi Helin, >=20 > On 05/26/2015 10:36 AM, Helin Zhang wrote: > > It configures specific registers to enable double vlan stripping on RX > > side and insertion on TX side. > > The RX descriptors will be parsed, the vlan tags and flags will be > > saved to corresponding mbuf fields if vlan tag is detected. > > The TX descriptors will be configured according to the configurations > > in mbufs, to trigger the hardware insertion of double vlan tags for > > each packets sent out. > > > > Signed-off-by: Helin Zhang >=20 > > [...] >=20 > > diff --git a/lib/librte_ether/rte_ethdev.h > > b/lib/librte_ether/rte_ethdev.h index 16dbe00..b26670e 100644 > > --- a/lib/librte_ether/rte_ethdev.h > > +++ b/lib/librte_ether/rte_ethdev.h > > @@ -882,23 +882,25 @@ struct rte_eth_conf { > > /** > > * RX offload capabilities of a device. > > */ > > -#define DEV_RX_OFFLOAD_VLAN_STRIP 0x00000001 -#define > > DEV_RX_OFFLOAD_IPV4_CKSUM 0x00000002 > > -#define DEV_RX_OFFLOAD_UDP_CKSUM 0x00000004 > > -#define DEV_RX_OFFLOAD_TCP_CKSUM 0x00000008 > > -#define DEV_RX_OFFLOAD_TCP_LRO 0x00000010 > > +#define DEV_RX_OFFLOAD_VLAN_STRIP 0x00000001 > > +#define DEV_RX_OFFLOAD_QINQ_STRIP 0x00000002 > > +#define DEV_RX_OFFLOAD_IPV4_CKSUM 0x00000004 > > +#define DEV_RX_OFFLOAD_UDP_CKSUM 0x00000008 > > +#define DEV_RX_OFFLOAD_TCP_CKSUM 0x00000010 > > +#define DEV_RX_OFFLOAD_TCP_LRO 0x00000020 > > > > /** > > * TX offload capabilities of a device. > > */ > > -#define DEV_TX_OFFLOAD_VLAN_INSERT 0x00000001 -#define > > DEV_TX_OFFLOAD_IPV4_CKSUM 0x00000002 > > -#define DEV_TX_OFFLOAD_UDP_CKSUM 0x00000004 > > -#define DEV_TX_OFFLOAD_TCP_CKSUM 0x00000008 > > -#define DEV_TX_OFFLOAD_SCTP_CKSUM 0x00000010 > > -#define DEV_TX_OFFLOAD_TCP_TSO 0x00000020 > > -#define DEV_TX_OFFLOAD_UDP_TSO 0x00000040 > > -#define DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM 0x00000080 /**< Used for > > tunneling packet. */ > > +#define DEV_TX_OFFLOAD_VLAN_INSERT 0x00000001 > > +#define DEV_TX_OFFLOAD_QINQ_INSERT 0x00000002 > > +#define DEV_TX_OFFLOAD_IPV4_CKSUM 0x00000004 > > +#define DEV_TX_OFFLOAD_UDP_CKSUM 0x00000008 > > +#define DEV_TX_OFFLOAD_TCP_CKSUM 0x00000010 > > +#define DEV_TX_OFFLOAD_SCTP_CKSUM 0x00000020 > > +#define DEV_TX_OFFLOAD_TCP_TSO 0x00000040 > > +#define DEV_TX_OFFLOAD_UDP_TSO 0x00000080 > > +#define DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM 0x00000100 > > > > struct rte_eth_dev_info { > > struct rte_pci_device *pci_dev; /**< Device PCI information. */ > > >=20 > It's probably better to add the new flags after the others for ABI compat= reasons. Agree, will fix it. Thanks, Helin >=20 >=20 > Regards, > Olivier