[dpdk-dev] [PATCH v4 10/21] testpmd: print extended fdir info in mbuf

Jingjing Wu jingjing.wu at intel.com
Wed Oct 22 03:01:16 CEST 2014


print extend fdir info in rxonly fwd engine when fdir match.

Signed-off-by: Jingjing Wu <jingjing.wu at intel.com>
---
 app/test-pmd/rxonly.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/app/test-pmd/rxonly.c b/app/test-pmd/rxonly.c
index 98c788b..7f5099c 100644
--- a/app/test-pmd/rxonly.c
+++ b/app/test-pmd/rxonly.c
@@ -160,10 +160,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);
 		printf("\n");
-- 
1.8.1.4



More information about the dev mailing list