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 2C7AF4246C; Mon, 23 Jan 2023 20:42:16 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1F56540150; Mon, 23 Jan 2023 20:42:16 +0100 (CET) Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) by mails.dpdk.org (Postfix) with ESMTP id B222240150 for ; Mon, 23 Jan 2023 20:42:14 +0100 (CET) Received: by mail-ej1-f42.google.com with SMTP id bk15so33335608ejb.9 for ; Mon, 23 Jan 2023 11:42:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=61vgQneGayrSnrFT+cORjWgpf2hfAmI7sJ52u0fVAoo=; b=erqiqvatx0BMH2mUNeHMUR4sx1RcUrexBlmfZA3qvFNLHq20uBqpa+OLOgyvScscK7 cB2SqJDiWtsj6LBGOCkT0cW10ImuvGLvxN7KOMuCGCcFypFXDkJqTouv437yHTJLUzou YbPPmjKAHl7eD5RV+Lln8c6dXamSEyHefQDnr96OqIu8K7ymxqKlLYEvxz2gsAbimsgy 6k82RNFHskujs4jwdMWnVbZumY0A0uIndqzX9mPwJFZ1RXDzqFqYtUfCKdxXLbzKKuk2 JaCcgNOf3C12y9DQMeFDtOX03ai99Snd0EaMP2KxjYVwP3HtViO9zNCfrHUCDGsP2pPj BpVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=61vgQneGayrSnrFT+cORjWgpf2hfAmI7sJ52u0fVAoo=; b=nLtncC6VzOA73VZ18jre9cWibR7H3ha09LJFhbCK7nCuT0YoOZHFj743bYYHHDdZEX huazZ1DXM9RQAFA7raGrjfdfeY2uzAluV44pqG0wM+DzTqHZ7LdhOOH/tCnuCehVPGz/ M3qN1UIEijaFpt8HXmSE4bp5/b0YObAoB/H3hPDiQNV2evXKU88gfEJ8NvgyE4vG7m4O 0nqD5+W7SFzkLqQ73dJ7Ca0ePnpQnCU4Zzcys3a+6jfVcPRcn2K/+2DZ6I+ZZYYMjIxp iLz61+NRR1JhGWEKpPly5RKzzfhTKZ6Fkm5f5p8oI3G2mJFHZtyJxNQRY6yC6+rEMdgj ucIg== X-Gm-Message-State: AFqh2kp75jqUZE0x9ov07DVVw0F1uEkkBeoCVS/LixkjhGDBF5UgoBuv Om3QbtG+q2o2jU8DNta5yMg= X-Google-Smtp-Source: AMrXdXvIlrDZdRk9A0YFo9oFiybrOI+lRr1bhbzRKbhyIYqGyQw94vmSWVQsDOWw+Ol2rjQHayEMMQ== X-Received: by 2002:a17:906:5fc5:b0:7c0:f9ef:23a2 with SMTP id k5-20020a1709065fc500b007c0f9ef23a2mr29091208ejv.30.1674502934378; Mon, 23 Jan 2023 11:42:14 -0800 (PST) Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id u21-20020a1709064ad500b00855d6ed60desm18572707ejt.192.2023.01.23.11.42.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Jan 2023 11:42:14 -0800 (PST) Date: Mon, 23 Jan 2023 22:42:12 +0300 From: Dmitry Kozlyuk To: Thomas Monjalon Cc: dev@dpdk.org, Tal Shnaiderman , Matan Azrad , Viacheslav Ovsiienko Subject: Re: [PATCH v2 3/4] net/mlx5: remove weak stub functions Message-ID: <20230123224212.45743cdd@sovereign> In-Reply-To: <20230112203719.1528619-4-thomas@monjalon.net> References: <20230105161020.247780-1-thomas@monjalon.net> <20230112203719.1528619-1-thomas@monjalon.net> <20230112203719.1528619-4-thomas@monjalon.net> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 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.