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 B750B4558D; Fri, 5 Jul 2024 03:39:08 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ABB614027E; Fri, 5 Jul 2024 03:39:08 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by mails.dpdk.org (Postfix) with ESMTP id 2DC8C40275 for ; Fri, 5 Jul 2024 03:39:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1720143547; x=1751679547; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=ngtGqRvpm4viKQGBdLriWRigwGTYMKYZ8F+B++zBKho=; b=TvfwGR/64q9GWAx7aRfRlQjpp8kZGDBbU6gMkMIeKQ9CQgckIxXBjEyL 6bxhoyh2trZNuJvNV9HGWET75UIn8BIP3xTQsUVLUEP+udA5u6YIevTGR NvuvQ7Ri1V9xH46JRICpur7HgcpI7Kg6Sy+nUZHi+gLoCjMlQhGIXyTge yXO97sSDOH4J4y2100YgcFGfvVqRMw8jXFIqQPOl/zGFgw9G9RzXmamrZ 0iwDEBR/TV612V/OkxUZcR66SEvleG1+gX2LMMzcNMW0QbI+8OOvQM8xY IE0PEV9UTssCLnU6NMk8z6jQl8cGyOb7oPNQJ7ad0xQsy041khMWwYm1+ A==; X-CSE-ConnectionGUID: uiqR6bR7Sl6mPxHtQ1C/Cw== X-CSE-MsgGUID: YMOvqsLhSB2gVPF/pxUZxg== X-IronPort-AV: E=McAfee;i="6700,10204,11123"; a="39942267" X-IronPort-AV: E=Sophos;i="6.09,183,1716274800"; d="scan'208";a="39942267" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jul 2024 18:39:06 -0700 X-CSE-ConnectionGUID: qe/94uyHSQ6XwRZmFBCf+A== X-CSE-MsgGUID: 95DZCyr8RxmVbi2Oc5Dvhg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,183,1716274800"; d="scan'208";a="77475616" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orviesa002.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 04 Jul 2024 18:39:06 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 4 Jul 2024 18:39:05 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) 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; Thu, 4 Jul 2024 18:39:05 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.49) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 4 Jul 2024 18:39:05 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RH+5PnNSr4mMiL1Tcuj2exrgYoFxYx07FAjUGvwPjnGo2BATcMPd7njHn3p9Tprpa67Y/V7MPHvf9HzjVWxSXRB0d9bqqlEQP1x8GhXofW/GS4ex4GkuQ3r9XulW5L95nWXJZGc7KpUS+OCzvjkEHDQ4GIoZaKk7ZJ+Af6BSB3z2mKr8L2wW/W9bBvd+3Z8rMafX6goF1PLBATomSgng0bsb1NO2wYO9b0LLJjxhA2kNdzxYECANcUnU/uxktECcl35yThq3mPi61wUCMdfJcWzqrgEX3IYMW/mZ9aecQET9SAx/89rZgQTb7AcMIFe+oPbIn9l7gnfOkNMHWNFxFg== 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=y9v9G6J9LC+PVxckq+JB2JolmtPeY3aAnUBf2A7ebw4=; b=UaFX5f324AUt0ObR05b2QOHTHi/w3VHDJcQJmZXtyHAkESjbe+7pS7Cizc8pz0GADCCnws+KiHoFJiEpD7iMNmR2gwbNAOW4MkgbtZA7LftuOsyL3wW6w9GaOcJml1xSon9LN37lz94Ofv0HK/get05UoiXPvwzdau1dtlopv+JZwbDD/raFB0wc54oEQmdrVR++3rgqk2Jh4JGltkwm9o1uGHFd22XXrSQgNzu5Oj1Tb/+UdOOhRg5xwOrNNDMjfdIqI3vvkxoKvEhvfL9Wgm0wOkJx9rcXVw57uZSqFaMB7ezEX0zG02wi+ge/UxzZEkOI0uBARBisyZReZ5uapQ== 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 LV3PR11MB8601.namprd11.prod.outlook.com (2603:10b6:408:1b8::8) by PH0PR11MB4792.namprd11.prod.outlook.com (2603:10b6:510:32::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.23; Fri, 5 Jul 2024 01:38:58 +0000 Received: from LV3PR11MB8601.namprd11.prod.outlook.com ([fe80::7878:b054:82bf:b5b]) by LV3PR11MB8601.namprd11.prod.outlook.com ([fe80::7878:b054:82bf:b5b%3]) with mapi id 15.20.7741.027; Fri, 5 Jul 2024 01:38:57 +0000 From: "Ye, MingjinX" To: "Stokes, Ian" , "dev@dpdk.org" Subject: RE: [PATCH] test: fix option block Thread-Topic: [PATCH] test: fix option block Thread-Index: AQHadfcBzIeopgRym0qlyoy7kWzSsLHlXNKggABixLCAALYf4IAAsPXAgADhTFA= Date: Fri, 5 Jul 2024 01:38:57 +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: LV3PR11MB8601:EE_|PH0PR11MB4792:EE_ x-ms-office365-filtering-correlation-id: 95aa6455-8e39-4223-7bf6-08dc9c933d0b 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?BpLvHiJ7zNQlgv6dE/CswR0ylgUPreHcdpK3dxt37xKLaL3h6q36Zc71/dfv?= =?us-ascii?Q?SXe7uAb2YcJClyRcDxHAy2nfuudBOttN7K45HwXFcuboiSD+LlapcXUqTiQz?= =?us-ascii?Q?bNVhcdEVj0sj7noJDMJl4a7SkiYVY8U/l4vCfpEzfv1CkKmsb2fQ5n9VZQRZ?= =?us-ascii?Q?6PC5ygc63wzuUB50j003EPAnJXPU0Wgo2Oh8xnuK7ftzYoUgFA8A6HRxIuD9?= =?us-ascii?Q?ug+VRz6avyBsI21apTMHVQJX7l5RD52mC8uLuhjUZwDXNuB5q5RqPu8Us2VU?= =?us-ascii?Q?D+9wFaBKJLeOdzy83B+oev6M+hmu7qQM0Rt2vsBBIpn9CPMdyz1v7BRTG7gH?= =?us-ascii?Q?840/keMcy5vNCM44KaDoif8/REr3g573V7zwxtP4WrCgDDgqKH9qUOe/KRQC?= =?us-ascii?Q?9SnuFQgm7SSEyXxXlhM0b3cdviXAZ4ttFG/zjjA+FaRwiy39L81nD9sta+Dx?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j8lTYhGt5uwi9A6d+RZslA3g3a?= =?us-ascii?Q?/76ZYuR7vllUrJVjMc8RW+y5TW9/WsbBpMcD6AIkrgREuy2Yxw=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:LV3PR11MB8601.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?LHIT74ufdak8nmSkTSNbBR8V86FH6bi8+0Tl8GoDfoM/UDqOi+tDCYmzcq6H?= =?us-ascii?Q?2d5kL8WiNblgL5t5Xh5nYSOZUUc6j2d8XxYoJJZNp47X/mnxQ7sD+hTUy1OY?= =?us-ascii?Q?qsC8S/6OV2iw2hNt/HgI1+ygChkJCidRZlxUtOS1OGnvm7MvIxc6C+zBKwNJ?= =?us-ascii?Q?J6STUUlIMRcs7hXRtSdpn0GHyLGOXLxEpxQF/i2yrQ3D20gUdJmUm7IPZFTn?= =?us-ascii?Q?+9Evzq9NUDkeLe+nTGC/+tVcGxd7qu7ojz+xAMAXk4s1GBv1Vv3vgjb8wg/B?= =?us-ascii?Q?ZMCSep1t5YDQ/W84mKXUS3U3Mva0El5jusCP1Dj1K3K1znmW6jqRTJW2QZvq?= =?us-ascii?Q?0l++tlyw04gMcZBJbmUfiWTkpDUwCBIKl+4tVmyIPDQpw9v9LK9BEVFB8L3O?= =?us-ascii?Q?QYiVNSqwjaqrfsslXzRGw+1T+uUSutlwrYebFt5Lz5qcN+OaXO1ZNhejBq7p?= =?us-ascii?Q?+xC1d0iaeumHi89qANXlS/kLisbR6JaefqjJh25TErk2V4dH3iUDIl9wzGhy?= =?us-ascii?Q?lWCltGTh82LFAQVUVwOVwNaZpVAfZRgFOSOA4yH7besWnLdsV+zg+u2jFoc1?= =?us-ascii?Q?YIq43rqMVteI8+/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Q?xmhhAW8KX+9ajn7gk6lQpFwXGb3EADJ0GWnz4qC8O6FnsvhrTBTSp7x/VcyL?= =?us-ascii?Q?iO4Ft7mksckBBonBgM3+1M60OHfK5Kwf0ZAiQPpS?= 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: LV3PR11MB8601.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 95aa6455-8e39-4223-7bf6-08dc9c933d0b X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Jul 2024 01:38:57.7643 (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: D2+MgKCcnq5xuy9bM2fH8kWnwQGHepS4oEagKaU1EurDlENnbGkqDqgov62xHag6V3PFdz7qVrLdeBK/h0tdgQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4792 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: Stokes, Ian > Sent: Thursday, July 4, 2024 8:02 PM > To: Ye, MingjinX ; dev@dpdk.org > Subject: RE: [PATCH] test: fix option block >=20 > > > -----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 same = time. > > > > > Therefore, allow (-a) will not be added when block (-b) is presen= t. > > > > > > > > > > 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 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 >=20 > I understand that, but that is a comment in code, I think the behaviour i= s > worthy of being called out in documentation API too for usability factors= . Sorry for not providing complete information. There is processing logic in = "eal_parse_common_option". Unsatisfied condition outputs "Options allow (-a) and block (-b) can't be u= sed at the same time". >=20 > Thanks > Ian >=20 > > > > > > 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