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 0CCD3455D0; Wed, 10 Jul 2024 11:02:58 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CBF40427E7; Wed, 10 Jul 2024 11:02:57 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) by mails.dpdk.org (Postfix) with ESMTP id 1E7FE40647 for ; Wed, 10 Jul 2024 11:02:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1720602167; x=1752138167; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=9xTj+il+v9nTqkQQzIG2fsYHny8qOETZ+eUbrmOlw1Y=; b=RLDueHaQRIUvX/dgMU/MNIjJv9s1xXJiZyiYwBNgcSj9XYWuP38L+ELX c4TZ43SPVG9rrKz9IgA372paX/ewDHpOA0VgW4Ny2Vwd1UcGQE02ewEbm QP9d0iWOnC+uhcsmHKKvMsEBDJRqmsKJ2R3sqBiOH1qCMOtL6eLhJocQp Md8EWdBrkco579MPc5c9bJFTQqp9uGSwZrwLQWnROvR+HtKWrjkaPJkbl WeKgjmFkOZGz4mNcwsClX1DoPS2sltnpAV+WXNr6Kf0F4EqvdqT2GbJh3 9EenKz9ONFoOlImSYSyAELNjmD9YNlI2LD3A2QIBC41KWrlqy+FrIo1+m A==; X-CSE-ConnectionGUID: KZZUevmQT4WEXN9Ws2zfYw== X-CSE-MsgGUID: wVTvQ1dwSoiNeQdhcTjzZA== X-IronPort-AV: E=McAfee;i="6700,10204,11128"; a="29308788" X-IronPort-AV: E=Sophos;i="6.09,197,1716274800"; d="scan'208";a="29308788" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jul 2024 02:02:44 -0700 X-CSE-ConnectionGUID: ZI75+gBmR4mVrAxrQimSkA== X-CSE-MsgGUID: YMM/KdOcQ1OfLei9TfVwug== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,197,1716274800"; d="scan'208";a="53324106" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orviesa004.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 10 Jul 2024 02:02:44 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 10 Jul 2024 02:02:43 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 10 Jul 2024 02:02:42 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) 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, 10 Jul 2024 02:02:42 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.172) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Wed, 10 Jul 2024 02:02:42 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=evGF7x7t2m5jc7EDigzhw1csNge4DtDo8MuPK1yJlI9hA+W92pLZGAAmK4no2ViMgxCWrVR3wOB3ezX58vLVXAlbvV+rXmaDAFRIAK7l1gnKG9eUgTuP99J3IiknugFghKfUrp3K8RjXHNQbvb/6+fhxgoTLQw5QVpC1ny/+fESMaqretqlbf3T17zNqnqI1Ydqf477tVut6gMijBiqZ28qpZ6hdZ/JoptFBYHv24ATkfZpsOPAbESgkWfca1PBgLnOPPS+t2L5f5BR0m/8dqvwK8MahSgCZHSgmnW7HZLCXJAFqG375bO5MTW933hM+57STxwyb//2tgKnaFO3Ldg== 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=pUhDYWaGlzjXa3FVABdeS1Lsy9aLM/CC/XYy9QO/foo=; b=WdpKDVMB1JUv1rwH3y/0QpVUMpHVTaj4pW9izIsrpfLwG7OGAm78M3XsWeQ8R4CfJ4oUyl+0gGYKaTDOuFJ8/klE5V46CvquYj644E2r70JutJa3TaVjQHb3gSwhNePdNtLxGumUyOC/35FbK76fw0Z8jwt1jKfnWXKfx0WWuFAso4zlHHa+gV0zokJasly41z/GymUnnIq4t6Q37I2xaiTyBPRSfrxyCH2ZEe7zsc5KIF0/l3MFZtBYFZVkmFN42i9Sz+DooRfcXH0sYx9CB8L52c30hMZXbR0L2mGAIIUtO1tEIfbRdJegyEYe4ehut+vm7d9KT4q2DjBWc6Orzg== 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 CH0PR11MB8165.namprd11.prod.outlook.com (2603:10b6:610:18e::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.38; Wed, 10 Jul 2024 09:02:39 +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.033; Wed, 10 Jul 2024 09:02:38 +0000 From: "Stokes, Ian" To: "Ye, MingjinX" , "dev@dpdk.org" Subject: RE: [PATCH] test: fix option block Thread-Topic: [PATCH] test: fix option block Thread-Index: AQHadfcBzIeopgRym0qlyoy7kWzSsLHlXNKggABixLCAALYf4IAAsPXAgADhTFCACFqosA== Date: Wed, 10 Jul 2024 09:02:38 +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_|CH0PR11MB8165:EE_ x-ms-office365-filtering-correlation-id: 9e5818d2-7e59-40a5-4f15-08dca0bf0c89 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|376014|1800799024|366016|38070700018; x-microsoft-antispam-message-info: =?us-ascii?Q?CerPIuXLFZIWr4FV+RBQ6VR7wIWEZbqmVIXpkI0efKs9vnCaNJrQG6ewTMcn?= =?us-ascii?Q?1OzHeefG2FQ3ivO2FPpj61reCOM9jTFxneRexnJZm9VhmfoaITRjFyoWKTCD?= =?us-ascii?Q?olvw00bLS6ryjQh1lW+Hznw6vWuQfTuxa6nDoyaHGHrAoH7DyxCMd/IyD0pw?= =?us-ascii?Q?+WAhSATJnV3IER2IS1/uO4Xxvwyg/yaS0Da930F9Dz19vYoza4EQ/KIWVPhN?= =?us-ascii?Q?/qFZf/RAou759ZVolpbrdj9hDwCG/VJy0OjW8HSKuRA1r2twSOSHdWl4kWz8?= =?us-ascii?Q?ZxPOAWqGvoR9I8q9oEN6kz8jPzgk26rDxZBDqovRTDbFruR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r8LkWNs2LrGvmo6FaxyGg6rAvoq?= =?us-ascii?Q?1qBBPPmKep8jyp6yDcyiTCqhtcbedKPQn3F7ud5/1e8K88Rer81XecvR9tiQ?= =?us-ascii?Q?8tr0BtmstKwpx77NpHRWjpVN6HNazRmWj+3dVwjXu3JWUtuC4VlGKeg9dzvU?= =?us-ascii?Q?RCcoxIGpVK3KyKVDcZKSZ9V3Acc6PqQ9LAs2kkn1O71RpYmbmg=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)(376014)(1800799024)(366016)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?S6wF542J3139/rmirHLEw9bzrLUYMDgWCIl6i4AlOHOwU+Q01oiuqEZwVOqR?= =?us-ascii?Q?OC+37YVk8tlhjoAMNt5L+gkmCUO+PGbFRGTpwcA9UT+/DVtV5CDhusOsRK5L?= =?us-ascii?Q?2zlQ3whBWEXf6xPPiORIrMB/1DCcDwVN9XBlZEdHzm4zgT/fUFp+ZdqvMgns?= =?us-ascii?Q?Xu0M8PuKQ26Lcz1I0MXmpoS5qBoeihnfNGGLWpwtZUneoECvm64wQWgjAw9p?= =?us-ascii?Q?LnopgX+rAA2qJgdzyZy76B0JGnActiO+AfRIRGK6QCqUqZrQ96uhKdtXTp6d?= =?us-ascii?Q?KaBl8stKEl7iks/IenuJ1P2wJMU4WqShdeulVVF+iMgojKmefvD+G3PIfVhg?= =?us-ascii?Q?xQFQ7nqWCF1jnLcTP6dZYh8pVVSiUKRQtrfaKhIYYIECVkgkBVDewG0bEP0J?= =?us-ascii?Q?C4jHU0OlMaSIULVvTTbHMCpV0OVr+c1nAzKh0COeYRHCCA4PuzbgoQaFAV+p?= =?us-ascii?Q?5bYH07ID/EmI1hIvpVins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= =?us-ascii?Q?+28tVy6bN4cJmgZi0SwS0q6PeEB+s3UkRWh2Ho+oeDuJaOK7GC1JJJjDOzeC?= =?us-ascii?Q?bAEwi22h0ql2pUb9Z9UxBVs6uM8zFOBDOCQHSn/1qGvpB7KfJV5r1r2yg6V8?= =?us-ascii?Q?WtUVs5/Cl2KsYvW+FTo+ZtuAPRj9BlnC3ZOy26mmj/S8lj0hKgb4sjZWxcM8?= =?us-ascii?Q?Jz7tFWWDCnt31UQug2uc0BijIvqMV2zMs2GjlLdm?= 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: 9e5818d2-7e59-40a5-4f15-08dca0bf0c89 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Jul 2024 09:02:38.8747 (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: 0PSxsajL0+5YNIjJfspyUGb4PyrBGANws1qNYZBVig+VNC9A6TFqTripYfG+uTqEThELpYMgxY+1isGbgSQxzA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR11MB8165 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 > -----Original Message----- > From: Ye, MingjinX > Sent: Friday, July 5, 2024 2:39 AM > To: Stokes, Ian ; dev@dpdk.org > Subject: RE: [PATCH] test: fix option block >=20 >=20 >=20 > > -----Original Message----- > > From: Stokes, Ian > > Sent: Thursday, July 4, 2024 8:02 PM > > To: Ye, MingjinX ; dev@dpdk.org > > Subject: RE: [PATCH] test: fix option block > > > > > > -----Original Message----- > > > > From: Stokes, Ian > > > > Sent: Wednesday, July 3, 2024 10:35 PM > > > > To: Ye, MingjinX ; dev@dpdk.org > > > > Subject: [PATCH] test: fix option block > > > > > > > > > > The options allow (-a) and block (-b) cannot be used at the sam= e time. > > > > > > Therefore, allow (-a) will not be added when block (-b) is pres= ent. > > > > > > > > > > > > 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 alway= s > > > > the case that the two are not allowed to be used side by side? > > > Both cannot be used at the same time. > > > > > > > I had a look through the EAL documentation and didn't see and > > > > mention of this behaviour, but maybe I missed it? > > > The "eal_common_usage" function has a clear description, see below: > > > lib/eal/common/eal_common_options.c:2206 > > > > I understand that, but that is a comment in code, I think the behaviour= is > > worthy of being called out in documentation API too for usability facto= rs. > Sorry for not providing complete information. There is processing logic i= n > "eal_parse_common_option". > Unsatisfied condition outputs "Options allow (-a) and block (-b) can't be= used > at the same time". >=20 Ah Ok, thanks for the clarification. I see this has been tested as well pre= viously by Jiale Song. In that case this looks good to me. Acked-by: Ian Stokes > > > > Thanks > > Ian > > > > > > > > > > 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