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 DC0426829 for ; Fri, 21 Nov 2014 17:52:56 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 21 Nov 2014 09:01:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,432,1413270000"; d="scan'208";a="641240508" Received: from irsmsx103.ger.corp.intel.com ([163.33.3.157]) by orsmga002.jf.intel.com with ESMTP; 21 Nov 2014 09:03:28 -0800 Received: from irsmsx106.ger.corp.intel.com ([169.254.8.18]) by IRSMSX103.ger.corp.intel.com ([169.254.3.134]) with mapi id 14.03.0195.001; Fri, 21 Nov 2014 17:03:28 +0000 From: "Chilikin, Andrey" To: "Wu, Jingjing" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v6 09/22] mbuf: extend fdir field Thread-Index: AQHQBSTQaHI7STNEBEia5fe9AN4wCJxrTwiQ Date: Fri, 21 Nov 2014 17:03:27 +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> In-Reply-To: <1416530816-2159-10-git-send-email-jingjing.wu@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 16:52:57 -0000 This patch adds extra 32bits to rte_mbuf::hash - so 'uint32_t usr' will mov= e to the second cache line? Regards, Andrey -----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 fdir field in rte_mbuf is extened to support flex bytes reported when fdir = match. 8 flex bytes can be reported in maximum. The reported flex bytes are part of flexible payload. Signed-off-by: jingjing.wu --- lib/librte_mbuf/rte_mbuf.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h 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 VLAN = packet. */ #define PKT_RX_RSS_HASH (1ULL << 1) /**< RX packet with RSS hash res= ult. */ -#define PKT_RX_FDIR (1ULL << 2) /**< RX packet with FDIR infos. = */ +#define PKT_RX_FDIR (1ULL << 2) /**< RX packet with FDIR match i= ndicate. */ #define PKT_RX_L4_CKSUM_BAD (1ULL << 3) /**< L4 cksum of RX pkt. is not = OK. */ #define PKT_RX_IP_CKSUM_BAD (1ULL << 4) /**< IP cksum of RX pkt. = is not OK. */ #define PKT_RX_EIP_CKSUM_BAD (0ULL << 0) /**< External IP h= eader checksum error. */ @@ -93,6 +93,8 @@ extern "C" { #define PKT_RX_IEE= E1588_TMST (1ULL << 10) /**< RX IEEE1588 L2/L4 timestamped packet.*/ #defi= ne PKT_RX_TUNNEL_IPV4_HDR (1ULL << 11) /**< RX tunnel packet with IPv4 head= er.*/ #define PKT_RX_TUNNEL_IPV6_HDR (1ULL << 12) /**< RX tunnel packet wi= th IPv6 header. */ +#define PKT_RX_FDIR_ID (1ULL << 13) /**< FD id reported if FDIR matc= h. */ +#define PKT_RX_FDIR_FLX (1ULL << 14) /**< Flexible bytes reported if = FDIR match. */ =20 #define PKT_TX_VLAN_PKT (1ULL << 55) /**< TX packet is a 802.1q VLAN = packet. */ #define PKT_TX_IP_CKSUM (1ULL << 54) /**< IP cksum of TX pkt. compute= d 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