net/memif: add multiple memif data transmission support
PATCH 1/1 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.
--- drivers/net/memif/memif_socket.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/memif/memif_socket.c +2 -0
@@ -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 ; }
Signature · 1 line
1.9.1
Quoted 21 lines
-----Original Message-----
From: Anand Sunkad <[email protected]>
Sent: Wednesday, October 16, 2019 3:22 PM
To: Jakub Grajciar -X (jgrajcia - PANTHEON TECHNOLOGIES at Cisco) <[email protected]>
Cc: [email protected]; Vivek Gupta <[email protected]>; Thomas Mulamangalath <[email protected]>; Anand Sunkad <[email protected]>
Subject: [PATCH] net/memif: add multiple memif data transmission supportWhen 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" inmemif_msg_enq_add_ring()andmemif_msg_receive_add_ring()functions, and while transmitting packets over second connection ineth_memif_txfunction it refer "mq->in_port" which is always zero, and leads to data transmission always in 0th port.
Quoted 5 lines
To mitigate the issue,"mq->in_port" is initialized with "
dev->data->port_id" inmemif_msg_enq_add_ring()andmemif_msg_receive_add_ring()functions.Signed-off-by Anand Sunkad <[email protected]>
Good catch, however you want to initialize mq->in_port in memif_tx_queue_setup().
Thanks,
Jakub
PATCH 1/1 net/memif: add multiple memif data transmission support
In reply to Anand SunkadWhen 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.
--- drivers/net/memif/rte_eth_memif.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/memif/rte_eth_memif.c +1 -0
@@ -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 ;
Signature · 1 line
1.9.1
Quoted 21 lines
-----Original Message-----
From: Anand Sunkad <[email protected]>
Sent: Thursday, October 17, 2019 3:21 PM
To: Jakub Grajciar -X (jgrajcia - PANTHEON TECHNOLOGIES at Cisco) <[email protected]>
Cc: [email protected]; Vivek Gupta <[email protected]>; Thomas Mulamangalath <[email protected]>; Anand Sunkad <[email protected]>
Subject: [PATCH] net/memif: add multiple memif data transmission supportWhen 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" inmemif_tx_queue_setup()function, and while transmitting packets over second connection ineth_memif_txfunction it refer "mq->in_port" which is always zero, which leads to data transmission always in 0th port.
Quoted 4 lines
To mitigate the issue,"mq->in_port" is initialized with "
dev->data->port_id" inmemif_tx_queue_setup()function.Signed-off-by Anand Sunkad <[email protected]>
Ferruh Yigit
AppliedQuoted 21 lines · On 10/23/2019 9:45 AM, Jakub Grajciar -X (jgrajcia - PANTHEON TECHNOLOGIES at…
Quoted 21 lines
-----Original Message-----
From: Anand Sunkad <[email protected]>
Sent: Thursday, October 17, 2019 3:21 PM
To: Jakub Grajciar -X (jgrajcia - PANTHEON TECHNOLOGIES at Cisco) <[email protected]>
Cc: [email protected]; Vivek Gupta <[email protected]>; Thomas Mulamangalath <[email protected]>; Anand Sunkad <[email protected]>
Subject: [PATCH] net/memif: add multiple memif data transmission supportWhen 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" inmemif_tx_queue_setup()function, and while transmitting packets over second connection ineth_memif_txfunction it refer "mq->in_port" which is always zero, which leads to data transmission always in 0th port.
Quoted 7 lines
Quoted 4 lines
To mitigate the issue,"mq->in_port" is initialized with "
dev->data->port_id" inmemif_tx_queue_setup()function.Signed-off-by Anand Sunkad <[email protected]>Reviewed-by Jakub Grajciar <[email protected]>
Applied to dpdk-next-net/master, thanks.