extend fdir field to support flex bytes reported when fdir match

Signed-off-by: Jingjing Wu <jingjing.wu at intel.com>
---
 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

Reply via email to