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 1F01345562; Wed, 3 Jul 2024 16:35:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 13B5B42E5B; Wed, 3 Jul 2024 16:35:16 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) by mails.dpdk.org (Postfix) with ESMTP id C484A42E5B for ; Wed, 3 Jul 2024 16:35:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1720017314; x=1751553314; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=8td4IeB9utrajpnzZbdlBda2IYh6bD1gsOEqkZ2AgNY=; b=dsGXh1X4HkBPuRwMwqL16cg6Tkg3cUBxETPX5QSUjq/fjt4EEcxYEM5P dZocc9rm6yRXuBqP9ze/BbjLYiPunHUY7Ciz/H+Re3V+SbJAyx58T1qBB GGhbHTw00Zqb+4BXu74W24+68860JtYFfsHagKFG26NZ3Aqx2GGfzmJBB wqxJRSe/UTgx/dwEQ3TpxsCzfhJ3g5x6DBownWJgLMYAxCtd6FQ9Guiq/ uILDy3PrzXa+CaitAiTV5lv56Zf8vEtWBZpE2cBbBrDfsHay/OFaaO8Si 5u13Rstulpu5wXOf27tuHn60RM8mi2fbvH32INDxhlfVAVeN8lSOLHIob g==; X-CSE-ConnectionGUID: YQeOztpRT7eXxXXjByypVw== X-CSE-MsgGUID: TYZvUrxCSBSWE/oIH3wdcQ== X-IronPort-AV: E=McAfee;i="6700,10204,11121"; a="21060888" X-IronPort-AV: E=Sophos;i="6.09,182,1716274800"; d="scan'208";a="21060888" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jul 2024 07:35:13 -0700 X-CSE-ConnectionGUID: FYo8FUqITYeiOxjMPiLmOg== X-CSE-MsgGUID: keiGnvt7SAqiNx9RRuOk6g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,182,1716274800"; d="scan'208";a="47029573" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orviesa008.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 03 Jul 2024 07:35:14 -0700 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.39; Wed, 3 Jul 2024 07:35:12 -0700 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.39; Wed, 3 Jul 2024 07:35:12 -0700 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.39 via Frontend Transport; Wed, 3 Jul 2024 07:35:12 -0700 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.39; Wed, 3 Jul 2024 07:35:12 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cC6F4xB6p+GcedZjd3RFkhdFFtuZobn5zhMT41yHyvjOW1jsBMNTG3mHv65tBfnCXo9guCmFGpYK0oGyMO3iyduuvPRg1esfY3ZVwF1BLivVr/6HHOaQvaEgh58BlTzy+C305Qp8v7gARloICizNhVEx7eSltquMecY1Wcxc64FOeenwjuwjlPiPj2JMFMKxqFslqwbwy/3fuWYtMKmk/rkgwn9kJmhjmzWFBVEU5P6sQzcavyGlRZW2rqiVlHCJGjQV310MN45KvgSIbL4RMFe35H0PjfNTZ8c3A8HbeReofMHsja+FUYnrH/JSCrh4UE/vQqg67/1PePZO8GmnJw== 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=/0pLoqbgJlMt+JREWbOgTKmpavI9ZGDT/sPwxrmTp6U=; b=FxvjYJewNvdKyb1y0WQHJKXk7vtUAn04uDe7Yr6t4JHwBz7kfEADAHxQlAzwG2ZHowgfx2P9rNQmSSDPqDSIb4bJLKJw0+NgpObHTpH2SQr5EOJwTm6iCzTwA2BH4o3Ryy2mLLOtRGb/Yz5opj5faGp52y2IblrzfjaArgFf4fIX8hsKy/HLYdaJa1Q4Dzo5bslrpvKoijOeheXTvlPIzJ95cLAR+kBqd9Ymny+CtCdIXG0NnYzh137YjZzShHrySuhnohFjQFZAOh/GI8B6yy5xKKwfEdSv02/5rxBhX/KoMqNlSS8eZcDvSVaehEdVoG4n2/Dcp7GSoDiIe/VwrA== 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 MW6PR11MB8309.namprd11.prod.outlook.com (2603:10b6:303:24c::19) by PH0PR11MB5901.namprd11.prod.outlook.com (2603:10b6:510:143::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7719.32; Wed, 3 Jul 2024 14:35:09 +0000 Received: from MW6PR11MB8309.namprd11.prod.outlook.com ([fe80::ba43:b01f:aee0:10a8]) by MW6PR11MB8309.namprd11.prod.outlook.com ([fe80::ba43:b01f:aee0:10a8%5]) with mapi id 15.20.7741.017; Wed, 3 Jul 2024 14:35:09 +0000 From: "Stokes, Ian" To: "Ye, MingjinX" , "dev@dpdk.org" Subject: [PATCH] test: fix option block Thread-Topic: [PATCH] test: fix option block Thread-Index: AQHadfcBzIeopgRym0qlyoy7kWzSsLHlXNKggABixLA= Date: Wed, 3 Jul 2024 14:35:09 +0000 Message-ID: References: <20240314094626.1068059-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: MW6PR11MB8309:EE_|PH0PR11MB5901:EE_ x-ms-office365-filtering-correlation-id: 5d359097-7a65-4657-d7f4-08dc9b6d5724 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|366016|1800799024|376014|38070700018; x-microsoft-antispam-message-info: =?us-ascii?Q?RSg/Y6kv71LyzWBt52oodUasy4h9nwVgRHg+OG4+pn4+6Va9+RkMe0ONwZtZ?= =?us-ascii?Q?UY9FImFYNnl8ymu1iJfqkKaE/4zhSihCjMaQCo1gVK1gHQ5fD6IzJ0vcL1Fk?= =?us-ascii?Q?YGBIDdsT79/66pQI/fsM1ueXds4Nw20bT13HvgNQiWXlJBtsNylqSx/7E/UJ?= =?us-ascii?Q?+6c8+lBUUsooB4citpb0/qQo0QeeLfx3SUfI+wlQmUBm6RomWceonhZV13s6?= =?us-ascii?Q?xjY5VwPkwMVs79rTEt+2p4jokAE/EKcDqzPGPDwZNjOgEmA3QwHnHzumJVn5?= =?us-ascii?Q?hKhDsbuiG2+QeGkDLQTL/58ESOsmQCnYzFpWRGkx9uwsY8nKPmhuU+E1IHyS?= =?us-ascii?Q?cJ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Ps86pKvlQ4h+IKntesF?= =?us-ascii?Q?GDQFJA6U9FzAX30vLhKGuLPIiDE0wBdGlBmnjLyrfPeUoCFvX8drOMn7lF23?= =?us-ascii?Q?7PeKSOL+nHLwMuGCl3uDiNam8kX35S8emVn7RKxjgWxXIUf3PnKKWPQkzUG9?= =?us-ascii?Q?0vInJBVfExjsZR7qFV3O7A5u3+Cm78l0aP3msmnINrxpbLNWGA=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW6PR11MB8309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?tLrwIlbwYoiq5/fj75fDrs1dAsllItQG6ZyCY1J5sZ9ndL6HrrK8Hg+6LNG/?= =?us-ascii?Q?0caM43pyGdUt5Zet6q/qg/So+SCFsQXDSQ6zVgsicVhfQSiFssjMSCGHBTDw?= =?us-ascii?Q?KjBj3RPeU6D3GIVFOVeviKd6ybeaA2wpRhSXTbnC9w8v9m89L4I0AlwwPxeo?= =?us-ascii?Q?z2kVJZEvUxue0T//FqIzddeWaekV6zWvFC6gYiTwKcs3mJX4n4EYDNRdcBlu?= =?us-ascii?Q?GSkUJSEBoqnonMq0uAnYLXYi+yWRKOfBpYQWSXlRwRZb/bDPqb7eru7Baeq0?= =?us-ascii?Q?5lR2uCKJA822MplFfSQ1KwYP0kMUOPdF1f4TebDU5bphwrcYi8weMkpdrltm?= =?us-ascii?Q?Mevm8X2SCWO4mNUKeH2Enptxwu+xlXUS09ZWpTK4Gj90ytQIzfVMDwzxaByd?= =?us-ascii?Q?ROMiKOk3LmCgkb6g8Gvnq9TrO2wORH4rFXR3LBwApMbS/XLO2RoLD1ngZQLr?= =?us-ascii?Q?hE9jwF/xRTCguSeQRNqvD02f/G+te+v8yg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us-ascii?Q?CVdUKcDTbrNKkhUahIbW7DsrrlXHeXUiD4QjWgby27bxovBMNGurPRzTuFgD?= =?us-ascii?Q?0F85xmirXiU6ep0DsmJd7xY2Ofu7UcBu5V+hDfFRGXDQrcwPWeeJWOhWzw7Z?= =?us-ascii?Q?6OvcuLCiv3sQchzLsjuCuX/8D7JI8+gs0Yd5eMYkQpfhU9UoxFXjfz9R57MA?= =?us-ascii?Q?oDfQj50qG5zpNEbRNSSjVjHuW2L1Q1cIcyyqjPpt?= 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: MW6PR11MB8309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5d359097-7a65-4657-d7f4-08dc9b6d5724 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Jul 2024 14:35:09.5383 (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: AId0UnzSGFCBvM5kKTS2eJPzOgAj+i+bEk/Yg2LK7SBBwTF0lRxZykB2EzBaHYrOqamfDsikWAj03vc5CTYh1g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5901 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 > > The options allow (-a) and block (-b) cannot be used at the same time. > > Therefore, allow (-a) will not be added when block (-b) is present. > > > > Fixes: b3ce7891ad38 ("test: fix probing in secondary process") > > Cc: stable@dpdk.org > > > > Signed-off-by: Mingjin Ye Hi Mingjin, in general the patch looks ok to me. A general question of the behaviour of block and allow, is it always the ca= se that the two are not allowed to be used side by side? I had a look through the EAL documentation and didn't see and mention of th= is behaviour, but maybe I missed it? Thanks ian > > --- > > app/test/process.h | 17 ++++++++++++++--- > > 1 file changed, 14 insertions(+), 3 deletions(-) > > > > diff --git a/app/test/process.h b/app/test/process.h index > > 9fb2bf481c..388c7975cd 100644 > > --- a/app/test/process.h > > +++ b/app/test/process.h > > @@ -44,7 +44,7 @@ add_parameter_allow(char **argv, int max_capacity) > > int count =3D 0; > > > > RTE_EAL_DEVARGS_FOREACH(NULL, devargs) { > > - if (strlen(devargs->name) =3D=3D 0) > > + if (strlen(devargs->name) =3D=3D 0 || devargs->type !=3D > > +RTE_DEVTYPE_ALLOWED) > > continue; > > > > if (devargs->data =3D=3D NULL || strlen(devargs->data) =3D=3D 0) > > { @@ -74,7 +74,7 @@ process_dup(const char *const argv[], int numargs, > > const char *env_value) { > > int num =3D 0; > > char **argv_cpy; > > - int allow_num; > > + int allow_num, block_num; > > int argv_num; > > int i, status; > > char path[32]; > > @@ -89,7 +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); > > + allow_num =3D 0; > > + block_num =3D 0; > > + > > + /* If block (-b) is present, allow (-a) is not added. */ > > + for (i =3D 0; i < numargs; i++) { > > + if (strcmp(argv[i], "-b") =3D=3D 0 || > > + strcmp(argv[i], "-block") =3D=3D 0) > > + block_num++; > > + } > > + if (!block_num) > > + 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) > > -- > > 2.25.1