From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id A9A4E9A9E for ; Mon, 1 Jun 2015 10:50:03 +0200 (CEST) Received: from was59-1-82-226-113-214.fbx.proxad.net ([82.226.113.214] helo=[192.168.0.10]) by mail.droids-corp.org with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YzLUT-0005VH-UH; Mon, 01 Jun 2015 10:54:42 +0200 Message-ID: <556C1CD7.80805@6wind.com> Date: Mon, 01 Jun 2015 10:50:31 +0200 From: Olivier MATZ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.6.0 MIME-Version: 1.0 To: Helin Zhang , dev@dpdk.org 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> In-Reply-To: <1432629400-25303-4-git-send-email-helin.zhang@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit 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: Mon, 01 Jun 2015 08:50:03 -0000 Hi Helin, 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 > [...] > 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. */ > It's probably better to add the new flags after the others for ABI compat reasons. Regards, Olivier