app/testpmd: print extended flow director info
authorJingjing Wu <jingjing.wu@intel.com>
Fri, 21 Nov 2014 00:46:45 +0000 (08:46 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 24 Nov 2014 23:06:04 +0000 (00:06 +0100)
Extended fdir info is printed in rxonly fwd engine when fdir match.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
app/test-pmd/rxonly.c

index 9ad1df6..88b65bc 100644 (file)
@@ -167,10 +167,18 @@ pkt_burst_receive(struct fwd_stream *fs)
                if (ol_flags & PKT_RX_RSS_HASH) {
                        printf(" - RSS hash=0x%x", (unsigned) mb->hash.rss);
                        printf(" - RSS queue=0x%x",(unsigned) fs->rx_queue);
+               } else if (ol_flags & PKT_RX_FDIR) {
+                       printf(" - FDIR matched ");
+                       if (ol_flags & PKT_RX_FDIR_ID)
+                               printf("ID=0x%x",
+                                      mb->hash.fdir.hi);
+                       else if (ol_flags & PKT_RX_FDIR_FLX)
+                               printf("flex bytes=0x%08x %08x",
+                                      mb->hash.fdir.hi, mb->hash.fdir.lo);
+                       else
+                               printf("hash=0x%x ID=0x%x ",
+                                      mb->hash.fdir.hash, mb->hash.fdir.id);
                }
-               else if (ol_flags & PKT_RX_FDIR)
-                       printf(" - FDIR hash=0x%x - FDIR id=0x%x ",
-                              mb->hash.fdir.hash, mb->hash.fdir.id);
                if (ol_flags & PKT_RX_VLAN_PKT)
                        printf(" - VLAN tci=0x%x", mb->vlan_tci);
                if (is_encapsulation) {