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 6F618A04B5; Tue, 12 Jan 2021 15:21:33 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5980F140DF2; Tue, 12 Jan 2021 15:21:33 +0100 (CET) Received: from nat-hk.nvidia.com (nat-hk.nvidia.com [203.18.50.4]) by mails.dpdk.org (Postfix) with ESMTP id 68AD4140DF7 for ; Tue, 12 Jan 2021 15:21:31 +0100 (CET) Received: from HKMAIL103.nvidia.com (Not Verified[10.18.92.9]) by nat-hk.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Tue, 12 Jan 2021 22:21:29 +0800 Received: from HKMAIL102.nvidia.com (10.18.16.11) by HKMAIL103.nvidia.com (10.18.16.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 12 Jan 2021 14:21:20 +0000 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.174) by HKMAIL102.nvidia.com (10.18.16.11) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Tue, 12 Jan 2021 14:21:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KwW/6jnKwbGm2OtSJqdRqGOUgnlGBfKWrJTMaEavIFQdHpJf5Bm/HbmjVBpBhqOqpL3L7Xq2flY5bCw0qoLgUhUE9peMpHkUVABnAw3wbSXoTGyvkKjmaDdMDg6fd+S/IM/s7SoRZYpwfBVwOOoY4jFAoV8T31VcoQBcSqjxKNJYjR/yVR8Z3vH5LJisDFiNLWOl2LIIhDEufkK+I2uNZZtw2JgWNRVYKfapkUkOBxRZIH/HlQ85sUMJ54Wb8zd6TE7qLC31sUNz7BjHXF+i0byEL/gbq4bRQa5Xlpj/H7C3r5xWHXdjxZ8FSPYAM6mIOcmKERkXTWLeuLjL+EcN2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MeE3AbJcXWJEy8Icei3uYgJARcU1kkVlV063SmR2YZU=; b=cLtxkmRbc5/4KpwldMaqDggeOa5SlFALwLPG5blLI0uWBxbdICxar2ga728q8+RgsmPSW6xg5rxatS2z5iaPLcj5RZj5LpNxnH1uhu4qgFI0q+/W6zursMnIExGQcYAlE/2MGNTwE0UwRbZaCmJ7nzgLQ+0Qg8DkZKARMKmiN5u5y9mvrDYoAUPtZUe3gFFufrXdiJpmzohr37LP9P8cXSdJcvrbTnKshky4VUEbdln8sqhCBxeoXCqfm3lpRsa+Tmht96MFvqdrRzi/rFWQQZGBVEkRm3/q/cCUSEdOaomaPydQQQQx0PPEoMnoISjCq9mfa0PNpq0cMjVjirjEiA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none Received: from MWHPR12MB1677.namprd12.prod.outlook.com (2603:10b6:301:11::13) by MW3PR12MB4442.namprd12.prod.outlook.com (2603:10b6:303:55::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.6; Tue, 12 Jan 2021 14:21:17 +0000 Received: from MWHPR12MB1677.namprd12.prod.outlook.com ([fe80::786c:6a6:1aaa:d7aa]) by MWHPR12MB1677.namprd12.prod.outlook.com ([fe80::786c:6a6:1aaa:d7aa%9]) with mapi id 15.20.3742.012; Tue, 12 Jan 2021 14:21:17 +0000 From: Wisam Monther To: oulijun , "ferruh.yigit@intel.com" , "wenzhuo.lu@intel.com" , "beilei.xing@intel.com" , "bernard.iremonger@intel.com" CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [RFC] app/testpmd: support multi-process Thread-Index: AQHW5aNQEWc8LI5YFkuKWCsx6ObqgqogzQCwgANB44CAAAG5AA== Date: Tue, 12 Jan 2021 14:21:17 +0000 Message-ID: References: <1610099184-37328-1-git-send-email-oulijun@huawei.com> <53d7c028-e01f-d4e0-9a88-5c9a8b9bd083@huawei.com> In-Reply-To: <53d7c028-e01f-d4e0-9a88-5c9a8b9bd083@huawei.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: huawei.com; dkim=none (message not signed) header.d=none;huawei.com; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [45.147.66.170] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 82d3d8e2-05e6-4141-bb11-08d8b70553a1 x-ms-traffictypediagnostic: MW3PR12MB4442: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5797; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: v9j//pHbBr8TtJP6hLRdmUqRKDwfHWBb91a8TS9k3DnYs53Z2VPoTFXTQBVHpxZUhE6RaNPU8CiQlAAFAoxAck4dRmbOIxDkOZxrO/yo6TF1FRK0AZdJUGU9s4NXr6U0EuHj+QnRJaBSx6hq4H9r2z8OSLaOUAK5rDqZlWTsu6wWBY5i66nwN4XZc+ZAp8ViBrOOqwduouJJ21RzhQiwRM9q5PRaq3NgQE+HscxoHXcUnWFxKrxe14OnB0ZF1FefEV9FD3YZPnn+icSXOOWzq7CRJighSIFTpnQqKjejZ/7w+POGDTYQ4WI//mupYzpf5w6tHR9i7VzpNqmdu17gSCnmWAPJo2bPN4G3XTCF+RzkORdzr1bZ++T71/89QVWsnXAL4EnUeP3H/vd3AbyIbTdF3tKbfVMmFg7Hi2PEjIr1kTHw+IVKkC9Cxz8msM0v x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR12MB1677.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(39860400002)(366004)(346002)(396003)(376002)(53546011)(6506007)(52536014)(110136005)(9686003)(55016002)(83380400001)(66446008)(64756008)(316002)(4326008)(26005)(86362001)(5660300002)(66476007)(76116006)(478600001)(8676002)(186003)(71200400001)(7696005)(33656002)(8936002)(66946007)(66556008)(2906002)(21314003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?iso-2022-jp?B?dHBvZVRZM0dXRFVvaXBhTXp6bzFxWWdEUmpZTmdrSCtiZndUa2hqM2Iw?= =?iso-2022-jp?B?NmljL1dmZityZ0Mvdjd6MVFhc1hqTnA1a1V0c0ZvRlJkeWgwM2NZZlVl?= =?iso-2022-jp?B?dlUvSXJ5NzB6MHRXRUNneVk0Qld4TGJid3lKRVpFZzhlcmhqd09vbXh1?= =?iso-2022-jp?B?VDM3UmFlQ3UxdEZQQ1ZXOHczazF3WkFmNThKbllmdUN2M1ZjR1VpVHpW?= =?iso-2022-jp?B?QmFjaVpsMnIzTStxZUE5L3VUWEx2M3RoaUgyNmhCQk1EcHUxUEhWencv?= =?iso-2022-jp?B?V1VpNHdmWHFwZTBxMUFvZWJFcUtCZDVIdVJJQ1dTZVNtN1ZMRkxUejcy?= =?iso-2022-jp?B?NXJEc0xrczZkdDZ4ZVl3dS9ER21NK29iYytMYlVOYzFFakpSTWVpQW8z?= =?iso-2022-jp?B?c0VOUktoNzZyS1RxZ2Z3cU1Lb1lHQVk2ZEdxQlUzQlhZR09CaExwcFlE?= =?iso-2022-jp?B?dTFNRElJaDJrbXcyakVHQmNsOXpxWkhJQnFLbWU2bE9nVWZ2WDFQQkoz?= =?iso-2022-jp?B?ditjczdpbzdoTnhkK3ZFVVBobmtrdllMUlh0a2VVUHU0S0oyYTM2MXZx?= =?iso-2022-jp?B?NjA1KzZkYlJPT1ZlTm1vQ09oemR3RFVKL1RpZXZON1Fja0Y1ejUyRm94?= =?iso-2022-jp?B?UXQ0d3RkbjhRbWt4eThWZ1JzcnNabXQvN3JpbVNqdzR1MmF2WDNhVHFt?= =?iso-2022-jp?B?eDBxSklQYUtacnZYemd2TWxuSkwwTDVpNmE5dU1OaWVNR0JXaUt6R21q?= =?iso-2022-jp?B?TWpkbU4wUm9JUHZPSHhRaTZsSEdVQWJER1g3L1YvMnBBUHh1ZTRpN21m?= =?iso-2022-jp?B?dmZBc25XMTNqbXhST0ZFMzIvTUNPYnpVdituYUFacHBDd1ZNTXh6SUhq?= =?iso-2022-jp?B?RnRXTll4MWpORHgzTllHcC9Lb3p3dGZnc1dZeVgrbHVwb3poZzVyRk5s?= =?iso-2022-jp?B?eXFybGp3VlIvWXYwN0hOcldhUnRJS3RoZCtMKzk3M0V6c3lFajJUUzFz?= =?iso-2022-jp?B?VE5QcVNaZEFySXE3cjZBcWRaK2JkOFA3Ry9LSnRZWitVZnYrVlRWVllm?= =?iso-2022-jp?B?dDlCQWVTRU9jbit1SThhNlgxL1lFR1YzVTM1cjFiaGdvN0NHMUxGTzND?= =?iso-2022-jp?B?SmJ3ODFuYVZUV0orMDMwTUlaTGlUZjJieVJKUWR4bC8vT2piRUxBcmRl?= =?iso-2022-jp?B?eW1PbDljSTREN3pSMlgxcjl2RzEzNE53NU5TRGlUOTBPeG02OUE3YzR5?= =?iso-2022-jp?B?NCtub2V6OFVyWlBRTC9odTJFalk1N25hTmVRZW9rVUgwVFBGTWh1WFVv?= =?iso-2022-jp?B?VjUzQ0tCeTlZWlU1VFhrUkxlUkxwTXc0NHU5ZU9peDZKODkvRHI1RE8y?= =?iso-2022-jp?B?UEMvVzFlR0J2czJQOFdmUlUvUFVwVi9xZTl5NHM1S0MwZUEvQT0=?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR12MB1677.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 82d3d8e2-05e6-4141-bb11-08d8b70553a1 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Jan 2021 14:21:17.7813 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 7+o7dotE6jbCVh421/YKWt8DNj6LgherUnVELKkG0RNWJ6JI6cNIexNvXC92B6MK62fgAz6YLNbY9fd2CT3FIQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR12MB4442 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1610461289; bh=MeE3AbJcXWJEy8Icei3uYgJARcU1kkVlV063SmR2YZU=; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To: CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References: In-Reply-To:Accept-Language:Content-Language:X-MS-Has-Attach: X-MS-TNEF-Correlator:authentication-results:x-originating-ip: x-ms-publictraffictype:x-ms-office365-filtering-correlation-id: x-ms-traffictypediagnostic:x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers:x-ms-exchange-senderadcheck: x-microsoft-antispam:x-microsoft-antispam-message-info: x-forefront-antispam-report:x-ms-exchange-antispam-messagedata: x-ms-exchange-transport-forked:Content-Type: Content-Transfer-Encoding:MIME-Version: X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-AuthSource: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-CrossTenant-userprincipalname: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg; b=Df3XQz966PN6QwuZp9lC6FXy4Wzbz5J8TjtiCoPxwsxVG7+HMrVtx+4q8v7ibg/pp FMf9mj8QFuWrb7I/XXwvz1JduBqsarmYACO21WgrP5dx6ftF3e4qYVoKFx93E4ICSf ulrksZCu4WDmubVOVjT3mpj+Xc/yIqR95Wx6qgi0Zv2pSvZCZkbROPEfTFkVqC83cB 4m4g/jqTmuVMvI5Bk7QGpT9jV0tGqZdcCmN4LmYqjTIme1n5BH16lwoLMVWSvC9v4L M0IbdsdjAIhMtuye4bJWXPrFZjLVkq9uqDQ+NVD4Gj/99fKozO6YT082N2bBgT3dCV 5oUEpP9tcGhOA== 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" > -----Original Message----- > From: oulijun > Sent: Tuesday, January 12, 2021 4:13 PM > To: Wisam Monther ; 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 >=20 >=20 >=20 > =1B$B:_=1B(B 2021/1/10 20:32, Wisam Monther =1B$B > 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=3Dxx -l 0-1 -n 2 -- -i\ > >> --rxq=3D16 --txq=3D16 --num-procs=3D2 --proc-id=3D0 the secondary cmd: > >> ./testpmd -w xxx --file-prefix=3Dxx -l 2-3 -n 2 -- -i\ > >> --rxq=3D16 --txq=3D16 --num-procs=3D2 --proc-id=3D1 > >> > >> 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=1B$B!$=1B(BWisam Monther > Firstly=1B$B!$=1B(B thank you for your questions. According to the cur= rent > implementation scheme, all queues are evenly allocated to different > processes based on proc_num and proc_id=1B$B!#=1B(B > 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) =3D proc_id * nb_q / num_procs=1B$B!(=1B(B > end(queue end id) =3D start + nb_q / num_procs=1B$B!(=1B(B >=20 > For example, if support 16 txq and rxq > the 0 ~7 for primary process > the 8 ~15 for secondary process >=20 > 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 i= t apply on all? I'm talking about SW side, not HW side? The impact of detaching device from secondary/primary only, how it's design= ed to handle such cases? >=20 > Thanks > Lijun Ou >=20 > > BRs, > > Wisam Jaddo > > . > >