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 4ABEC41DC8; Fri, 3 Mar 2023 15:23:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2E0DB40687; Fri, 3 Mar 2023 15:23:26 +0100 (CET) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by mails.dpdk.org (Postfix) with ESMTP id D4804400D6; Fri, 3 Mar 2023 15:23:24 +0100 (CET) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 79E965C0193; Fri, 3 Mar 2023 09:23:24 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Fri, 03 Mar 2023 09:23:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1677853404; x=1677939804; bh=5jzOHeGpemJMOv0SUvV6aIANLf2Bj7Mb0ju 1j9+Z1Fc=; b=HPDmJbUwP9li6E6UmiO2wmfnz/ce9xjFSUkMGX+03ImEZ3WKRjp uTEJeO8HRweKyKtRFTRQmYkG+xiXZQAgtBNwKpY+f3ZDNaOyDlASJRPCDMtkxkSw oXBCcEmMj5SBq5kb72ncGpzhWKsg09CEm4vsUfHNnl9Y/izDqSmK7b8nCrfq+zoA LFNszO/f29T2CZ2uXUBdPLmMWnwKfwlvgN3al7NCnY5mYA6hbyz+U8GQ6P5CeNXa IVbUpL7h3/2gyui8jtS51PAhQJKahUdXMra9UEUBaWUeDweBFRoH6rptJB7c3z2P WQwva/R9pAdQoD9PSM4ipTCJsIDqJdB/mqg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1677853404; x=1677939804; bh=5jzOHeGpemJMOv0SUvV6aIANLf2Bj7Mb0ju 1j9+Z1Fc=; b=QqVXEEcki9O/QU72uaKL/Y2kch7DrwwiuK+VsPw5PSoSHUqK9Vc q779N1/NfWUaoqu/7eSnXtGpFBUjNswEGD2n/aQn+Zvgi3BJ3tM0RcvFLHhsujXA QLBkvnLvK7zEgQw4f/iPBdrAXS3mM9c0+cvvofbomSkjooI9YlF8uFZbu27Lu8Ep 1ALzeS7wR0R4ZjzebCNUvjCT3CBolZFHvPAlD25YebMcqSffQ1Y4ua/B72oAAxrZ 27iVP+eLHHTI7FQ8H137x2U1KpdD4tZJuhmZDnepdqDAQsQ39KF5LQrVMwDI9ZT7 V3rFnyy/Z2opBYy8ByaMOJgYRfSxTOE3CNQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudelledgheekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedtjeeiieefhedtfffgvdelteeufeefheeujefgueetfedttdei kefgkeduhedtgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 3 Mar 2023 09:23:22 -0500 (EST) From: Thomas Monjalon To: "Zhang, Qi Z" Cc: "dev@dpdk.org" , David Marchand , "Richardson, Bruce" , "stable@dpdk.org" , "Wu, Jingjing" , "Xing, Beilei" , "McDaniel, Timothy" , Ajit Khaparde , Somnath Kotur , "Daley, John" , Hyong Youb Kim , Dongdong Liu , Yisen Zhuang , "Zhang, Yuying" , Maxime Coquelin , "Xia, Chenbo" , Shijith Thotton , "Matz, Olivier" Subject: Re: [PATCH] drivers: skip build of sub-libs not supporting IOVA mode Date: Fri, 03 Mar 2023 15:23:21 +0100 Message-ID: <2528811.sP1CNn8AQk@thomas> In-Reply-To: References: <20230219115529.3260580-1-thomas@monjalon.net> <2030660.o4kTbAZ4gJ@thomas> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 02/03/2023 15:16, Zhang, Qi Z: > From: Thomas Monjalon > > 02/03/2023 14:52, Zhang, Qi Z: > > > From: Thomas Monjalon > > > > If IOVA as PA is disabled and the driver does not support IOVA as > > > > VA, the build of the driver was disabled. > > > > Unfortunately some drivers were building some sub-libraries (with > > > > specific options for vector paths) which were not disabled. > > > > > > > > The build parsing of those drivers need to be skipped earlier to > > > > avoid defining the sub-libraries. > > > > > > > > Fixes: a986c2b7973d ("build: add option to configure IOVA mode as > > > > PA") > > > > Cc: stable@dpdk.org > > > > > > > > Signed-off-by: Thomas Monjalon > > [...] > > > > --- a/drivers/meson.build > > > > +++ b/drivers/meson.build > > > > @@ -127,9 +127,9 @@ foreach subpath:subdirs > > > > # pull in driver directory which should update all the local > > variables > > > > subdir(drv_path) > > > > > > > > - if dpdk_conf.get('RTE_IOVA_AS_PA') == 0 and not > > > > pmd_supports_disable_iova_as_pa and not > > > > always_enable.contains(drv_path) > > > > + if not get_option('enable_iova_as_pa') and not > > > > + pmd_supports_disable_iova_as_pa and not > > > > + always_enable.contains(drv_path) > > > > build = false > > > > - reason = 'driver does not support disabling IOVA as PA mode' > > > > + reason = 'IOVA as VA not supported' > > > > endif > > > > > > If we check enable_iova_as_pa for each unsupported driver , do we still > > need "pmd_supports_disable_iova_as_pa"? > > > > They are a bit redundant. > > That's why I prefer my previous solution for i40e and iavf, > because, someday we may claim pmd_supports_disable_iova_as_pa = true but still leave avx part not be fixed. Both are in the same file, so I don't see how it could be missed, especially if those lines are placed together. We have a variable used commonly with a standardized message, we must use it, at least to allow easy grep of this support. > > The idea is to use pmd_supports_disable_iova_as_pa (could be renamed) as > > it is simpler to use. > > But in the case of drivers having sub-libs (always enabled), we need an extra > > check of enable_iova_as_pa inside the driver file.