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);