From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 68E737F0C for ; Fri, 21 Nov 2014 20:27:29 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 21 Nov 2014 11:38:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="419940168" Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by FMSMGA003.fm.intel.com with ESMTP; 21 Nov 2014 11:28:31 -0800 Received: from irsmsx106.ger.corp.intel.com ([169.254.8.18]) by IRSMSX110.ger.corp.intel.com ([169.254.15.55]) with mapi id 14.03.0195.001; Fri, 21 Nov 2014 19:38:01 +0000 From: "Chilikin, Andrey" To: "Ananyev, Konstantin" , "Wu, Jingjing" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v6 09/22] mbuf: extend fdir field Thread-Index: AQHQBSTQaHI7STNEBEia5fe9AN4wCJxrTwiQgAArIICAAACHgA== Date: Fri, 21 Nov 2014 19:37:51 +0000 Message-ID: References: <1414654006-7472-1-git-send-email-jingjing.wu@intel.com> <1416530816-2159-1-git-send-email-jingjing.wu@intel.com> <1416530816-2159-10-git-send-email-jingjing.wu@intel.com> <2601191342CEEE43887BDE71AB977258213B87A6@IRSMSX105.ger.corp.intel.com> In-Reply-To: <2601191342CEEE43887BDE71AB977258213B87A6@IRSMSX105.ger.corp.intel.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v6 09/22] mbuf: extend fdir field 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: Fri, 21 Nov 2014 19:27:29 -0000 Me bad, missed wrapping union :) Thanks, Andrey -----Original Message----- From: Ananyev, Konstantin=20 Sent: Friday, November 21, 2014 7:35 PM To: Chilikin, Andrey; Wu, Jingjing; dev@dpdk.org Subject: RE: [dpdk-dev] [PATCH v6 09/22] mbuf: extend fdir field Hi Andrey, > -----Original Message----- > From: Chilikin, Andrey > Sent: Friday, November 21, 2014 5:03 PM > To: Wu, Jingjing; dev@dpdk.org > Cc: Ananyev, Konstantin > Subject: RE: [dpdk-dev] [PATCH v6 09/22] mbuf: extend fdir field >=20 > This patch adds extra 32bits to rte_mbuf::hash Yes. >- so 'uint32_t usr' will move to the second cache line? > Why is that? hash is a union, so: offsetof(struct rte_mbuf, hash.rss) =3D=3D offsetof(struct rte_mbuf, hash.u= sr) =3D=3D 44 before and after patch. As there still exists free space before rte_mbuf::userdata, whole rte_mbuf:= :hash stays on the first cache line. Konstantin =20 =20 > Regards, > Andrey >=20 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jingjing Wu > Sent: Friday, November 21, 2014 12:47 AM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH v6 09/22] mbuf: extend fdir field >=20 > fdir field in rte_mbuf is extened to support flex bytes reported when fdi= r match. > 8 flex bytes can be reported in maximum. > The reported flex bytes are part of flexible payload. >=20 > Signed-off-by: jingjing.wu > --- > lib/librte_mbuf/rte_mbuf.h | 17 ++++++++++++++--- > 1 file changed, 14 insertions(+), 3 deletions(-) >=20 > diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h=20 > index f5f8658..5899e5c 100644 > --- a/lib/librte_mbuf/rte_mbuf.h > +++ b/lib/librte_mbuf/rte_mbuf.h > @@ -77,7 +77,7 @@ extern "C" { > */ > #define PKT_RX_VLAN_PKT (1ULL << 0) /**< RX packet is a 802.1q VLA= N packet. */ > #define PKT_RX_RSS_HASH (1ULL << 1) /**< RX packet with RSS hash r= esult. */ > -#define PKT_RX_FDIR (1ULL << 2) /**< RX packet with FDIR infos= . */ > +#define PKT_RX_FDIR (1ULL << 2) /**< RX packet with FDIR match= indicate. */ > #define PKT_RX_L4_CKSUM_BAD (1ULL << 3) /**< L4 cksum of RX pkt. is=20 > not OK. */ #define PKT_RX_IP_CKSUM_BAD (1ULL << 4) /**< IP cksum of=20 > RX pkt. is not OK. */ #define PKT_RX_EIP_CKSUM_BAD (0ULL << 0) /**<=20 > External IP header checksum error. */ @@ > -93,6 +93,8 @@ extern "C" { #define PKT_RX_IEEE1588_TMST (1ULL << 10)=20 > /**< RX IEEE1588 L2/L4 timestamped packet.*/ #define=20 > PKT_RX_TUNNEL_IPV4_HDR (1ULL << 11) /**< RX tunnel packet with IPv4=20 > header.*/ #define PKT_RX_TUNNEL_IPV6_HDR (1ULL << > 12) /**< RX tunnel packet with IPv6 header. */ > +#define PKT_RX_FDIR_ID (1ULL << 13) /**< FD id reported if FDIR ma= tch. */ > +#define PKT_RX_FDIR_FLX (1ULL << 14) /**< Flexible bytes reported i= f FDIR match. */ >=20 > #define PKT_TX_VLAN_PKT (1ULL << 55) /**< TX packet is a 802.1q VLA= N packet. */ > #define PKT_TX_IP_CKSUM (1ULL << 54) /**< IP cksum of TX pkt. compu= ted by NIC. */ > @@ -181,8 +183,17 @@ struct rte_mbuf { > union { > uint32_t rss; /**< RSS hash result if RSS enabled */ > struct { > - uint16_t hash; > - uint16_t id; > + union { > + struct { > + uint16_t hash; > + uint16_t id; > + }; > + uint32_t lo; > + /**< Second 4 flexible bytes */ > + }; > + uint32_t hi; > + /**< First 4 flexible bytes or FD ID, dependent on > + PKT_RX_FDIR_* flag in ol_flags. */ > } fdir; /**< Filter identifier if FDIR enabled */ > uint32_t sched; /**< Hierarchical scheduler */ > uint32_t usr; /**< User defined tags. See @rte_distributor_process *= / > -- > 1.8.1.4