From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7B4D3A04B5; Tue, 12 Jan 2021 15:13:36 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3589D140DCC; Tue, 12 Jan 2021 15:13:36 +0100 (CET) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by mails.dpdk.org (Postfix) with ESMTP id 5FDCD140D68 for ; Tue, 12 Jan 2021 15:13:34 +0100 (CET) Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4DFXb212HRz15f6P; Tue, 12 Jan 2021 22:12:30 +0800 (CST) Received: from [10.67.103.119] (10.67.103.119) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.498.0; Tue, 12 Jan 2021 22:13:25 +0800 To: Wisam Monther , "ferruh.yigit@intel.com" , "wenzhuo.lu@intel.com" , "beilei.xing@intel.com" , "bernard.iremonger@intel.com" CC: "dev@dpdk.org" References: <1610099184-37328-1-git-send-email-oulijun@huawei.com> From: oulijun Message-ID: <53d7c028-e01f-d4e0-9a88-5c9a8b9bd083@huawei.com> Date: Tue, 12 Jan 2021 22:13:21 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.103.119] X-CFilter-Loop: Reflected Subject: Re: [dpdk-dev] [RFC] app/testpmd: support multi-process X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" ŌŚ 2021/1/10 20:32, Wisam Monther Š“µĄ: > Hi, > >> -----Original Message----- >> From: dev 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) >> Signed-off-by: Lijun Ou >> --- >> app/test-pmd/cmdline.c | 6 ++- >> app/test-pmd/config.c | 9 +++- >> app/test-pmd/parameters.c | 9 ++++ >> app/test-pmd/testpmd.c | 133 ++++++++++++++++++++++++++++++++-- >> ------------ >> 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, are they for one instance or for all? > Will all processes have same memory region? If installing one RTE_FLOW in one instance will be active for all? > Same question for detaching device in one instance, how it will reflect on others? > 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. Thanks Lijun Ou > BRs, > Wisam Jaddo > . >