DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] fix mbuf->port for eth_af_packet
@ 2015-12-09 14:10 Krauz, Pavel
  2015-12-09 14:23 ` Mcnamara, John
  0 siblings, 1 reply; 5+ messages in thread
From: Krauz, Pavel @ 2015-12-09 14:10 UTC (permalink / raw)
  To: dev

[-- Attachment #1: Type: text/plain, Size: 139 bytes --]

Hello,
Here goes patch for DPDK 2.2.0.rc3 that fixes reported port number in mbuf when eth_af_packet PMD is used.

b.r.
Pavel Krauz


[-- Attachment #2: dpdk_af_packet.patch.txt --]
[-- Type: text/plain, Size: 698 bytes --]

--- dpdk-2.2.0-rc3/drivers/net/af_packet/rte_eth_af_packet.c.bak	2015-12-09 14:37:47.777957118 +0100
+++ dpdk-2.2.0-rc3/drivers/net/af_packet/rte_eth_af_packet.c	2015-12-09 14:51:10.612877611 +0100
@@ -74,6 +74,7 @@
 	unsigned int framenum;
 
 	struct rte_mempool *mb_pool;
+	uint8_t in_port;
 
 	volatile unsigned long rx_pkts;
 	volatile unsigned long err_pkts;
@@ -160,6 +161,8 @@
 		ppd->tp_status = TP_STATUS_KERNEL;
 		if (++framenum >= framecount)
 			framenum = 0;
+		
+		mbuf->port = pkt_q->in_port;
 
 		/* account for the receive frame */
 		bufs[i] = mbuf;
@@ -365,7 +368,7 @@
 	}
 
 	dev->data->rx_queues[rx_queue_id] = pkt_q;
-
+	pkt_q->in_port = dev->data->port_id;
 	return 0;
 }
 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-12-09 15:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-09 14:10 [dpdk-dev] fix mbuf->port for eth_af_packet Krauz, Pavel
2015-12-09 14:23 ` Mcnamara, John
2015-12-09 14:46   ` Krauz, Pavel
2015-12-09 15:03     ` Mcnamara, John
2015-12-09 15:14       ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).