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 C63434247C; Tue, 24 Jan 2023 15:42:34 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7AB1140150; Tue, 24 Jan 2023 15:42:34 +0100 (CET) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by mails.dpdk.org (Postfix) with ESMTP id 90E7E400EF for ; Tue, 24 Jan 2023 15:42:32 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 2290D5C0560; Tue, 24 Jan 2023 09:42:30 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 24 Jan 2023 09:42:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding: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=fm3; t=1674571350; x= 1674657750; bh=CAL4kmR1If20/YbnwwMaYUhQBGNQHC8dJoV6dUmb3IE=; b=D TggAqGLCQuLS4cZCvmISo5JdQHd9mCPcYh+X41hjJALbcT/azAxPp8N+9aK8Wwbb MmsB5Cj85gJ4qs2V+lA6vorpmp4IEwFkUJJEH0T9O/e+6vNVq0+4se17DQTP6Mvj UfZqSSZjSPDPs51Hr1b2JAl++VgRav66L+hkAtVg6wfS/XMB5IkZldLOck0V2hHV 3IgUjcL/K9u+od6loWKlLIpYfhxmV0FuDux6sb+iy+eDgLZK8K7fyALIHl2CSAst xGR3jwdiB4wVsQJBp5DrWLcGSvhF1ie3gqqDll71aN6tXkTTEtFPYf0y+ZBr5epY gI1aBhjM8HVqdAGBNqreg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :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=fm3; t=1674571350; x= 1674657750; bh=CAL4kmR1If20/YbnwwMaYUhQBGNQHC8dJoV6dUmb3IE=; b=b 7QAJmLcknnZDEaz8syjtzScs2qJhl4DZ/ORF13ATskDTep3e6msL6WzHHIQJQ5Gb Mv25iEJ2toG0Z8CudOEA2CpBCkNQzRbWUGTj2pBjH3JCkYbD4f2+KkPvcJpLLkoa IFGYKfMYDOv8vp5yPjN+4JZr2d78T8M3NzB2GyDuw8B/i3rARL/IlNc48RfUZBdn KbYXY4LdfmPyt+Nw7OSLrg8zdQc8NJJy8zMxVAS+sFxGA6Vy7/iuWcz/yPE54EJs OCIN1RU5ZyMQoCdSup00XuXq6MiKLctL1gj+cfAcPu8YgO5PT/f1Tpf3CPXfjibm uMVT0tsPJKM+38OsxhAxQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddvtddgieegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedtjeeiieefhedtfffgvdelteeufeefheeujefgueetfedttdei kefgkeduhedtgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 24 Jan 2023 09:42:29 -0500 (EST) From: Thomas Monjalon To: Dmitry Kozlyuk Cc: dev@dpdk.org, Tal Shnaiderman , Matan Azrad , Viacheslav Ovsiienko Subject: Re: [PATCH v2 3/4] net/mlx5: remove weak stub functions Date: Tue, 24 Jan 2023 15:42:27 +0100 Message-ID: <2957690.GUH7pLUipS@thomas> In-Reply-To: <20230123224212.45743cdd@sovereign> References: <20230105161020.247780-1-thomas@monjalon.net> <20230112203719.1528619-4-thomas@monjalon.net> <20230123224212.45743cdd@sovereign> 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 23/01/2023 20:42, Dmitry Kozlyuk: > 2023-01-12 21:37 (UTC+0100), Thomas Monjalon: > > The vector Rx functions are conditionally compiled. > > Some stub functions were also always compiled with weak attribute. > > If there is no vector support, the weak functions were linked. > > > > These weak functions are moved in a specific file > > which is compiled only if there is no vector support. > > This way it is simpler to understand, > > and the weak attributes can be removed. > > > > This change helps to compile with MinGW GCC > > which has no support for weak functions. > > > > Signed-off-by: Thomas Monjalon > > --- > > drivers/net/mlx5/meson.build | 13 +++++---- > > drivers/net/mlx5/mlx5_rx.c | 35 ------------------------ > > drivers/net/mlx5/mlx5_rxtx_vec_null.c | 38 +++++++++++++++++++++++++++ > > 3 files changed, 46 insertions(+), 40 deletions(-) > > create mode 100644 drivers/net/mlx5/mlx5_rxtx_vec_null.c > > > > diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build > > index abd507bd88..dba911693e 100644 > > --- a/drivers/net/mlx5/meson.build > > +++ b/drivers/net/mlx5/meson.build > > @@ -49,11 +49,14 @@ if is_linux > > 'mlx5_hws_cnt.c', > > 'mlx5_flow_verbs.c', > > ) > > - if (dpdk_conf.has('RTE_ARCH_X86_64') > > - or dpdk_conf.has('RTE_ARCH_ARM64') > > - or dpdk_conf.has('RTE_ARCH_PPC_64')) > > - sources += files('mlx5_rxtx_vec.c') > > - endif > > +endif > > + > > +if is_linux and (dpdk_conf.has('RTE_ARCH_X86_64') > > + or dpdk_conf.has('RTE_ARCH_ARM64') > > + or dpdk_conf.has('RTE_ARCH_PPC_64')) > > + sources += files('mlx5_rxtx_vec.c') > > +else > > + sources += files('mlx5_rxtx_vec_null.c') > > endif > > Can "is_linux" be dropped now? > I suspect that vector routines were compiled only for Linux > to prevent linker errors from both weak and non-weak symbols present, > not because vector code is somehow Linux-specific. Maybe but we should enable vector routines on Windows in a separate patch.