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 8AA8FC6D8 for ; Fri, 19 Jun 2015 10:15:19 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 19 Jun 2015 01:15:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,643,1427785200"; d="scan'208";a="510782177" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by FMSMGA003.fm.intel.com with ESMTP; 19 Jun 2015 01:15:18 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id t5J8FFbm014815; Fri, 19 Jun 2015 16:15:15 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t5J8FCm1010396; Fri, 19 Jun 2015 16:15:14 +0800 Received: (from hzhan75@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t5J8FCZx010392; Fri, 19 Jun 2015 16:15:12 +0800 From: Helin Zhang To: dev@dpdk.org Date: Fri, 19 Jun 2015 16:14:21 +0800 Message-Id: <1434701661-9943-19-git-send-email-helin.zhang@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1434701661-9943-1-git-send-email-helin.zhang@intel.com> References: <1433144045-30847-1-git-send-email-helin.zhang@intel.com> <1434701661-9943-1-git-send-email-helin.zhang@intel.com> Subject: [dpdk-dev] [PATCH v7 18/18] mbuf: remove old packet type bit masks 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, 19 Jun 2015 08:15:20 -0000 As unified packet types are used instead, those old bit masks and the relevant macros for packet type indication need to be removed. To avoid breaking ABI compatibility, all the changes would be enabled by RTE_NEXT_ABI, which is disabled by default. Signed-off-by: Helin Zhang --- lib/librte_mbuf/rte_mbuf.c | 4 ++++ lib/librte_mbuf/rte_mbuf.h | 4 ++++ 2 files changed, 8 insertions(+) v2 changes: * Used redefined packet types and enlarged packet_type field in mbuf. * Redefined the bit masks for packet RX offload flags. v5 changes: * Rolled back the bit masks of RX flags, for ABI compatibility. v6 changes: * Disabled the code changes for unified packet type by default, to avoid breaking ABI compatibility. v7 changes: * Renamed RTE_UNIFIED_PKT_TYPE to RTE_NEXT_ABI. diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c index f506517..4320dd4 100644 --- a/lib/librte_mbuf/rte_mbuf.c +++ b/lib/librte_mbuf/rte_mbuf.c @@ -251,14 +251,18 @@ 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"; */ +#ifndef RTE_NEXT_ABI 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"; +#endif /* RTE_NEXT_ABI */ case PKT_RX_IEEE1588_PTP: return "PKT_RX_IEEE1588_PTP"; case PKT_RX_IEEE1588_TMST: return "PKT_RX_IEEE1588_TMST"; +#ifndef RTE_NEXT_ABI case PKT_RX_TUNNEL_IPV4_HDR: return "PKT_RX_TUNNEL_IPV4_HDR"; case PKT_RX_TUNNEL_IPV6_HDR: return "PKT_RX_TUNNEL_IPV6_HDR"; +#endif /* RTE_NEXT_ABI */ default: return NULL; } } diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index 5e7cc26..9f32edf 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -91,14 +91,18 @@ 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. */ +#ifndef RTE_NEXT_ABI #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. */ +#endif /* RTE_NEXT_ABI */ #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.*/ +#ifndef RTE_NEXT_ABI #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. */ +#endif /* RTE_NEXT_ABI */ #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. */ -- 1.9.3