From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id A22402A62 for ; Mon, 2 Feb 2015 02:54:34 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 01 Feb 2015 17:54:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,503,1418112000"; d="scan'208";a="671239485" Received: from pgsmsx103.gar.corp.intel.com ([10.221.44.82]) by fmsmga002.fm.intel.com with ESMTP; 01 Feb 2015 17:54:31 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by PGSMSX103.gar.corp.intel.com (10.221.44.82) with Microsoft SMTP Server (TLS) id 14.3.195.1; Mon, 2 Feb 2015 09:53:21 +0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.91]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.161]) with mapi id 14.03.0195.001; Mon, 2 Feb 2015 09:53:19 +0800 From: "Zhang, Helin" To: Olivier MATZ , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 17/17] mbuf: remove old packet type bit masks for ol_flags Thread-Index: AQHQPJHyVly3QF3mVESt7raWz3w82pzcm8pw Date: Mon, 2 Feb 2015 01:53:20 +0000 Message-ID: References: <1421637666-16872-1-git-send-email-helin.zhang@intel.com> <1422501365-12643-1-git-send-email-helin.zhang@intel.com> <1422501365-12643-18-git-send-email-helin.zhang@intel.com> <54CB890B.406@6wind.com> In-Reply-To: <54CB890B.406@6wind.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 17/17] mbuf: remove old packet type bit masks for ol_flags 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, 02 Feb 2015 01:54:35 -0000 Hi Olivier > -----Original Message----- > From: Olivier MATZ [mailto:olivier.matz@6wind.com] > Sent: Friday, January 30, 2015 9:37 PM > To: Zhang, Helin; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH 17/17] mbuf: remove old packet type bit ma= sks > for ol_flags >=20 > Hi Helin, >=20 > On 01/29/2015 04:16 AM, Helin Zhang wrote: > > To unify packet types among all PMDs, bit masks and relevant macros of > > packet type for ol_flags are replaced by unified packet type and > > relevant macros. > > > > Signed-off-by: Helin Zhang > > --- > > lib/librte_mbuf/rte_mbuf.c | 6 ------ lib/librte_mbuf/rte_mbuf.h | > > 10 ++-------- > > 2 files changed, 2 insertions(+), 14 deletions(-) > > > > diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c > > index 1b14e02..8050ccf 100644 > > --- a/lib/librte_mbuf/rte_mbuf.c > > +++ b/lib/librte_mbuf/rte_mbuf.c > > @@ -215,14 +215,8 @@ const char *rte_get_rx_ol_flag_name(uint64_t > mask) > > /* case PKT_RX_HBUF_OVERFLOW: return "PKT_RX_HBUF_OVERFLOW"; > */ > > /* case PKT_RX_RECIP_ERR: return "PKT_RX_RECIP_ERR"; */ > > /* case PKT_RX_MAC_ERR: return "PKT_RX_MAC_ERR"; */ > > - case PKT_RX_IPV4_HDR: return "PKT_RX_IPV4_HDR"; > > - case PKT_RX_IPV4_HDR_EXT: return "PKT_RX_IPV4_HDR_EXT"; > > - case PKT_RX_IPV6_HDR: return "PKT_RX_IPV6_HDR"; > > - case PKT_RX_IPV6_HDR_EXT: return "PKT_RX_IPV6_HDR_EXT"; > > case PKT_RX_IEEE1588_PTP: return "PKT_RX_IEEE1588_PTP"; > > case PKT_RX_IEEE1588_TMST: return "PKT_RX_IEEE1588_TMST"; > > - case PKT_RX_TUNNEL_IPV4_HDR: return "PKT_RX_TUNNEL_IPV4_HDR"; > > - case PKT_RX_TUNNEL_IPV6_HDR: return "PKT_RX_TUNNEL_IPV6_HDR"; >=20 > I see you are not removing IEEE1588. Is there a reason why it is not hand= led as > a packet_type? Ieee1588 is not a part of information reported by hardware in packet type. Yes, your idea on this is worth being taken into account. >=20 > > diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h > > index 94ae344..5df0d61 100644 > > --- a/lib/librte_mbuf/rte_mbuf.h > > +++ b/lib/librte_mbuf/rte_mbuf.h > > @@ -90,16 +90,10 @@ extern "C" { > > #define PKT_RX_HBUF_OVERFLOW (0ULL << 0) /**< Header buffer > overflow. */ > > #define PKT_RX_RECIP_ERR (0ULL << 0) /**< Hardware processing > error. */ > > #define PKT_RX_MAC_ERR (0ULL << 0) /**< MAC error. */ > > -#define PKT_RX_IPV4_HDR (1ULL << 5) /**< RX packet with IPv4 > header. */ > > -#define PKT_RX_IPV4_HDR_EXT (1ULL << 6) /**< RX packet with > extended IPv4 header. */ > > -#define PKT_RX_IPV6_HDR (1ULL << 7) /**< RX packet with IPv6 > header. */ > > -#define PKT_RX_IPV6_HDR_EXT (1ULL << 8) /**< RX packet with > > extended IPv6 header. */ #define PKT_RX_IEEE1588_PTP (1ULL << 9) > > /**< RX IEEE1588 L2 Ethernet PT Packet. */ #define > > PKT_RX_IEEE1588_TMST (1ULL << 10) /**< RX IEEE1588 L2/L4 timestamped > > packet.*/ -#define PKT_RX_TUNNEL_IPV4_HDR (1ULL << 11) /**< RX tunnel > packet with IPv4 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 > match. */ > > -#define PKT_RX_FDIR_FLX (1ULL << 14) /**< Flexible bytes reported= if > FDIR match. */ > > +#define PKT_RX_FDIR_ID (1ULL << 11) /**< FD id reported if FDIR > match. */ > > +#define PKT_RX_FDIR_FLX (1ULL << 12) /**< Flexible bytes reported= if > FDIR match. */ >=20 > It looks like but numbers are not contiguous anymore (there is a hole bet= ween > 5 and 8). Initially I don't want to move the following values up, as I am not sure if= it may affect other features. I'd prefer to keep that hole as reserved. What's the opinion from you guys? Thanks for the good comments! >=20 > Regards, > Olivier