[dpdk-dev] [PATCH] net/memif: add multiple memif data transmission support

Anand Sunkad anand.sunkad at benisontech.com
Thu Oct 17 15:20:50 CEST 2019


When Multiple slave/master Memif's interfaces are created in single
process data transmission over second connection is not successful.

Issue is because of "mq->in_port" is not initialized with
"dev->data->port_id" in memif_tx_queue_setup() function, and while
transmitting packets over second connection in eth_memif_tx function
it refer "mq->in_port" which is always zero, which leads to data
transmission always in 0th port.

To mitigate the issue,"mq->in_port" is initialized with
"dev->data->port_id" in memif_tx_queue_setup() function.

Signed-off-by: Anand Sunkad <anand.sunkad at benisontech.com>
---
 drivers/net/memif/rte_eth_memif.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index b86d7da..af7f7f8 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -873,6 +873,7 @@ struct mp_region_msg {
 	mq->n_bytes = 0;
 	mq->intr_handle.fd = -1;
 	mq->intr_handle.type = RTE_INTR_HANDLE_EXT;
+	mq->in_port = dev->data->port_id;
 	dev->data->tx_queues[qid] = mq;
 
 	return 0;
-- 
1.9.1



More information about the dev mailing list