The port parameter in mbuf should be set with an input port id
because DPDK apps may use it to know where each packet came from.
Signed-off-by: Saori Usami <susami@igel.co.jp>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
struct pcap_rx_queue {
pcap_t *pcap;
+ uint8_t in_port;
struct rte_mempool *mb_pool;
volatile unsigned long rx_pkts;
volatile unsigned long err_pkts;
header.len);
mbuf->data_len = (uint16_t)header.len;
mbuf->pkt_len = mbuf->data_len;
+ mbuf->port = pcap_q->in_port;
bufs[num_rx] = mbuf;
num_rx++;
} else {
struct pcap_rx_queue *pcap_q = &internals->rx_queue[rx_queue_id];
pcap_q->mb_pool = mb_pool;
dev->data->rx_queues[rx_queue_id] = pcap_q;
+ pcap_q->in_port = dev->data->port_id;
return 0;
}