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 D9B95463BC; Fri, 14 Mar 2025 17:54:17 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7559A4029E; Fri, 14 Mar 2025 17:54:17 +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 0D38D40289 for ; Fri, 14 Mar 2025 17:54:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1741971255; 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=0ryWBlWkLr91pc+heYkXAg8Pd8EmDFeOBf+lnOQqdsw=; b=gBYSzAb1uV4l4uKl0PHv8MI8m9Lr2yGmWsJ9drZBmZGJP4tWZw3sBGmLN38adcCUeOU6oz hv+nHMapnxgMhDNWcJpHSom9nwoOoqkzB8Jk1gRmf/Owncctv4jlVrEr/K9t/dmKG5Bxhz JR6eDn/MsLZu1CRn85QCIBsd34oLamE= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-111-NnVbWHPsNWWFMn94IsqIdQ-1; Fri, 14 Mar 2025 12:54:13 -0400 X-MC-Unique: NnVbWHPsNWWFMn94IsqIdQ-1 X-Mimecast-MFC-AGG-ID: NnVbWHPsNWWFMn94IsqIdQ_1741971252 Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-5498963ebc3so1256711e87.0 for ; Fri, 14 Mar 2025 09:54:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741971252; x=1742576052; 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=0ryWBlWkLr91pc+heYkXAg8Pd8EmDFeOBf+lnOQqdsw=; b=JbVaeMmRe9RSvwm7iQXlh9NxsrY0MKmEmXTees/j1pG1ro57FiGTK5YFXPY8oSqbu8 gT3Q12DuB6LEyklbB6gwWqGK/WlQbXLCPTWRGrXLc6tJM3aMZif8mLFvoNjimUuQrlHm M4NjCn9zsGuyIRb9PzaZzXh4cmHfy6NkloLNT/or86lP+NS0cklmzX5Rsfn8RIWwB009 YEGM1WcW/aMtqbmfsboBHmaI+itXIQW/mPG3hnc76blET1xxo5WwzmC2XJ+jUwUJJ1Na 15pM7DazL2fUr5ilyXJ4Giwm6Y9DHN0oaO9obAOJYhTlJ493hxqdVP2uP1XdYuADF8Bt +ovA== X-Gm-Message-State: AOJu0YxYaSEit9+8VPKJXvqjjG8yoZUI6UKHlAMFkfJzwVqjY0YD4Rlz uKUvR83BjNkXlkUPYsmUiuFUhSJDNc7hrZSzp5/DjSTENDchqVgJjAZ5ZT9rhOuvVTveKtAIuZA u5LNHx6+4xAZKFzo9Q6mvdD3VxqPsH4EbrWu0/ZlNDWUAq3c8T+hehR7ocNP+8AwlYROOV/AtMp jeLcLZ9MS+3BA5RPc= X-Gm-Gg: ASbGncs+KGp17iVL11lrHyNc73wpLwjSb6bCvl4eg5YdT+kqYOIu+y5RnGdsqmAsjpT ebg2r0FDdEDtKF8FQB9AjmX6IA9NIyLwdO77xjCI7PFr84mA+egDF7Of/GIYgDXKi3dxog+Acic Q= X-Received: by 2002:ac2:4c4d:0:b0:549:2ae5:99db with SMTP id 2adb3069b0e04-549c39aab78mr1355574e87.45.1741971251747; Fri, 14 Mar 2025 09:54:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH70/du5M0qop1IjjFK/mEvfZnqEcWw0XdgEsKvfhUveJjUEYQjiZczt1tmN5SLkT2HDWNPWAJZxZJn2WFdKzc= X-Received: by 2002:ac2:4c4d:0:b0:549:2ae5:99db with SMTP id 2adb3069b0e04-549c39aab78mr1355490e87.45.1741971251147; Fri, 14 Mar 2025 09:54:11 -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 17:53:59 +0100 X-Gm-Features: AQ5f1JrEGj9Az8Jq3hzz6kJKgbEihPGinEZM8XJzZVbObN5bvhXYJiaimaqq5VI 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: 6viSExtZ1pk8_lsomdGVP5RVFe_5n78-Me-ecO1Tnd4_1741971252 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: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 (li= ke AVX > > > > separate libraries, or sources in /base/ drivers), the exported sym= bols > > > > are added in some file listed in the sources so they get caught by > > > > lib/meson.build or drivers/meson.build. > > > > > > > > Signed-off-by: David Marchand > > > > --- > > > > > > Just checking: for the AVX2 and similar instruction-set-specific func= tions, > > > we don't get errors if those are not present in the actual link phase= , e.g. > > > when building on non-x86 platforms? We don't need to put an #ifdef ar= ound > > > the exports? > > > > We are not there yet, but it is likely MSVC linker will complain, indee= d. > > > > #ifdef around the exports won't work, we would need a precompiler pass > > (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 out = is > to generalise the instruction-set-specific build stuff into the higher le= vel > drivers/meson.build code. After all, much of the code for doing so is jus= t > duplicated - check for AVX512 or AVX2 and if present build these files wi= th > the extra flags for that instruction set. > > Something similar with the base code. Most base code builds follow pretty > 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 combinations.= .. --=20 David Marchand