* [dpdk-dev] [PATCH] net/memif: add multiple memif data transmission support
@ 2019-10-16 13:22 Anand Sunkad
2019-10-17 11:28 ` Jakub Grajciar -X (jgrajcia - PANTHEON TECHNOLOGIES at Cisco)
2019-10-17 13:20 ` Anand Sunkad
0 siblings, 2 replies; 5+ messages in thread
From: Anand Sunkad @ 2019-10-16 13:22 UTC (permalink / raw)
To: Jakub Grajciar; +Cc: dev, Vivek Gupta, Thomas Mulamangalath, Anand Sunkad
When Multiple slave/master Memif 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_msg_enq_add_ring() and
memif_msg_receive_add_ring() functions, and while transmitting packets
over second connection in eth_memif_tx function it refer "mq->in_port"
which is always zero, and leads to data transmission always in 0th port.
To mitigate the issue,"mq->in_port" is initialized with
"dev->data->port_id" in memif_msg_enq_add_ring() and
memif_msg_receive_add_ring() functions.
Signed-off-by: Anand Sunkad <anand.sunkad@benisontech.com>
---
drivers/net/memif/memif_socket.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/memif/memif_socket.c b/drivers/net/memif/memif_socket.c
index 0c71f6c..ef8c509 100644
--- a/drivers/net/memif/memif_socket.c
+++ b/drivers/net/memif/memif_socket.c
@@ -322,6 +322,7 @@
mq->log2_ring_size = ar->log2_ring_size;
mq->region = ar->region;
mq->ring_offset = ar->offset;
+ mq->in_port = dev->data->port_id;
return 0;
}
@@ -464,6 +465,7 @@
ar->log2_ring_size = mq->log2_ring_size;
ar->flags = (type == MEMIF_RING_S2M) ? MEMIF_MSG_ADD_RING_FLAG_S2M : 0;
ar->private_hdr_size = 0;
+ mq->in_port = dev->data->port_id;
return 0;
}
--
1.9.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] net/memif: add multiple memif data transmission support
2019-10-16 13:22 [dpdk-dev] [PATCH] net/memif: add multiple memif data transmission support Anand Sunkad
@ 2019-10-17 11:28 ` Jakub Grajciar -X (jgrajcia - PANTHEON TECHNOLOGIES at Cisco)
2019-10-17 13:20 ` Anand Sunkad
1 sibling, 0 replies; 5+ messages in thread
From: Jakub Grajciar -X (jgrajcia - PANTHEON TECHNOLOGIES at Cisco) @ 2019-10-17 11:28 UTC (permalink / raw)
To: Anand Sunkad; +Cc: dev, Vivek Gupta, Thomas Mulamangalath
> -----Original Message-----
> From: Anand Sunkad <anand.sunkad@benisontech.com>
> Sent: Wednesday, October 16, 2019 3:22 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 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_msg_enq_add_ring() and
> memif_msg_receive_add_ring() functions, and while transmitting packets
> over second connection in eth_memif_tx function it refer "mq->in_port"
> which is always zero, and leads to data transmission always in 0th port.
>
> To mitigate the issue,"mq->in_port" is initialized with "dev->data->port_id" in
> memif_msg_enq_add_ring() and
> memif_msg_receive_add_ring() functions.
>
> Signed-off-by: Anand Sunkad <anand.sunkad@benisontech.com>
Good catch, however you want to initialize mq->in_port in memif_tx_queue_setup().
Thanks,
Jakub
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH] net/memif: add multiple memif data transmission support
2019-10-16 13:22 [dpdk-dev] [PATCH] net/memif: add multiple memif data transmission support Anand Sunkad
2019-10-17 11:28 ` Jakub Grajciar -X (jgrajcia - PANTHEON TECHNOLOGIES at Cisco)
@ 2019-10-17 13:20 ` Anand Sunkad
2019-10-23 8:45 ` Jakub Grajciar -X (jgrajcia - PANTHEON TECHNOLOGIES at Cisco)
1 sibling, 1 reply; 5+ messages in thread
From: Anand Sunkad @ 2019-10-17 13:20 UTC (permalink / raw)
To: Jakub Grajciar; +Cc: dev, Vivek Gupta, Thomas Mulamangalath, Anand Sunkad
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(+)
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] net/memif: add multiple memif data transmission support
2019-10-17 13:20 ` Anand Sunkad
@ 2019-10-23 8:45 ` Jakub Grajciar -X (jgrajcia - PANTHEON TECHNOLOGIES at Cisco)
2019-10-23 18:11 ` Ferruh Yigit
0 siblings, 1 reply; 5+ messages in thread
From: Jakub Grajciar -X (jgrajcia - PANTHEON TECHNOLOGIES at Cisco) @ 2019-10-23 8:45 UTC (permalink / raw)
To: Anand Sunkad; +Cc: dev, Vivek Gupta, Thomas Mulamangalath
> -----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>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] net/memif: add multiple memif data transmission support
2019-10-23 8:45 ` Jakub Grajciar -X (jgrajcia - PANTHEON TECHNOLOGIES at Cisco)
@ 2019-10-23 18:11 ` Ferruh Yigit
0 siblings, 0 replies; 5+ messages in thread
From: Ferruh Yigit @ 2019-10-23 18:11 UTC (permalink / raw)
To: Jakub Grajciar -X (jgrajcia - PANTHEON TECHNOLOGIES at Cisco),
Anand Sunkad
Cc: dev, Vivek Gupta, Thomas Mulamangalath
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-10-23 18:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-16 13:22 [dpdk-dev] [PATCH] net/memif: add multiple memif data transmission support Anand Sunkad
2019-10-17 11:28 ` Jakub Grajciar -X (jgrajcia - PANTHEON TECHNOLOGIES at Cisco)
2019-10-17 13:20 ` Anand Sunkad
2019-10-23 8:45 ` Jakub Grajciar -X (jgrajcia - PANTHEON TECHNOLOGIES at Cisco)
2019-10-23 18:11 ` Ferruh Yigit
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).