X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest-pmd%2Futil.c;h=781a81375983a141ee423a1be1e79545f03c75ed;hb=1b9f274623b8;hp=8488fa1a8f04fcd85cc809e5967874b7d3eb48de;hpb=9ec0f97e02e19c7acec5ebc9e472b8a2f4605e1f;p=dpdk.git diff --git a/app/test-pmd/util.c b/app/test-pmd/util.c index 8488fa1a8f..781a813759 100644 --- a/app/test-pmd/util.c +++ b/app/test-pmd/util.c @@ -48,18 +48,49 @@ dump_pkt_burst(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[], is_rx ? "received" : "sent", (unsigned int) nb_pkts); for (i = 0; i < nb_pkts; i++) { + int ret; + struct rte_flow_error error; + struct rte_flow_restore_info info = { 0, }; + mb = pkts[i]; eth_hdr = rte_pktmbuf_read(mb, 0, sizeof(_eth_hdr), &_eth_hdr); eth_type = RTE_BE_TO_CPU_16(eth_hdr->ether_type); - ol_flags = mb->ol_flags; packet_type = mb->packet_type; is_encapsulation = RTE_ETH_IS_TUNNEL_PKT(packet_type); - + ret = rte_flow_get_restore_info(port_id, mb, &info, &error); + if (!ret) { + printf("restore info:"); + if (info.flags & RTE_FLOW_RESTORE_INFO_TUNNEL) { + struct port_flow_tunnel *port_tunnel; + + port_tunnel = port_flow_locate_tunnel + (port_id, &info.tunnel); + printf(" - tunnel"); + if (port_tunnel) + printf(" #%u", port_tunnel->id); + else + printf(" %s", "-none-"); + printf(" type %s", + port_flow_tunnel_type(&info.tunnel)); + } else { + printf(" - no tunnel info"); + } + if (info.flags & RTE_FLOW_RESTORE_INFO_ENCAPSULATED) + printf(" - outer header present"); + else + printf(" - no outer header"); + if (info.flags & RTE_FLOW_RESTORE_INFO_GROUP_ID) + printf(" - miss group %u", info.group_id); + else + printf(" - no miss group"); + printf("\n"); + } print_ether_addr(" src=", ð_hdr->s_addr); print_ether_addr(" - dst=", ð_hdr->d_addr); printf(" - type=0x%04x - length=%u - nb_segs=%d", eth_type, (unsigned int) mb->pkt_len, (int)mb->nb_segs); + ol_flags = mb->ol_flags; if (ol_flags & PKT_RX_RSS_HASH) { printf(" - RSS hash=0x%x", (unsigned int) mb->hash.rss); printf(" - RSS queue=0x%x", (unsigned int) queue);