From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id C5E235938 for ; Mon, 15 Feb 2016 03:15:44 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP; 14 Feb 2016 18:15:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,448,1449561600"; d="scan'208";a="902614006" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga001.fm.intel.com with ESMTP; 14 Feb 2016 18:15:41 -0800 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 14 Feb 2016 18:15:40 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 14 Feb 2016 18:15:40 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.172]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.117]) with mapi id 14.03.0248.002; Mon, 15 Feb 2016 10:15:38 +0800 From: "Lu, Wenzhuo" To: "Ananyev, Konstantin" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2 4/6] ixgbe: support VxLAN & NVGRE RX checksum off-load Thread-Index: AQHRX4j8IkK55I6J4UuCy9sL81X/rp8sZNtA Date: Mon, 15 Feb 2016 02:15:38 +0000 Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC09090342A8BB@shsmsx102.ccr.corp.intel.com> References: <1452496044-17524-1-git-send-email-wenzhuo.lu@intel.com> <1452735516-4527-1-git-send-email-wenzhuo.lu@intel.com> <1452735516-4527-5-git-send-email-wenzhuo.lu@intel.com> <2601191342CEEE43887BDE71AB97725836B03331@irsmsx105.ger.corp.intel.com> In-Reply-To: <2601191342CEEE43887BDE71AB97725836B03331@irsmsx105.ger.corp.intel.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 Subject: Re: [dpdk-dev] [PATCH v2 4/6] ixgbe: support VxLAN & NVGRE RX checksum off-load 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, 15 Feb 2016 02:15:45 -0000 Hi Konstantin, > -----Original Message----- > From: Ananyev, Konstantin > Sent: Friday, February 5, 2016 4:17 AM > To: Lu, Wenzhuo; dev@dpdk.org > Subject: RE: [dpdk-dev] [PATCH v2 4/6] ixgbe: support VxLAN & NVGRE RX > checksum off-load >=20 >=20 >=20 > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wenzhuo Lu > > Sent: Thursday, January 14, 2016 1:39 AM > > To: dev@dpdk.org > > Subject: [dpdk-dev] [PATCH v2 4/6] ixgbe: support VxLAN & NVGRE RX > > checksum off-load > > > > X550 will do VxLAN & NVGRE RX checksum off-load automatically. > > This patch exposes the result of the checksum off-load. > > > > Signed-off-by: Wenzhuo Lu > > --- > > drivers/net/ixgbe/ixgbe_rxtx.c | 11 ++++++++++- > > lib/librte_mbuf/rte_mbuf.c | 1 + > > lib/librte_mbuf/rte_mbuf.h | 1 + > > 3 files changed, 12 insertions(+), 1 deletion(-) >=20 >=20 > Do we need a new DEV_RX_OFFLOAD_ here? Yes, I will add a new capability. Thanks. >=20 > > > > diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c > > b/drivers/net/ixgbe/ixgbe_rxtx.c index 52a263c..512ac3a 100644 > > --- a/drivers/net/ixgbe/ixgbe_rxtx.c > > +++ b/drivers/net/ixgbe/ixgbe_rxtx.c > > @@ -1003,6 +1003,8 @@ rx_desc_status_to_pkt_flags(uint32_t rx_status) > > static inline uint64_t rx_desc_error_to_pkt_flags(uint32_t rx_status) > > { > > + uint64_t pkt_flags; > > + > > /* > > * Bit 31: IPE, IPv4 checksum error > > * Bit 30: L4I, L4I integrity error > > @@ -1011,8 +1013,15 @@ rx_desc_error_to_pkt_flags(uint32_t rx_status) > > 0, PKT_RX_L4_CKSUM_BAD, PKT_RX_IP_CKSUM_BAD, > > PKT_RX_IP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD > > }; > > - return error_to_pkt_flags_map[(rx_status >> > > + pkt_flags =3D error_to_pkt_flags_map[(rx_status >> > > IXGBE_RXDADV_ERR_CKSUM_BIT) & > IXGBE_RXDADV_ERR_CKSUM_MSK]; > > + > > + if ((rx_status & IXGBE_RXD_STAT_OUTERIPCS) && > > + (rx_status & IXGBE_RXDADV_ERR_OUTERIPER)) { > > + pkt_flags |=3D PKT_RX_OUTER_IP_CKSUM_BAD; > > + } > > + > > + return pkt_flags; > > } > > > > /* > > diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c > > index c18b438..5d4af39 100644 > > --- a/lib/librte_mbuf/rte_mbuf.c > > +++ b/lib/librte_mbuf/rte_mbuf.c > > @@ -260,6 +260,7 @@ const char *rte_get_rx_ol_flag_name(uint64_t mask) > > /* case PKT_RX_MAC_ERR: return "PKT_RX_MAC_ERR"; */ > > case PKT_RX_IEEE1588_PTP: return "PKT_RX_IEEE1588_PTP"; > > case PKT_RX_IEEE1588_TMST: return "PKT_RX_IEEE1588_TMST"; > > + case PKT_RX_OUTER_IP_CKSUM_BAD: return > "PKT_RX_OUTER_IP_CKSUM_BAD"; > > default: return NULL; > > } > > } > > diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h > > index f234ac9..5ad5e59 100644 > > --- a/lib/librte_mbuf/rte_mbuf.h > > +++ b/lib/librte_mbuf/rte_mbuf.h > > @@ -98,6 +98,7 @@ extern "C" { > > #define PKT_RX_FDIR_ID (1ULL << 13) /**< FD id reported if FDIR = match. > */ > > #define PKT_RX_FDIR_FLX (1ULL << 14) /**< Flexible bytes reported= if FDIR > match. */ > > #define PKT_RX_QINQ_PKT (1ULL << 15) /**< RX packet with double = VLAN > stripped. */ > > +#define PKT_RX_OUTER_IP_CKSUM_BAD (1ULL << 16) /**< Outer IP cksum > > +of RX pkt. is not OK. */ >=20 > There is > #define PKT_RX_EIP_CKSUM_BAD (0ULL << 0) /**< External IP header > checksum error. */ Probably need either redefine it, or remove it. O, agree. I should redefine it. Thanks. >=20 > Konstantin > > /* add new RX flags here */ > > > > /* add new TX flags here */ > > -- > > 1.9.3