DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/null: fix multi-process rx and tx
@ 2019-09-29  2:41 Yasufumi Ogawa
  2019-10-01 16:00 ` Ferruh Yigit
  0 siblings, 1 reply; 4+ messages in thread
From: Yasufumi Ogawa @ 2019-09-29  2:41 UTC (permalink / raw)
  To: Tetsuya Mukawa; +Cc: dev, Yasufumi Ogawa

Packet processing in secondary process cannot work because rx_pkt_burst
and tx_pkt_burst in eth_dev are not initialized while probing device.
This patch is to the initialization.

Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
---
 drivers/net/null/rte_eth_null.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index 0c60d241a..5a2010e3e 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -586,6 +586,13 @@ rte_pmd_null_probe(struct rte_vdev_device *dev)
 		/* TODO: request info from primary to set up Rx and Tx */
 		eth_dev->dev_ops = &ops;
 		eth_dev->device = &dev->device;
+		if (packet_copy) {
+			eth_dev->rx_pkt_burst = eth_null_copy_rx;
+			eth_dev->tx_pkt_burst = eth_null_copy_tx;
+		} else {
+			eth_dev->rx_pkt_burst = eth_null_rx;
+			eth_dev->tx_pkt_burst = eth_null_tx;
+		}
 		rte_eth_dev_probing_finish(eth_dev);
 		return 0;
 	}
-- 
2.17.1


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

* Re: [dpdk-dev] [PATCH] net/null: fix multi-process rx and tx
  2019-09-29  2:41 [dpdk-dev] [PATCH] net/null: fix multi-process rx and tx Yasufumi Ogawa
@ 2019-10-01 16:00 ` Ferruh Yigit
  2019-10-01 16:03   ` Ferruh Yigit
  2019-10-03  8:15   ` Yasufumi Ogawa
  0 siblings, 2 replies; 4+ messages in thread
From: Ferruh Yigit @ 2019-10-01 16:00 UTC (permalink / raw)
  To: Yasufumi Ogawa, Tetsuya Mukawa
  Cc: dev, Anatoly Burakov, Jingjing Wu, Wenzhuo Lu, Bernard Iremonger

On 9/29/2019 3:41 AM, Yasufumi Ogawa wrote:
> Packet processing in secondary process cannot work because rx_pkt_burst
> and tx_pkt_burst in eth_dev are not initialized while probing device.
> This patch is to the initialization.
> 
> Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
> ---
>  drivers/net/null/rte_eth_null.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
> index 0c60d241a..5a2010e3e 100644
> --- a/drivers/net/null/rte_eth_null.c
> +++ b/drivers/net/null/rte_eth_null.c
> @@ -586,6 +586,13 @@ rte_pmd_null_probe(struct rte_vdev_device *dev)
>  		/* TODO: request info from primary to set up Rx and Tx */
>  		eth_dev->dev_ops = &ops;
>  		eth_dev->device = &dev->device;
> +		if (packet_copy) {
> +			eth_dev->rx_pkt_burst = eth_null_copy_rx;
> +			eth_dev->tx_pkt_burst = eth_null_copy_tx;
> +		} else {
> +			eth_dev->rx_pkt_burst = eth_null_rx;
> +			eth_dev->tx_pkt_burst = eth_null_tx;
> +		}
>  		rte_eth_dev_probing_finish(eth_dev);
>  		return 0;
>  	}
> 


Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

But this seems the issue for other virtual PMDs too, @Yasufumi, can you please
check others too if you have any bandwidth for it?


I assume this is missing for a long time because there is not easy way to test
them in secondary process, testpmd doesn't support the multi process. cc'ed
testpmd and multi process maintainers, what do you think about adding multi
process support to testpmd?


I tested with "examples/multi_process/symmetric_mp" sample app, it required
fixing with null pmd:
1- Requested offload config was not supported by null pmd
2- promics_enable dev_ops was not implemented in null pmd

We should fix sample app / virtual pmds too so they can work together...

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

