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 DC9842716 for ; Wed, 31 Aug 2016 10:59:44 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP; 31 Aug 2016 01:59:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,261,1470726000"; d="scan'208";a="162798367" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga004.fm.intel.com with ESMTP; 31 Aug 2016 01:59:43 -0700 Received: from fmsmsx121.amr.corp.intel.com (10.18.125.36) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 31 Aug 2016 01:59:43 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx121.amr.corp.intel.com (10.18.125.36) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 31 Aug 2016 01:59:43 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.91]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.174]) with mapi id 14.03.0248.002; Wed, 31 Aug 2016 16:59:41 +0800 From: "Wang, Xiao W" To: "Chen, Jing D" , "olivier.matz@6wind.com" CC: "dev@dpdk.org" Thread-Topic: [PATCH 2/5] net/fm10k: implement new Rx checksum flag Thread-Index: AQHR/vjo/C1rwO8gI0eKKls3ZENwDqBfLH0AgAOfO7A= Date: Wed, 31 Aug 2016 08:59:40 +0000 Message-ID: References: <1472147299-2376-1-git-send-email-xiao.w.wang@intel.com> <1472147299-2376-3-git-send-email-xiao.w.wang@intel.com> <4341B239C0EFF9468EE453F9E9F4604D3A2D5F05@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <4341B239C0EFF9468EE453F9E9F4604D3A2D5F05@SHSMSX104.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMjU0ODU5MjctZTUwYy00OGYwLThlN2EtYjczNjA4NTc0MzI3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IlZ3Y3ZRblBkeG9MeFdFWlwvRzBKWEZNWWlQaExhRm5raytQY1NaWkxKaWtJPSJ9 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 2/5] net/fm10k: implement new Rx checksum flag 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: Wed, 31 Aug 2016 08:59:45 -0000 Hi Mark, > -----Original Message----- > From: Chen, Jing D > Sent: Monday, August 29, 2016 5:33 PM > To: Wang, Xiao W ; olivier.matz@6wind.com > Cc: dev@dpdk.org > Subject: RE: [PATCH 2/5] net/fm10k: implement new Rx checksum flag >=20 > Hi, >=20 > > uint16_t > > diff --git a/drivers/net/fm10k/fm10k_rxtx_vec.c > > b/drivers/net/fm10k/fm10k_rxtx_vec.c > > index 9ea747e..8c08b44 100644 > > --- a/drivers/net/fm10k/fm10k_rxtx_vec.c > > +++ b/drivers/net/fm10k/fm10k_rxtx_vec.c > > @@ -95,8 +95,10 @@ fm10k_desc_to_olflags_v(__m128i descs[4], struct > rte_mbuf > > **rx_pkts) > > const __m128i l3l4cksum_flag =3D _mm_set_epi8(0, 0, 0, 0, > > 0, 0, 0, 0, > > 0, 0, 0, 0, > > - PKT_RX_IP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD, > > - PKT_RX_IP_CKSUM_BAD, PKT_RX_L4_CKSUM_BAD, 0); > > + (PKT_RX_IP_CKSUM_BAD | > PKT_RX_L4_CKSUM_BAD) >> 1, > > + (PKT_RX_IP_CKSUM_BAD | > PKT_RX_L4_CKSUM_GOOD) >> > > 1, > > + (PKT_RX_IP_CKSUM_GOOD | > PKT_RX_L4_CKSUM_BAD) >> > > 1, > > + (PKT_RX_IP_CKSUM_GOOD | > > PKT_RX_L4_CKSUM_GOOD) >> 1); >=20 > Can we define a macro, like "#define RTE_CKSUM_SHIFT 1" to avoid numeric? Yes, I'll add a macro for this, but since this shift operation isn't common= ly used by other pmds (igb and i40e don't support cksum offload in vector Rx, ixgbe= cannot do this shift due to VLAN offload), I will make it a local macro definition= . >=20 > > > > const __m128i rxe_flag =3D _mm_set_epi8(0, 0, 0, 0, > > 0, 0, 0, 0, > > @@ -139,6 +141,7 @@ fm10k_desc_to_olflags_v(__m128i descs[4], struct > > rte_mbuf **rx_pkts) > > /* Process L4/L3 checksum error flags */ > > cksumflag =3D _mm_srli_epi16(cksumflag, L3L4EFLAG_SHIFT); > > cksumflag =3D _mm_shuffle_epi8(l3l4cksum_flag, cksumflag); > > + cksumflag =3D _mm_slli_epi16(cksumflag, 1); > > vtag1 =3D _mm_or_si128(cksumflag, vtag1); > > > > vol.dword =3D _mm_cvtsi128_si64(vtag1); > > -- > > 1.9.3 >=20 > Besides that, just realize we should remove "hw_ip_checksum" check in fun= c > fm10k_rx_vec_condition_check() since we already support it. > Can you help to make the change? Sure, will remove it in V2. Thanks for the comments, Xiao