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 5E298463BD; Fri, 14 Mar 2025 18:21:37 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 30A0140263; Fri, 14 Mar 2025 18:21:37 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id EC3C6400D6 for ; Fri, 14 Mar 2025 18:21:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1741972895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8AlZMUtiNjMhLBr7H+9412Z+D1tZLI5gnum7KXcXLLQ=; b=JBLUApbyuy0HHC4BVfqSCZ5LONcSOmdccN9gnqarcZeCTnpzZ60m+4r/YGCPQkmUoejg3U gNZjK5F3sl69nguSDk/VFp7h8N13iH10Fd/OSlwlUdSocY1HpXdjHQ6r4dbO2KptGtYm4K 16PINWpGL7LxQ5qP6Ejcu1ZMDS0OGL8= Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-21-BbaRb0ZfPzSWt0SZV1Qaww-1; Fri, 14 Mar 2025 13:21:32 -0400 X-MC-Unique: BbaRb0ZfPzSWt0SZV1Qaww-1 X-Mimecast-MFC-AGG-ID: BbaRb0ZfPzSWt0SZV1Qaww_1741972891 Received: by mail-lf1-f69.google.com with SMTP id 2adb3069b0e04-549971b3247so1178223e87.2 for ; Fri, 14 Mar 2025 10:21:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741972891; x=1742577691; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8AlZMUtiNjMhLBr7H+9412Z+D1tZLI5gnum7KXcXLLQ=; b=sZbx3mKmt6bUD2yc26gxljW0Ezft3FQyXoFJ+Y+LvouekOxWAE6lgEI7PM1+5XmhKE DcP7BSJN7ZEzobe0h2aetBnsTD+5D3oImGAOhpqbtf9OvkVosMf6CJuBkpTejiPej7R/ 3FJxUBmFuQXRYDUDvVrT5UREEdIBHLtO8yyeAyfeUpRvXpj25Io8M+6Y6HuC8ANDx+yi Rzt9yDUGqqVTW7nDk218oADCbBKVLCAaXg218AMZW2we3L4Q3zigigbiAoFRz8X9h4IU tWWwm/3dQFEtsB0AbfD6Jeek/kKuR86ep52aP++/76f1qTtQbt/SUPEJyrTC5kkV5vxS gfMA== X-Gm-Message-State: AOJu0YzW9qXH/LFd2K2ByvMfkQvbzLUnI8Z6/cOFcWtM3zJ+/TbmYT0u NNKD8Kvvo/BTg0N9YygXHLJ47OPt2MlgviwCaWpDELbxQ7BdKKPokSfy0iV0ssAoc2R7LfzrJ9l TgML49yY4HxKEGq4uxg2yfAkMWu0Vl+QrfCu1D4IWU9eFdgLtpkqrNYRSwLwxV7KrLLh7GdFgAq rbEdwa+sz0HRVNkOM= X-Gm-Gg: ASbGncveyw6Uulax+raDBKr31nVpINt0k61IhV+U1tnMevr3J0f2XPDXUbouAeEW9S8 W4mWl0HQ/YmcbPCs4Xp0Inh7Pza39cvs2mKHW6XPXj0eoi0Mb/XKWYUZl/uKG75EbNQjCXjRfQF 0= X-Received: by 2002:a05:6512:1282:b0:549:8b94:9b93 with SMTP id 2adb3069b0e04-549c39afa83mr1335328e87.49.1741972890646; Fri, 14 Mar 2025 10:21:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEhX9esVSFWF2RRoAYaIbqV0jZt8S4eui15vR9WauuckdU/jtUgqtcgFbOda7ok0h5Txs7O39vimuEbCuxbzCE= X-Received: by 2002:a05:6512:1282:b0:549:8b94:9b93 with SMTP id 2adb3069b0e04-549c39afa83mr1335262e87.49.1741972890072; Fri, 14 Mar 2025 10:21:30 -0700 (PDT) MIME-Version: 1.0 References: <20250305212349.2036410-1-david.marchand@redhat.com> <20250311095609.194523-1-david.marchand@redhat.com> <20250311095609.194523-7-david.marchand@redhat.com> In-Reply-To: From: David Marchand Date: Fri, 14 Mar 2025 18:21:18 +0100 X-Gm-Features: AQ5f1JqdLk6ThwU8UbWZWRaknjhBfCVn04vIYEGiAj8W4jtKutM-EReVWx7Ao2Q Message-ID: Subject: Re: [RFC v3 6/8] build: mark exported symbols To: Bruce Richardson Cc: dev@dpdk.org, thomas@monjalon.net, andremue@linux.microsoft.com, Nicolas Chautru , Parav Pandit , Xueming Li , Nipun Gupta , Nikhil Agarwal , Hemant Agrawal , Sachin Saxena , Rosen Xu , Chenbo Xia , Tomasz Duszynski , Chengwen Feng , Long Li , Wei Hu , Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , Harman Kalra , Anoob Joseph , Andrew Boyer , Dariusz Sosnowski , Viacheslav Ovsiienko , Bing Zhao , Ori Kam , Suanming Mou , Matan Azrad , Liron Himi , Chaoyong He , Nagadheeraj Rottela , Srikanth Jampala , Andrew Rybchenko , Ankur Dwivedi , Tejasree Kondoj , Gagandeep Singh , Kai Ji , Vamsi Attunuru , Pavan Nikhilesh , Shijith Thotton , Pravin Pathak , Ashwin Sekhar T K , Igor Russkikh , Ajit Khaparde , Somnath Kotur , Chas Williams , "Min Hu (Connor)" , Ian Stokes , Vladimir Medvedkin , Anatoly Burakov , Jingjing Wu , Praveen Shetty , Cristian Dumitrescu , Maxime Coquelin , David Hunt , Sivaprasad Tummala , Akhil Goyal , Konstantin Ananyev , Fan Zhang , Ashish Gupta , =?UTF-8?Q?Mattias_R=C3=B6nnblom?= , Kevin Laatz , Wathsala Vithanage , Tyler Retzlaff , Jerin Jacob , Harry van Haaren , Min Zhou , David Christensen , Stanislaw Kardach , Dmitry Kozlyuk , Byron Marohn , Yipeng Wang , Ferruh Yigit , Abhinandan Gujjar , Amit Prakash Shukla , Naga Harish K S V , Erik Gabriel Carrillo , Elena Agostini , Zhirun Yan , Jiayu Hu , Sameh Gobriel , Reshma Pattan , Stephen Hemminger , =?UTF-8?Q?Morten_Br=C3=B8rup?= , Srikanth Yalavarthi , Jasvinder Singh , Gaetan Rivet , Volodymyr Fialko , Honnappa Nagarahalli X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: oCDFkdNjbzErABSDdmIMB8aKtdJv2eAd1C6RLDpdNEc_1741972891 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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, Mar 14, 2025 at 5:53=E2=80=AFPM David Marchand wrote: > > On Fri, Mar 14, 2025 at 5:24=E2=80=AFPM Bruce Richardson > wrote: > > > > On Fri, Mar 14, 2025 at 05:14:34PM +0100, David Marchand wrote: > > > On Thu, Mar 13, 2025 at 6:31=E2=80=AFPM Bruce Richardson > > > wrote: > > > > > > > > On Tue, Mar 11, 2025 at 10:56:04AM +0100, David Marchand wrote: > > > > > Annotate symbols with newly introduced export macros. > > > > > > > > > > For code not compiled by lib/meson.build or drivers/meson.build (= like AVX > > > > > separate libraries, or sources in /base/ drivers), the exported s= ymbols > > > > > are added in some file listed in the sources so they get caught b= y > > > > > lib/meson.build or drivers/meson.build. > > > > > > > > > > Signed-off-by: David Marchand > > > > > --- > > > > > > > > Just checking: for the AVX2 and similar instruction-set-specific fu= nctions, > > > > we don't get errors if those are not present in the actual link pha= se, e.g. > > > > when building on non-x86 platforms? We don't need to put an #ifdef = around > > > > the exports? > > > > > > We are not there yet, but it is likely MSVC linker will complain, ind= eed. > > > > > > #ifdef around the exports won't work, we would need a precompiler pas= s > > > (and exclude rte_exports.h inclusion). > > > > > > Another option would be to provide stubs for those symbols when the > > > additional AVX512 (for example) libraries are not compiled. > > > > > > But I think the simpler is to let a driver/library provide a set of > > > sources to parse for exports... maybe via an extra variable? > > > WDYT? > > > > > Yes, something like that could work. > > > > What I'd actually like more, but never have had time to actually try ou= t is > > to generalise the instruction-set-specific build stuff into the higher = level > > drivers/meson.build code. After all, much of the code for doing so is j= ust > > duplicated - check for AVX512 or AVX2 and if present build these files = with > > the extra flags for that instruction set. > > > > Something similar with the base code. Most base code builds follow pret= ty > > much the exact same routine. > > Having those separate libraries require special cases every time, so > yes, it would be great if those could be factored in some shared > mechanism in drivers/meson.build. > > Putting the AVX stuff aside, and back to why we need those separate > libraries for base drivers... I think the main use is to waive some > build warnings, is there something else? > If so.. I think some drivers could already be cleaned (like net/e1000, > net/ngbe, net/octeontx, net/thunderx, net/txgbe, raw/ifpga at a first > glance). > > The AVX stuff seems a bit more complex, as there are multiple combination= s... CFLAGS_file.o +=3D -Wno-stuff was so handy ... :-) --=20 David Marchand