Re: [dpdk-dev] [RFC] app/testpmd: support multi-process
From: oulijun <hidden>
Date: 2021-01-14 02:46:50
在 2021/1/12 22:21, Wisam Monther 写道:
quoted
-----Original Message----- From: oulijun <redacted> Sent: Tuesday, January 12, 2021 4:13 PM To: Wisam Monther <redacted>; ferruh.yigit@intel.com; wenzhuo.lu@intel.com; beilei.xing@intel.com; bernard.iremonger@intel.com Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [RFC] app/testpmd: support multi-process 在 2021/1/10 20:32, Wisam Monther 写道:quoted
Hi,quoted
-----Original Message----- From: dev <redacted> On Behalf Of Lijun Ou Sent: Friday, January 8, 2021 11:46 AM To: ferruh.yigit@intel.com; wenzhuo.lu@intel.com; beilei.xing@intel.com; bernard.iremonger@intel.com Cc: dev@dpdk.org Subject: [dpdk-dev] [RFC] app/testpmd: support multi-process This patch adds multi-process support for testpmd. The test cmd example as follows: the primary cmd: ./testpmd -w xxx --file-prefix=xx -l 0-1 -n 2 -- -i\ --rxq=16 --txq=16 --num-procs=2 --proc-id=0 the secondary cmd: ./testpmd -w xxx --file-prefix=xx -l 2-3 -n 2 -- -i\ --rxq=16 --txq=16 --num-procs=2 --proc-id=1 Signed-off-by: Min Hu (Connor) <redacted> Signed-off-by: Lijun Ou <redacted> --- app/test-pmd/cmdline.c | 6 ++- app/test-pmd/config.c | 9 +++- app/test-pmd/parameters.c | 9 ++++ app/test-pmd/testpmd.c | 133++++++++++++++++++++++++++++++++--quoted
quoted
------------ app/test-pmd/testpmd.h | 7 +++ 5 files changed, 121 insertions(+), 43 deletions(-)+1 for having this support for testpmd. Some questions in my mind: How are the queues distributing here? In example I see 16 defined, arethey for one instance or for all?quoted
Will all processes have same memory region? If installing one RTE_FLOW inone instance will be active for all?quoted
Same question for detaching device in one instance, how it will reflect onothers?quoted
There is many other scenarios like this, how it will handle those?Hi,Wisam Monther Firstly, thank you for your questions. According to the current implementation scheme, all queues are evenly allocated to different processes based on proc_num and proc_id。 The number of receiving queues, number of processes, and process ID are specified for the master and slave processes. After being created by the main process, the sending and receiving queues are evenly distributed to all processes. The following shows the calculation rule for the Testpmd to allocate queues to each process after the proc ID is specified. start(queue start id) = proc_id * nb_q / num_procs; end(queue end id) = start + nb_q / num_procs; For example, if support 16 txq and rxq the 0 ~7 for primary process the 8 ~15 for secondary process all process have the same memory region.Ok great, Thanks that' make sense. What about the impact of installing RTE_FLOW rule into one instance, does it apply on all? I'm talking about SW side, not HW side? The impact of detaching device from secondary/primary only, how it's designed to handle such cases?
It is my understanding that installing RTE_FLOW rule will affect a instance from our modification.But the all instance will changed from HW side. If detaching device from secondary only, it will not affect other processes.
quoted
Thanks Lijun Ouquoted
BRs, Wisam Jaddo ..