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 A32AA433B7; Fri, 24 Nov 2023 11:28:39 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5B4C7402B3; Fri, 24 Nov 2023 11:28:39 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id F20CC40283; Fri, 24 Nov 2023 11:28:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700821717; x=1732357717; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=i84z650qOm56H1wXPRZOCOKw4EXFjdNreti+AwFUhHY=; b=Q591cnzMKhDMM7GzGV+XZkV/uQZaXfqkqafPRxPhsMYWxR9hLU1RAeEj f4fLsYvQkUp67Em1mf/FuPESP5g4OCNh6OpGpBAgMWhkCbEO6OMioUXuB iNLXARGWws5iFuIJDxEd7OH73k+lnyhfWCN+LBguirAI7gcdbDu7H/DzP OzzjA4GyeDWwJE7fVQY0tFRQ+ZEEndFvKX3/j775aWgonmC+GmLbnUvS8 QV1gwyBL4KLwjdaFKKjifB1kFlzQFrd7+0A7209LfNWDspogz4d6QC/sY 48yf9ozQK7WdS6hTsBh6mDniU88qNWBYLlHOaDzxPK8BSIP3Kae03XtD5 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="478611521" X-IronPort-AV: E=Sophos;i="6.04,223,1695711600"; d="scan'208";a="478611521" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2023 02:28:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="1099052185" X-IronPort-AV: E=Sophos;i="6.04,223,1695711600"; d="scan'208";a="1099052185" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga005.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Nov 2023 02:28:30 -0800 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Fri, 24 Nov 2023 02:28:29 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Fri, 24 Nov 2023 02:28:29 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34 via Frontend Transport; Fri, 24 Nov 2023 02:28:29 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.169) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.34; Fri, 24 Nov 2023 02:28:29 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RDCxSwJnuyRp6qvNqkGcbWeum9NHv+FCe+9u5AMssREnJprjTIcwCmcc+bsN69YFZX2URMNmEqNdjdTTR/TargJFmUwkHDcdRSQeqlp3LXcOUM1hzh/HTHKIyVPHp3KECeDPk+J7Ctfp6gymhc6DpB7BeESBYu9cFgbMIcyTM8mbaxf9GEVWmgLUYhaakxLLur5OHnXohU60Z1hKSPErYx0/aY5lz8rGcoTuaNtx+F01X1Srd0ealSnwPJ/TYbImIuEDxFXsdqSFBx5EADhnQfcZ6d66y06zTrn1F0RsmuScMwW6R1PcBIIX2Lcn6jxgREroN7sZJcD3mDJIjsefPQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yxMR5U5/MBhtDRKaB83ESYjeYQli02lqEhgtDW88NKk=; b=GRFelnZ1NtVIyNhc7BkfqwDoYla78/f0ibMf7bdn/8090B3FiUDDGhim2AyzqVCK41esh76wa1VTQn/oxzCkyzPHAkUFuh3BA2MPOlSd7snWp0cdaHuvIp8t6R/Cnx5VTLFetdMiTZkNYBL6hq/26DRYed0apZQJH/Bl2qnvuxxsf29tBmTSi/r7DsyRyAHpV7PHYynVInXnLvKGiGHwbihsLW4itqwTr1frE0y50wySHjDvvq+AEXt+dUGBzNrPgXDqSKReU7yo3fKfyTadwjupQgxNTarHTUj5/1aKZqNTvYUh9gCyr0GYABg/D0YIyPjX/wkR7CSEVO/8aehXew== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from SN7PR11MB7139.namprd11.prod.outlook.com (2603:10b6:806:2a2::14) by SA0PR11MB4736.namprd11.prod.outlook.com (2603:10b6:806:9f::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.21; Fri, 24 Nov 2023 10:28:27 +0000 Received: from SN7PR11MB7139.namprd11.prod.outlook.com ([fe80::5216:6b58:10e7:9875]) by SN7PR11MB7139.namprd11.prod.outlook.com ([fe80::5216:6b58:10e7:9875%7]) with mapi id 15.20.7025.020; Fri, 24 Nov 2023 10:28:27 +0000 From: "Ye, MingjinX" To: "Richardson, Bruce" CC: "dev@dpdk.org" , "Yang, Qiming" , "stable@dpdk.org" , "Xu, HailinX" Subject: RE: [PATCH v7] app/test: secondary process passes allow parameters Thread-Topic: [PATCH v7] app/test: secondary process passes allow parameters Thread-Index: AQHaFudYLADW4HhvDka1bDhMv9YDyLB+T69ggAARsQCACszHgA== Date: Fri, 24 Nov 2023 10:28:26 +0000 Message-ID: References: <20231113104222.85891-1-mingjinx.ye@intel.com> <20231114102815.409998-1-mingjinx.ye@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SN7PR11MB7139:EE_|SA0PR11MB4736:EE_ x-ms-office365-filtering-correlation-id: 329bb1c4-842d-4207-aaa9-08dbecd81874 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: dQMB7wOCafP0y+JHpZU9h34/UtOKFNf2QIUksmmDjYHQaL5Sd3rWnMwKzi6yZ005pZJDVkzPq0Knbcko3nTKNxweIqsnWZgN6nl4yAwS7Bz5qpcSVfGHVqad21fDn7A+w+83jNVG7YJbrtrJ9h7STu1UbqbTpHmeUtnP2QrDrI2bccadvpVc2MFQL2nPF86wZygCVpT6fYUsFuGv2q7FMCKO3guVCgrPAVWDfWqcJ7tU9SvDuKKCOxgfkgwXzPILVONkC4yVB5OX/RqfCTvFmXJaaOp+4jowNLJAErHHzM0HmUdaYSmUlzgTGLVFrD6VhOcE55qj+eOBw5kGkM6lfqoXV3oRePfTl6X70YgVahBcTFk112yuHPYvunrnwfDzdA0yqlJgXTaQWRgYLyRKPimHZDy8jU/uyfbA0gfHfLjF2SvfnV+7a/BXFyn0SVxDXC+tmT/70rNWYOchyGfPD008K/2Kenv5WFDFBjXyJYeMLdq4EYNcloAOrfRE5z0m87H2hm4Z3K7LxTL0MY0SgimcL5p1Uc94jnpWzVZfdC2a0ms7o7NhYQznYACueGohQ/HmBUaqyjTz2mrQfxZQWMYZ7tXZB3kwu4JUd90rOJdAbLEUZHjM4XA/vJF5Oa4b x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN7PR11MB7139.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39860400002)(136003)(396003)(346002)(376002)(366004)(230922051799003)(64100799003)(451199024)(186009)(1800799012)(66446008)(66476007)(66556008)(66946007)(64756008)(54906003)(76116006)(316002)(6636002)(478600001)(71200400001)(33656002)(5660300002)(38070700009)(86362001)(2906002)(450100002)(4326008)(6862004)(8676002)(8936002)(52536014)(122000001)(83380400001)(55016003)(82960400001)(107886003)(6506007)(26005)(38100700002)(41300700001)(9686003)(53546011)(7696005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?O8msLYp/4Ss3HMBXEL+Qqym0IakGyr4HgMdxoNkcxvZBKUdF6rEKaYrdSzue?= =?us-ascii?Q?swCJsU3MYrCBLJqtRCeFnoN8K4c3DhUOQX+/dyE4kcXeYHEgOjhLW/QcOnK5?= =?us-ascii?Q?Ba0GB1CslqHVyaxwalu4SWOKen3qC5d5xK1bii/FSLFCntOdcwXWdd/VhYRI?= =?us-ascii?Q?+R/AqppLbkAopGRZc393ER0ieeXLT8rJWDCdsiNmf1pg4K9RI9Aav/JsXTwI?= =?us-ascii?Q?E6aHfWMkerBiKXvXGkGSzCaap3mlivzp5FtsjgDTS/ROFWASs1Jfk4rfoPtx?= =?us-ascii?Q?yHIe8F415S1ifMNqpdwotDcu3Ffltq7iuTM09ABnL7kI1Zi/eOgQ9t1VdPrs?= =?us-ascii?Q?gZ1W6VOUHV8/rm2Uhae5t9VuU1e4qZZu4sfdmMVQScUY3KcX7R1MOGSPtBGV?= =?us-asc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6PQqKDrrvSkWYdpGxx+ja04?= =?us-ascii?Q?EGXQTumIqJKrRtU5Lh5qIR1ADky9efERZRPPpQB/isinrwOFs0DcJ4QKRym4?= =?us-ascii?Q?2CivEtCrOIeeIDW953bkT7KC2F5MmQybbDsGIK9MbH53vWDjqqAdfIkV+3OM?= =?us-ascii?Q?EMPOtyVVFAJ38z6Y9tXPWhxu0PlgbECQpLvyAe6W8Mm4BHruc2fT7ZVx8lP/?= =?us-ascii?Q?od6kUnfz7qUztFZFRrO7ncc3GFX8UDDJJfWXVqb0D3pE2EhMqlF+XY/c4mNj?= =?us-ascii?Q?QQbsw0aR1gzsYrsLp0hGZWGJeu7c40YefeK4mHB9?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN7PR11MB7139.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 329bb1c4-842d-4207-aaa9-08dbecd81874 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Nov 2023 10:28:27.0154 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: bihGHRXNyskyN4vAzCBwB3eSFi4aGNX6FmSUCMG+R1EpBzXU7F8/vaef2WcN7Qc+hcrqzQMm/SCBo7zOO4THPw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR11MB4736 X-OriginatorOrg: intel.com 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 Hi,=20 Thanks for the ack. would like to change the state of the patch, which will= be merged into the dpdk. Change: The "--allow" parameter is added when the number of allow is greate= r than zero. Thanks, Mingjin > -----Original Message----- > From: Richardson, Bruce > Sent: Friday, November 17, 2023 7:17 PM > To: Ye, MingjinX > Cc: dev@dpdk.org; Yang, Qiming ; > stable@dpdk.org; Xu, HailinX > Subject: Re: [PATCH v7] app/test: secondary process passes allow > parameters >=20 > On Fri, Nov 17, 2023 at 10:24:41AM +0000, Ye, MingjinX wrote: > > Hi Richardson, > > > > can you please take a look at this patch. > > > > Thanks, > > Mingjin > > >=20 > Hi, >=20 > I acked v6. If nothing major has changed in the patch, then the ack can b= e > kept for v7. If there is something that has changed that you think I shou= ld > look at, please include it in the change-log, so I can check it out. >=20 > For now, assuming no major changes: >=20 > Acked-by: Bruce Richardson >=20 > /Bruce >=20 > > > > > -----Original Message----- > > > From: Ye, MingjinX > > > Sent: Tuesday, November 14, 2023 6:28 PM > > > To: dev@dpdk.org > > > Cc: Yang, Qiming ; Ye, MingjinX > > > ; stable@dpdk.org > > > Subject: [PATCH v7] app/test: secondary process passes allow > > > parameters > > > > > > In EAL related test cases, the allow parameters are not passed to > > > the secondary process, resulting in unexpected NICs being loaded. > > > > > > This patch fixes this issue by appending the allow parameters to the > > > secondary process. > > > > > > Fixes: af75078fece3 ("first public release") > > > Cc: stable@dpdk.org > > > > > > Signed-off-by: Mingjin Ye > > > --- > > > v5: Optimized. > > > --- > > > v6: Optimized. > > > --- > > > v7: Fix CI errors. > > > --- > > > app/test/process.h | 46 > > > ++++++++++++++++++++++++++++++++++++++++++---- > > > 1 file changed, 42 insertions(+), 4 deletions(-) > > > > > > diff --git a/app/test/process.h b/app/test/process.h index > > > af7bc3e0de..06b2f8b192 100644 > > > --- a/app/test/process.h > > > +++ b/app/test/process.h > > > @@ -17,6 +17,7 @@ > > > #include > > > > > > #include /* strlcpy */ > > > +#include > > > > > > #ifdef RTE_EXEC_ENV_FREEBSD > > > #define self "curproc" > > > @@ -34,6 +35,34 @@ extern uint16_t flag_for_send_pkts; #endif > > > #endif > > > > > > +#define PREFIX_ALLOW "--allow=3D" > > > + > > > +static int > > > +add_parameter_allow(char **argv, int max_capacity) { > > > + struct rte_devargs *devargs; > > > + int count =3D 0; > > > + > > > + RTE_EAL_DEVARGS_FOREACH(NULL, devargs) { > > > + if (strlen(devargs->name) =3D=3D 0) > > > + continue; > > > + > > > + if (devargs->data =3D=3D NULL || strlen(devargs->data) =3D=3D 0) { > > > + if (asprintf(&argv[count], PREFIX_ALLOW"%s", > > > devargs->name) < 0) > > > + break; > > > + } else { > > > + if (asprintf(&argv[count], PREFIX_ALLOW"%s,%s", > > > + devargs->name, devargs->data) < 0) > > > + break; > > > + } > > > + > > > + if (++count =3D=3D max_capacity) > > > + break; > > > + } > > > + > > > + return count; > > > +} > > > + > > > /* > > > * launches a second copy of the test process using the given argv > > > parameters, > > > * which should include argv[0] as the process name. To identify in > > > the @@ - > > > 43,8 +72,10 @@ extern uint16_t flag_for_send_pkts; static inline > > > int process_dup(const char *const argv[], int numargs, const char > *env_value) { > > > - int num; > > > - char *argv_cpy[numargs + 1]; > > > + int num =3D 0; > > > + char **argv_cpy; > > > + int allow_num; > > > + int argv_num; > > > int i, status; > > > char path[32]; > > > #ifdef RTE_LIB_PDUMP > > > @@ -58,11 +89,18 @@ process_dup(const char *const argv[], int > > > numargs, const char *env_value) > > > if (pid < 0) > > > return -1; > > > else if (pid =3D=3D 0) { > > > + allow_num =3D > > > rte_devargs_type_count(RTE_DEVTYPE_ALLOWED); > > > + argv_num =3D numargs + allow_num + 1; > > > + argv_cpy =3D calloc(argv_num, sizeof(char *)); > > > + if (!argv_cpy) > > > + rte_panic("Memory allocation failed\n"); > > > + > > > /* make a copy of the arguments to be passed to exec */ > > > for (i =3D 0; i < numargs; i++) > > > argv_cpy[i] =3D strdup(argv[i]); > > > - argv_cpy[i] =3D NULL; > > > - num =3D numargs; > > > + if (allow_num > 0) > > > + num =3D add_parameter_allow(&argv_cpy[i], > > > allow_num); > > > + num +=3D numargs; > > > > > > #ifdef RTE_EXEC_ENV_LINUX > > > { > > > -- > > > 2.25.1 > >