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 DD5D6A034F; Mon, 22 Mar 2021 07:36:07 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7750740040; Mon, 22 Mar 2021 07:36:07 +0100 (CET) Received: from szxga06-in.huawei.com (szxga06-in.huawei.com [45.249.212.32]) by mails.dpdk.org (Postfix) with ESMTP id A47164003D for ; Mon, 22 Mar 2021 07:36:05 +0100 (CET) Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4F3l8h1Wntzkcy8; Mon, 22 Mar 2021 14:34:28 +0800 (CST) Received: from [10.67.103.128] (10.67.103.128) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.498.0; Mon, 22 Mar 2021 14:35:58 +0800 To: Ajit Khaparde CC: dpdk-dev , Ferruh Yigit References: <1614906276-34293-1-git-send-email-oulijun@huawei.com> <1615430867-29992-1-git-send-email-humin29@huawei.com> From: "Min Hu (Connor)" Message-ID: Date: Mon, 22 Mar 2021 14:35:58 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.103.128] X-CFilter-Loop: Reflected Subject: Re: [dpdk-dev] [PATCH v2] 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/3/22 10:27, Ajit Khaparde 写道: > :::snip:::: > >> +* ``--proc-type`` >> + Specify a given process instance as the primary or secondary DPDK instance. ``auto`` set here is ok. >> + >> +* ``-l CORELIST`` >> + List of cores to run on. the corelist should be different in primary process and secondary process. >> + >> +* ``--rxq=N`` >> + >> + Set the number of RX queues per port to N, where 1 <= N <= 65535. >> + The default value is 1. N is the sum of queues used by primary and secondary process. > If RxQ is 1, how will it be shared between the primary and secondary processes? Yes, your are right.the range of RxQ(or TxQ) is wrong. As primary instance and secondary instance should have separate queues, and each should occupy at least one queue. So the range of RxQ(or TxQ) shoud be no less than two. > Should the number of rings be a multiple of the number of process The number of rings had better be a multiple of the number of processes. If not, redundant queues will exist after queues are allocated to processes. After RSS is enabled, packet loss occurs when traffic is sent to all processes at the same time. Some traffic enters redundant queues and cannot be forwarded. I will fix it in v4.Thanks. >> + >> +* ``--txq=N`` >> + >> + Set the number of TX queues per port to N, where 1 <= N <= 65535. >> + The default value is 1. N is the sum of queues used by primary and secondary process. > Same as above. How will a single ring be used across primary and > secondary processes? Just same as above, I will fix it in v4. Thanks. > >> + >> +* ``--num-procs=N`` >> + >> + The number of processes which will be used. >> + >> +* ``--proc-id=id`` >> + >> + The id of the current process (id < num-procs). id should be different in primary process and secondary process. >> + >> +Calculation rule for queue: >> +All queues are allocated to different processes based on proc_num and proc_id. >> +Calculation rule for the Testpmd to allocate queues to each process: >> +start(queue start id) = proc_id * nb_q / num_procs; >> +end(queue end id) = start + nb_q / num_procs; >> + >> +For example, if supports 4 txq and rxq >> +the 0~1 for primary process >> +the 2~3 for secondary process >> + >> +Most dev ops is supported in primary and secondary process. While secondary process is not permitted >> +to allocate or release shared memory, so some ops are not supported as follows: >> +``dev_start`` >> +``dev_stop`` >> +``rx_queue_setup`` >> +``tx_queue_setup`` >> +``rx_queue_release`` >> +``tx_queue_release`` >> + >> +RTE_FLOW supported, it applies only on its own process on SW side, but all on HW size. >> +stats supported, stats will not change when one quit and start, As they share the same buffer to store the stats. >> +RSS supported, Primary process and secondary process has separate queues to use, RSS will work in their own queues whether primary and secondary process. >> -- >> 2.7.4 >>