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 7B594A00C2; Wed, 2 Nov 2022 14:14:28 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 59E1140223; Wed, 2 Nov 2022 14:14:28 +0100 (CET) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id A80A040041 for ; Wed, 2 Nov 2022 14:14:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667394866; x=1698930866; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=cBtTdPdnir8X4QZuPk5tNsj0lb4aHHXpHQV9dKmlZ1Y=; b=c6lDHNaI0Joj+XuKFsar4s7+5xPvzKjI5Kd4Vchfb8G72XMjRjEY2hAl iD1V6fJqNHEZUM94feEufIqVSu4dP0mM8gPLcRDwyieK0qUPM3LBJsezU cwU4BJ2+mc1zb9ilNJcWV1iSE3S9apVrRxvlcNTI52yKG6vaA/PL+WquH 4We1ehBSkzugFyEIe+OV0zy9NKOW0hEC8Mr1H/I9MilEwgZWT5LvcHUq8 CN1kYrsb7brG5H/FceRf0pjo0QKEBELVEmuUSIGuI4CWHne8TgF5/n9If ZAVcHGj3D6Q9/I+rEOjdfKCHDXGJedWj6leWnwKNk6j3f618dtrV78eIK w==; X-IronPort-AV: E=McAfee;i="6500,9779,10518"; a="371493619" X-IronPort-AV: E=Sophos;i="5.95,234,1661842800"; d="scan'208";a="371493619" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2022 06:14:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10518"; a="634257170" X-IronPort-AV: E=Sophos;i="5.95,234,1661842800"; d="scan'208";a="634257170" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga002.jf.intel.com with ESMTP; 02 Nov 2022 06:14:24 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) 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.2375.31; Wed, 2 Nov 2022 06:14:24 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) 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.2375.31 via Frontend Transport; Wed, 2 Nov 2022 06:14:24 -0700 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.43) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Wed, 2 Nov 2022 06:14:24 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gsP5hzrs9M3L701OC57xPZagkkAvrgDk0mteZSqhg+OszOMWJU3r2qELJ87b8PUN3Ht1kyiTTA6raXtYjfn+C3XCiBAtT3vjnB0wwQ2te0XV2aq/Gdd+njLH6xkr1unNXjmPxvOK+UoTqsxvfni3Z7WBypjzUnSr1/wV9H28GALiwxcz5oVAXaLYACDeeuzCvMDTIdu+1mH3JzXyxDL4UTF5qPq1eqrrHDk3c/IySC5t9oDt8JU25dEI307M72EijfI60TdCvTXupPZ1ljCYX6SFariwUiIV6gPJzKxU4GYgMkO+OOMsTN0TQC+D0vXIR8Jk3KfSoBx2I28U6V30Ig== 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=Uf4njakYtpfsdfGl0yvwZAhllUoMtgMxMEhpP2CXrfg=; b=Vijylxq4uMr3sz2t58qvK366RO1xKCNd1BjQzvLSqbff3LNFcOaGwe6CDXd1vooR4UmFktDlsNr1dTmyt15R4veURTGiaM1ItUvaTY2yIM2Im5VZ+DFYhvzwdt0q1cm7gwgLGAZrzRFvpPvc3G45I/jI8XIBVKDDTa8ZfwkcK5sNPvB8i13KK6Mxawvv81yx1yoyB7lL1GXm2L4bYJPwbIT0o3TmRzUExcifUunvF96iXxTjbp9PXee8FYl7j5jpQT0FgelKfNxXObLFHcqdev9G4Mhh62VPebzPwbP+rK6SqqIPLBLe/ut9QBFbxU5Dtr0cC1ZmAqMbCpRXnJGfTQ== 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 MWHPR11MB1629.namprd11.prod.outlook.com (2603:10b6:301:d::21) by BL1PR11MB5526.namprd11.prod.outlook.com (2603:10b6:208:31d::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.20; Wed, 2 Nov 2022 13:14:22 +0000 Received: from MWHPR11MB1629.namprd11.prod.outlook.com ([fe80::55af:6b82:6c7f:6c]) by MWHPR11MB1629.namprd11.prod.outlook.com ([fe80::55af:6b82:6c7f:6c%2]) with mapi id 15.20.5791.020; Wed, 2 Nov 2022 13:14:22 +0000 Date: Wed, 2 Nov 2022 13:14:15 +0000 From: Bruce Richardson To: Thomas Monjalon CC: , , , , , , Matan Azrad , Fan Zhang , Ashish Gupta , "Viacheslav Ovsiienko" , Ori Kam Subject: Re: [PATCH v2 1/2] common/mlx5: fix build disabling Message-ID: References: <20221030082722.1333530-2-thomas@monjalon.net> <11826899.zAa99ISigo@thomas> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <11826899.zAa99ISigo@thomas> X-ClientProxiedBy: LO4P123CA0352.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18d::15) To MWHPR11MB1629.namprd11.prod.outlook.com (2603:10b6:301:d::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR11MB1629:EE_|BL1PR11MB5526:EE_ X-MS-Office365-Filtering-Correlation-Id: 301fd62f-9248-46bd-eb11-08dabcd42835 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mhU4l8arQ4qIMXU/fUQS2pLUgEE1KzvOCM19DmctKNjyylktsbTR8qpbxDAQeROfeDGOUrj2PCfTgACwz82UbGBu7I9VSZPla+wAjXXnnDpKSYWJoNO5DMMvDoJUOjOuDXj8DEMTgnuAB50R3vaKNzMTLd+ATWmRoQQ4qwgsIpXXtYDtnok0bBzsrFEKjMuRBj4snwymUsVpRLIHIJTT5QzmfywtYJW9dIRdX2JtSLtO+WusSS8jcZ7wESZzBHiDn3tiornLEC+gnSkzrhdFrJOZPkGqBQ5iMEYfVdvilcdQ7CdxrMoboaxnswkbb1zmgmDNFRBYHHAP5o0PRcZY4M6kQ5EQvjA9DIjbzrea/sCK1BmlCkghP748qluCZcnEB4tQ1CwP1Dko4GjfiASeOGJhBoBbYGWvnSM9CusMBQRF65dSc7eb/bwrd+tLN38DtLGeGiEOMLoohXa11ixxn+fa9sntY7wTHBZg+ev8yEo7dSmadevJjiUbs3u7hmzvtnIjDKoWEM/5s2f12xGr5hJI5vPKVRoMOPk30TEDl4iPS00WT/vpg48vf+kY7vXLITBRYEkknWX+GRLlOdTcS+QBJ7mROPz4Cx+DlejqDcK9hTFJkEyPSdVobjlUJmpW6BFe02QTbMUvsqecm3+TNO8LcuovDbYxVUUQJMh3SGrqWStzTFR7taNlz179CpyEWLlLpTuaQTOLf2svVeyEBw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1629.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(366004)(346002)(396003)(136003)(39860400002)(376002)(451199015)(83380400001)(86362001)(6666004)(6506007)(2906002)(6486002)(44832011)(82960400001)(38100700002)(4326008)(26005)(6512007)(186003)(478600001)(316002)(66946007)(66476007)(66556008)(8676002)(41300700001)(6916009)(54906003)(8936002)(5660300002)(7416002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?MuObepZHnIipOPeQKeEtp633QxRZMWatyn/sB/n3dwo+xp0uYjYQOuYgD/+I?= =?us-ascii?Q?GNJc25Teb32YhgUxupSlURlecaNee5qhjxYpErwZt+OamARod8kgSvRdepNe?= =?us-ascii?Q?HTYBU4lNB3MgEX7TgqgTwNoRKLTNQfrL7bFaT3eKMn/SYR8vz2zzZ/VnkU0p?= =?us-ascii?Q?hYqjqh7J7OTxbWCKP7v8XSQhKiVzuVepfqNZC7+nPgyunsfBgQ2Ph6h3BorL?= =?us-ascii?Q?JV9IEO0Xdd5GN/armkcw/L8MDLzkkM6EpW51MWWKfd1smGE+xPYembM8F9q2?= =?us-ascii?Q?WmlQY7VIeaHKFzdrgNxPLriIaHulOQ1X6XVuUzC6pDlLIVu/QIfJB39llZvc?= =?us-ascii?Q?7Yfyld5lzhkhVDH2U72MDc7PfILIYW0wB35I5W0zmq0anXOEnJw4cVjp4r0g?= =?us-ascii?Q?azlKXN5E7BavBIcE9Hiho+Mtq9YU9v3D6r0Pfh7w5r0ufofjiWOiikagfuPx?= =?us-ascii?Q?i/v05ZrovIx9+Q6ANYRlKdV5XjndIt3KqMQZqbz5E0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tV1jXiS5sNNgr4CwFqLDNiyACxdU4Qc11nvUGVVa8QDu4r/RX?= =?us-ascii?Q?T5oStBPjVrPsZyNaTp5ZFMTjPfoAfAXWbWMi6JANfwrMzNIJk9Z1mzZfP69x?= =?us-ascii?Q?AseSh9fVkYmStBIZMX++HsUceHjCh9PgrZAxNJVl7X0CbiDAayKbg2oagg+w?= =?us-ascii?Q?4PIkdoI7g+ANJu8706YWZMG3i4P5r67KbZa37FHmg2bWO7MpyMkDOIksgJqG?= =?us-ascii?Q?Ug=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 301fd62f-9248-46bd-eb11-08dabcd42835 X-MS-Exchange-CrossTenant-AuthSource: MWHPR11MB1629.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Nov 2022 13:14:22.1932 (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: 53Ftl6K5gwgAzcMGePiYkHfzqsORJDu9w7ltL8/v57ukPGD0GxBL3pw0ZyPL9yag59VegV52m0LJOybmi0qH5wtYW3WOjGBTUSTeamwsaV0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR11MB5526 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 Wed, Nov 02, 2022 at 01:29:49PM +0100, Thomas Monjalon wrote: > 02/11/2022 13:10, Bruce Richardson: > > On Sun, Oct 30, 2022 at 09:27:21AM +0100, Thomas Monjalon wrote: > > > If the dependency common/mlx5 is explicitly disabled, > > > but net/mlx5 is not explicitly disabled, > > > Meson will read the full recipe of net/mlx5 > > > and will fail when accessing a variable from common/mlx5: > > > drivers/net/mlx5/meson.build:76:4: ERROR: Unknown variable "mlx5_config". > > > > > > The solution is to stop parsing net/mlx5 if common/mlx5 is disabled. > > > The deps array must be defined before stopping, in order to automatically > > > disable the build of net/mlx5 and print the reason. > > > > > > The same protection is applied to other mlx5 drivers, > > > so it will allow using the variable mlx5_config in future. > > > > > > Fixes: 22681deead3e ("net/mlx5/hws: enable hardware steering") > > > > > > Reported-by: Andrew Rybchenko > > > Signed-off-by: Thomas Monjalon > > > Tested-by: Andrew Rybchenko > > > --- > > > drivers/compress/mlx5/meson.build | 5 +++++ > > > drivers/crypto/mlx5/meson.build | 5 +++++ > > > drivers/net/mlx5/meson.build | 5 +++++ > > > drivers/regex/mlx5/meson.build | 5 +++++ > > > drivers/vdpa/mlx5/meson.build | 5 +++++ > > > 5 files changed, 25 insertions(+) > > > > > > diff --git a/drivers/compress/mlx5/meson.build b/drivers/compress/mlx5/meson.build > > > index 7aac329986..49ce3aff46 100644 > > > --- a/drivers/compress/mlx5/meson.build > > > +++ b/drivers/compress/mlx5/meson.build > > > @@ -9,6 +9,11 @@ endif > > > > > > fmt_name = 'mlx5_compress' > > > deps += ['common_mlx5', 'eal', 'compressdev'] > > > +if not ('mlx5' in common_drivers) > > > > While this is fine as-is, I think the more usual way for checking the > > presence of a component in DPDK is to check dpdk_conf. In this case the > > check would be "if not dpdk_conf.has('RTE_COMMON_MLX5')". You may want to > > consider using that for consistency. > > Yes, I've forgotten this: > > lib_name = '_'.join(['rte', class, name]) > dpdk_conf.set(lib_name.to_upper(), 1) > > Then what is the usage of this? > > set_variable(class + '_drivers', enabled_drivers) > That is used for the summary printout at the end, so we can list the drivers enabled. The approach using the common_drivers works fine for this patch, so let's keep it, since it's merged. I was just pointing out the other approach for consistency sake. /Bruce