From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jingjing Wu Subject: [PATCH v4 08/21] mbuf: extend fdir field Date: Wed, 22 Oct 2014 09:01:14 +0800 Message-ID: <1413939687-11177-9-git-send-email-jingjing.wu@intel.com> References: <1411711418-12881-1-git-send-email-jingjing.wu@intel.com> <1413939687-11177-1-git-send-email-jingjing.wu@intel.com> To: dev-VfR2kkLFssw@public.gmane.org Return-path: In-Reply-To: <1413939687-11177-1-git-send-email-jingjing.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" extend fdir field to support flex bytes reported when fdir match Signed-off-by: Jingjing Wu --- lib/librte_mbuf/rte_mbuf.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index ddadc21..d2fbf40 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -91,6 +91,8 @@ extern "C" { #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_FDIR_ID (1ULL << 11) /**< FD id reported if FDIR match. */ +#define PKT_RX_FDIR_FLX (1ULL << 12) /**< Flexible bytes reported if FDIR match. */ #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. computed by NIC. */ @@ -171,8 +173,14 @@ 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; /**< flexible bytes low*/ + }; + uint32_t hi; /**< flexible bytes high*/ } fdir; /**< Filter identifier if FDIR enabled */ uint32_t sched; /**< Hierarchical scheduler */ } hash; /**< hash information */ -- 1.8.1.4