* Re: [dpdk-dev] [PATCH] net/null: fix multi-process rx and tx
  2019-10-01 16:00 ` Ferruh Yigit
@ 2019-10-01 16:03   ` Ferruh Yigit
  2019-10-03  8:15   ` Yasufumi Ogawa
  1 sibling, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2019-10-01 16:03 UTC (permalink / raw)
  To: Yasufumi Ogawa, Tetsuya Mukawa
  Cc: dev, Anatoly Burakov, Jingjing Wu, Wenzhuo Lu, Bernard Iremonger

On 10/1/2019 5:00 PM, Ferruh Yigit wrote:
> On 9/29/2019 3:41 AM, Yasufumi Ogawa wrote:
>> Packet processing in secondary process cannot work because rx_pkt_burst
>> and tx_pkt_burst in eth_dev are not initialized while probing device.
>> This patch is to the initialization.
>>
>> Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
>> ---
>>  drivers/net/null/rte_eth_null.c | 7 +++++++
>>  1 file changed, 7 insertions(+)
>>
>> diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
>> index 0c60d241a..5a2010e3e 100644
>> --- a/drivers/net/null/rte_eth_null.c
>> +++ b/drivers/net/null/rte_eth_null.c
>> @@ -586,6 +586,13 @@ rte_pmd_null_probe(struct rte_vdev_device *dev)
>>  		/* TODO: request info from primary to set up Rx and Tx */
>>  		eth_dev->dev_ops = &ops;
>>  		eth_dev->device = &dev->device;
>> +		if (packet_copy) {
>> +			eth_dev->rx_pkt_burst = eth_null_copy_rx;
>> +			eth_dev->tx_pkt_burst = eth_null_copy_tx;
>> +		} else {
>> +			eth_dev->rx_pkt_burst = eth_null_rx;
>> +			eth_dev->tx_pkt_burst = eth_null_tx;
>> +		}
>>  		rte_eth_dev_probing_finish(eth_dev);
>>  		return 0;
>>  	}
>>
> 
> 
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>


    Fixes: ee27edbe0c10 ("drivers/net: share vdev data to secondary process")
    Cc: stable@dpdk.org

Applied to dpdk-next-net/master, thanks.

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

* Re: [dpdk-dev] [PATCH] net/null: fix multi-process rx and tx
  2019-10-01 16:00 ` Ferruh Yigit
  2019-10-01 16:03   ` Ferruh Yigit
@ 2019-10-03  8:15   ` Yasufumi Ogawa
  1 sibling, 0 replies; 4+ messages in thread
From: Yasufumi Ogawa @ 2019-10-03  8:15 UTC (permalink / raw)
  To: Ferruh Yigit, Tetsuya Mukawa
  Cc: dev, Anatoly Burakov, Jingjing Wu, Wenzhuo Lu, Bernard Iremonger

On 2019/10/02 1:00, Ferruh Yigit wrote:
> On 9/29/2019 3:41 AM, Yasufumi Ogawa wrote:
>> Packet processing in secondary process cannot work because rx_pkt_burst
>> and tx_pkt_burst in eth_dev are not initialized while probing device.
>> This patch is to the initialization.
>>
>> Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
>> ---
>>   drivers/net/null/rte_eth_null.c | 7 +++++++
>>   1 file changed, 7 insertions(+)
>>
>> diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
>> index 0c60d241a..5a2010e3e 100644
>> --- a/drivers/net/null/rte_eth_null.c
>> +++ b/drivers/net/null/rte_eth_null.c
>> @@ -586,6 +586,13 @@ rte_pmd_null_probe(struct rte_vdev_device *dev)
>>   		/* TODO: request info from primary to set up Rx and Tx */
>>   		eth_dev->dev_ops = &ops;
>>   		eth_dev->device = &dev->device;
>> +		if (packet_copy) {
>> +			eth_dev->rx_pkt_burst = eth_null_copy_rx;
>> +			eth_dev->tx_pkt_burst = eth_null_copy_tx;
>> +		} else {
>> +			eth_dev->rx_pkt_burst = eth_null_rx;
>> +			eth_dev->tx_pkt_burst = eth_null_tx;
>> +		}
>>   		rte_eth_dev_probing_finish(eth_dev);
>>   		return 0;
>>   	}
>>
> 
> 
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
> 
> But this seems the issue for other virtual PMDs too, @Yasufumi, can you please
> check others too if you have any bandwidth for it?
Yes. I have also tried to fix other PMDs, and would like to make some 
updates for vhost and virtio next if possible.

Yasufumi
> 
> 
> I assume this is missing for a long time because there is not easy way to test
> them in secondary process, testpmd doesn't support the multi process. cc'ed
> testpmd and multi process maintainers, what do you think about adding multi
> process support to testpmd?
> 
> 
> I tested with "examples/multi_process/symmetric_mp" sample app, it required
> fixing with null pmd:
> 1- Requested offload config was not supported by null pmd
> 2- promics_enable dev_ops was not implemented in null pmd
> 
> We should fix sample app / virtual pmds too so they can work together...
> 

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

end of thread, other threads:[~2019-10-03  8:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-29  2:41 [dpdk-dev] [PATCH] net/null: fix multi-process rx and tx Yasufumi Ogawa
2019-10-01 16:00 ` Ferruh Yigit
2019-10-01 16:03   ` Ferruh Yigit
2019-10-03  8:15   ` Yasufumi Ogawa

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).