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 BEF3143352; Fri, 17 Nov 2023 12:17:16 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 92AAD40ED1; Fri, 17 Nov 2023 12:17:16 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 27F0840648; Fri, 17 Nov 2023 12:17:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700219834; x=1731755834; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=beDSGKiGU0Owd0ljS3y2LsUqecqCLqdgDG8FW37J730=; b=mIIW/viDWvHVOBx3X5jBWRgAlCM39Rc0sX6hupGWCGiXjLj5h95FccNS ynv+N3lD9X37IDEkKozs+UrPIUkkBYzjvE4SDwm66viArRYACyOhZrFur D2m3hMmzeWN7UC4qeKOJJtqh1wzD3hjRpUhKQ0f944qi/ExS1AZXPN8Eo OL9WN3NVfoS5wOC+mewPNPd1xbeqTIzCgxqJLLKbKF+gp+Qbp8xx6dkS4 0UFx40NaNidY/LS2zb9qJjrjFxU45yz+r6dT5Qohi+zhsHJRg/5Zu1n3x I+O2Q5ciyoOhCa2um2CHIe578tcFLy/YyUZmzmC1yOOGBEPUtumhh6r7h g==; X-IronPort-AV: E=McAfee;i="6600,9927,10896"; a="376330303" X-IronPort-AV: E=Sophos;i="6.04,206,1695711600"; d="scan'208";a="376330303" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2023 03:17:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10896"; a="759149542" X-IronPort-AV: E=Sophos;i="6.04,206,1695711600"; d="scan'208";a="759149542" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga007.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 17 Nov 2023 03:17:13 -0800 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Fri, 17 Nov 2023 03:17:12 -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, 17 Nov 2023 03:17:12 -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, 17 Nov 2023 03:17:12 -0800 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.168) 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, 17 Nov 2023 03:17:12 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oTQqxOXjVuldKdTe/YKUPrinOxJREPAVxuCElJ6YEvGIAJIDAC9+BwkX/iLnfjkxlqD4UL3RP70C8srBS/RD2idZ8x73kgSkggjmgxDhG63b5knJC5ivPwwidhJH6II6W3KTk9guO2DOUqQrtjqulK2/aGurosQ8q66a03CDVzz2bSFSW8fVJFc2DoHCHs6oEPHL2vMqYf9hH1epmYS5Z8IriPCoetFfWexA0bnOAzxNYK3FRTJ2lF5THan+UPG5VETkbhl2HtVNGczCpUQPPqCpR+mgIailQ2/fWbD/ZERtO4UJUL/ADSwH/kvdAb417jp3GbLA1NsNbNfTlwQzeQ== 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=YnYSQFSqsHxD9ed4sTxIBmDP+iczC6KoS8ubSWpnlO0=; b=BFof5fdO4aFmGrIpg44g7Svy7VXA4NEJjsNaBAYD3jCwQm5MGi0Z1VvQvlQtOO0RIt8gQWsd+Btr5Q3sNwGbuu+RsFeLg0AOPbuHQ4Je2jV1AuJxoR5o9DqbqFQo8kbSImWeekjtzInk7RCrbFqJXvrMtiiEEsbQDJ9AtRp7aRwTqhEOE/tlE4nslXJpaFu41CdiqIqxVZMKa3IW8pOpsUlGLdab0jBsivl0kogu089mk6joYBFDSbwqlFGSC/RkqfQuChtYc9I5UlDkJ325b4PkXXH0DVRGcbG3ccZ8Qxaq3f3S4l8M8KXxjwNX8UmBnUSn8+ZTrchs6zpypvVQxA== 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 Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by BN0PR11MB5695.namprd11.prod.outlook.com (2603:10b6:408:163::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.23; Fri, 17 Nov 2023 11:17:10 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::4782:d54a:209d:cb49]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::4782:d54a:209d:cb49%7]) with mapi id 15.20.7002.021; Fri, 17 Nov 2023 11:17:09 +0000 Date: Fri, 17 Nov 2023 11:17:04 +0000 From: Bruce Richardson 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 Message-ID: References: <20231113104222.85891-1-mingjinx.ye@intel.com> <20231114102815.409998-1-mingjinx.ye@intel.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: DU2PR04CA0003.eurprd04.prod.outlook.com (2603:10a6:10:3b::8) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|BN0PR11MB5695:EE_ X-MS-Office365-Filtering-Correlation-Id: 6b8fe854-85a9-41e3-575a-08dbe75ebd6e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: M6ow4/MEzPhgdX1jSiIeSNmcOSkkNuWhAxGGPQQznonkw8M4A79uXiSX37rlkIB8+FdvI64JAeHjig7DD4Ib426qPRMJKg1XDgylXQPER0XBOgIjO3rQ9RsIHrBFsaQm6hyrAXX2YCp/FCjnnMVsqp6SyWs/aVKZSST+pgA+z6Kl7CJ+1v3BsMKV0kX8072GNDzuStjdvqlUQk7BI9IUXp2EuZVBVCflg7071vPDXbPGfqnR9N9yTilsmAQMrjcf8rMMcfVx7nHeNpiDKGkH1E02ijBPR4EvchfzrXycV1a7ANlvOOqh9a76Cn00OUockzkBeuXtdvMg+rHuikuTNxSNdMfIlMXbZ7yvc2JoYI5FmJIYWDIkIfSTXSrK1VC5fq0ojLVn7XEwGmGOWeEOfSzkxkDQpHFL1LmAkZtWemXUOffpU8wKFPGe9kg/iVOuYrfspwYFwHOhrykd0YbZI3mCkEYNtGDMbHmgDTRYWsKQdZBnOsx9cbYgVJwkBekqKiNsyxyhe63KAGruQ6L8xtJOaIDw0Q1ZewqQul0UOXTVv3qUzv+Jv0aVqbwA710G X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(396003)(39860400002)(346002)(366004)(376002)(136003)(230922051799003)(1800799009)(186009)(451199024)(64100799003)(6512007)(6486002)(478600001)(44832011)(2906002)(82960400001)(41300700001)(38100700002)(66946007)(83380400001)(107886003)(54906003)(66556008)(66476007)(6636002)(86362001)(26005)(316002)(5660300002)(450100002)(6862004)(8936002)(8676002)(4326008)(53546011)(6506007)(6666004); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?MIhENW1530CpshbH54K8fsXO/09xb18rsjfKyrcQbZ+XdwhatI4pApZ/hETZ?= =?us-ascii?Q?XzeyMPFA2CtA4cw3en9sHsXQjIH499YqP0D3UfJk+NRPkIG3aDWxDmcvXwN5?= =?us-ascii?Q?S8QBTyozns52IKax/E0WvSFEnY5APJPC9XNIqSHZmKRJEBXipHNyHGMKp47V?= =?us-ascii?Q?2hDvCpAN51U9Fcx+f3KQqb0Tvu9KNSl2dPKBYuMg/iD8wH6Nw7RCcuoeCw60?= =?us-ascii?Q?p/30Ljt/jyecJGRvcZVHXVn1GI7y6s1ZuPfchiPHhKxPT34zsfR4WL7Mpuyn?= =?us-ascii?Q?ZSIZxscd/pcIPBUMoVkZMJ5Txf8iNJLCdPUVsFJzGEKGtSSTQrEe4Kwo5rVM?= =?us-ascii?Q?pQnbjVrCfWGMU2sZ4hRPS27xLDj1YZioeQBG/FpT8aCPj9mnhkHyZo6u28yr?= =?us-ascii?Q?TxlrrQEX6SQI/zansDbWhxCxnksPzwSvZPq0C7K/U2RuzbUKZkH8UF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ZnH3wncCRXFgygDDq90xvXGWqttybRfWfLOS6Rd7yYt0CH63i?= =?us-ascii?Q?tf0F/Z1k8KqrQsL7L2tVy+bijQ3w7jNXNYttwcstMBRp3uLySvV9wM/ZKY+v?= =?us-ascii?Q?o+sBlV3ktIbIyVrCHRJ8QqJPSn5xHWhuKNUCSu65p5DU/1e3jg07EoR8fHxC?= =?us-ascii?Q?SoFcLpDH1KRH4wXKzS8XR5FuWGoHWWyqeTNgPIsUOniBqAIXbvXRnkvBqkHC?= =?us-ascii?Q?PTbXzqohumMXB/O7K9Dj0pqHVQKMwPGXLXhojyraAulq59lnb3lQ9MzcrAyd?= =?us-ascii?Q?lQ=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 6b8fe854-85a9-41e3-575a-08dbe75ebd6e X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Nov 2023 11:17:09.6241 (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: WFStBOSJ9IxPKD4m+UjjjuZ8yF3SqccyW2NXTXa6bSfkNAM/HLHdvwqYTcjWKoNmRVZAnlUx1awYlwBPzWd37NxL9d6DlYBmfQ7I6D3CJGc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR11MB5695 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 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 > Hi, I acked v6. If nothing major has changed in the patch, then the ack can be kept for v7. If there is something that has changed that you think I should look at, please include it in the change-log, so I can check it out. For now, assuming no major changes: Acked-by: Bruce Richardson /Bruce > > > -----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=" > > + > > +static int > > +add_parameter_allow(char **argv, int max_capacity) { > > + struct rte_devargs *devargs; > > + int count = 0; > > + > > + RTE_EAL_DEVARGS_FOREACH(NULL, devargs) { > > + if (strlen(devargs->name) == 0) > > + continue; > > + > > + if (devargs->data == NULL || strlen(devargs->data) == 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 == 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 = 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 == 0) { > > + allow_num = > > rte_devargs_type_count(RTE_DEVTYPE_ALLOWED); > > + argv_num = numargs + allow_num + 1; > > + argv_cpy = 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 = 0; i < numargs; i++) > > argv_cpy[i] = strdup(argv[i]); > > - argv_cpy[i] = NULL; > > - num = numargs; > > + if (allow_num > 0) > > + num = add_parameter_allow(&argv_cpy[i], > > allow_num); > > + num += numargs; > > > > #ifdef RTE_EXEC_ENV_LINUX > > { > > -- > > 2.25.1 >