diff mbox series

net/memif: add multiple memif data transmission support

Message ID 1571318513-7100-1-git-send-email-anand.sunkad@benisontech.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show
Series net/memif: add multiple memif data transmission support | expand

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-compilation success Compile Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed

Commit Message

Anand Sunkad Oct. 17, 2019, 1:20 p.m. UTC
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@benisontech.com>
---
 drivers/net/memif/rte_eth_memif.c | 1 +
 1 file changed, 1 insertion(+)

Comments

> -----Original Message-----
> From: Anand Sunkad <anand.sunkad@benisontech.com>
> Sent: Thursday, October 17, 2019 3:21 PM
> To: Jakub Grajciar -X (jgrajcia - PANTHEON TECHNOLOGIES at Cisco)
> <jgrajcia@cisco.com>
> Cc: dev@dpdk.org; Vivek Gupta <vivekg@benisontech.com>; Thomas
> Mulamangalath <thomas.mulamangalath@benisontech.com>; Anand Sunkad
> <anand.sunkad@benisontech.com>
> Subject: [PATCH] net/memif: add multiple memif data transmission support
> 
> 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@benisontech.com>

Reviewed-by: Jakub Grajciar <jgrajcia@cisco.com>
Ferruh Yigit Oct. 23, 2019, 6:11 p.m. UTC | #2
On 10/23/2019 9:45 AM, Jakub Grajciar -X (jgrajcia - PANTHEON TECHNOLOGIES at
Cisco) wrote:
> 
> 
>> -----Original Message-----
>> From: Anand Sunkad <anand.sunkad@benisontech.com>
>> Sent: Thursday, October 17, 2019 3:21 PM
>> To: Jakub Grajciar -X (jgrajcia - PANTHEON TECHNOLOGIES at Cisco)
>> <jgrajcia@cisco.com>
>> Cc: dev@dpdk.org; Vivek Gupta <vivekg@benisontech.com>; Thomas
>> Mulamangalath <thomas.mulamangalath@benisontech.com>; Anand Sunkad
>> <anand.sunkad@benisontech.com>
>> Subject: [PATCH] net/memif: add multiple memif data transmission support
>>
>> 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@benisontech.com>
> 
> Reviewed-by: Jakub Grajciar <jgrajcia@cisco.com>
> 

Applied to dpdk-next-net/master, thanks.
diff mbox series

Patch

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;