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 030A743B6C; Thu, 7 Mar 2024 11:32:55 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E10B1402C2; Thu, 7 Mar 2024 11:32:54 +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 82F3540272 for ; Thu, 7 Mar 2024 11:32:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1709807573; 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=BVmkRWHTPYu88UCSRP6XH/ZSZls0uU41xabD7UapN5k=; b=jVv4BXpjDjXx2V/d/GIed8jXFy/5EMmHJLPNDQ/ZWo5voeA6LhJcXjBnZtJXoWaK9dlPif fkK1TcJmS6jQ+hgbzuLjHRdFVO3sA9XDKLVtFXZ8Xag6ddS1ruOcCdqbJIagHygByr54I+ JxKJa3J4aLGZ0NQ1IqUtz2JYpS0ZbyI= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-145-2n_lMuuMPgismk8dBWt1ZA-1; Thu, 07 Mar 2024 05:32:49 -0500 X-MC-Unique: 2n_lMuuMPgismk8dBWt1ZA-1 Received: by mail-lf1-f70.google.com with SMTP id 2adb3069b0e04-5133f2e0485so456991e87.0 for ; Thu, 07 Mar 2024 02:32:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709807568; x=1710412368; 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=BVmkRWHTPYu88UCSRP6XH/ZSZls0uU41xabD7UapN5k=; b=Pdrz5sXwmyfKKqouzwD0FQTUBHO/22C44yuH7WUjyW4AwzWsOyqqIN1VPXU2L3624E xzWxlDon1SkpHD4UzHguSwf1K+hngEV7nhOcvFc5rN/PAYrIvHWuU8nBbhFMXxBhxwxu rApVN1QJ04xfpOJ5Ms64hvSungnN5USTO+nTmw8SbZqFapk7Pajpl8PG9Ihl3YPxnyW2 k2K1v0nE+jm1XIq+ZsrFlFm/uO9HPa/tXU/AzPO7ZZ2pO4y/NVJiLH4OmWw8Mei1158m pK8O5mqHQCWMMRn7+z17s7X5isn/5jNiqAbQ1PgJqK1LltIq/RZoHiqn7RNs7B1Bv1fR TBSw== X-Forwarded-Encrypted: i=1; AJvYcCVrNL8Nq2//zk3l0+/eWg06u6bZXatVjMolGIDUP/c5Rdn+bhoW3an0/MIJM622P3IoLOIyWh/oDFw7bEc= X-Gm-Message-State: AOJu0Yw+NCziNyXfWmhWL17eRadgGeBUk6LARjqJw/FSVDv+WLtOtB5L XHoke2Ez8o1pezajAaSZUFRp/dLgo3WuZ11USiJqNl7b+Bo1uropig2P+K872T3pRhVLohMEwzM WuC/6D8n2Ctm1Us1/lw2jyUNZkZT4ntxuApQK4WSvXfIhZXfrdsDMc1hSkHYvbS0i19sHwk94d4 ZOPxIxH2fFAKN7qNg= X-Received: by 2002:a19:e00d:0:b0:513:5a00:192e with SMTP id x13-20020a19e00d000000b005135a00192emr392030lfg.27.1709807568226; Thu, 07 Mar 2024 02:32:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IHl0IQ+2mXLWOc6XKVZjZsyP7cRSZeZylCHIr66akTuBMLX6gHo1URCklYl6tBEUdVRRgIAR1zcLAPEWsUkHCw= X-Received: by 2002:a19:e00d:0:b0:513:5a00:192e with SMTP id x13-20020a19e00d000000b005135a00192emr392019lfg.27.1709807567888; Thu, 07 Mar 2024 02:32:47 -0800 (PST) MIME-Version: 1.0 References: <20240304184508.89956-1-stephen@networkplumber.org> <20240305175300.GC18937@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> In-Reply-To: <20240305175300.GC18937@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> From: David Marchand Date: Thu, 7 Mar 2024 11:32:36 +0100 Message-ID: Subject: Re: [PATCH] hash: make gfni stubs inline To: Tyler Retzlaff Cc: Stephen Hemminger , dev@dpdk.org, Yipeng Wang , Sameh Gobriel , Bruce Richardson , Vladimir Medvedkin X-Mimecast-Spam-Score: 0 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 Tue, Mar 5, 2024 at 6:53=E2=80=AFPM Tyler Retzlaff wrote: > > On Tue, Mar 05, 2024 at 11:14:45AM +0100, David Marchand wrote: > > On Mon, Mar 4, 2024 at 7:45=E2=80=AFPM Stephen Hemminger > > wrote: > > > > > > This reverts commit 07d836e5929d18ad6640ebae90dd2f81a2cafb71. > > > > > > Tyler found build issues with MSVC and the thash gfni stubs. > > > The problem would be link errors from missing symbols. > > > > Trying to understand this link error. > > Does it come from the fact that rte_thash_gfni/rte_thash_gfni_bulk > > declarations are hidden under RTE_THASH_GFNI_DEFINED in > > rte_thash_gfni.h? > > > > If so, why not always expose those two symbols unconditionnally and > > link with the stub only when ! RTE_THASH_GFNI_DEFINED. > > So I don't have a lot of background of this lib. > > I think we understand that we can't conditionally expose symbols. That's > what windows was picking up because it seems none of our CI's ever end > up with RTE_THASH_GFNI_DEFINED but my local test system did and failed. > (my experiments showed that Linux would complain too if it was defined) I can't reproduce a problem when I build (gcc/clang) for a target that has GFNI/AVX512F. binutils ld seems to just ignore unknown symbols in the map. With current main: [dmarchan@dmarchan main]$ nm build/lib/librte_hash.so.24.1 | grep rte_thash= _gfni 00000000000088b0 T rte_thash_gfni_supported [dmarchan@dmarchan main]$ nm build-nogfni/lib/librte_hash.so.24.1 | grep rte_thash_gfni 00000000000102c0 T rte_thash_gfni 00000000000102d0 T rte_thash_gfni_bulk 000000000000294e t rte_thash_gfni_bulk.cold 0000000000002918 t rte_thash_gfni.cold 000000000000d3c0 T rte_thash_gfni_supported > > If we always expose the symbols then as you point out we have to > conditionally link with the stub otherwise the inline (non-stub) will be > duplicate and build / link will fail. > > I guess the part I don't understand with your suggestion is how we would > conditionally link with just the stub? We have to link with rte_hash to > get the rest of hash and the stub. I've probably missed something here. No we can't, Stephen suggestion is a full solution. > > Since we never had a release exposing the new symbols introduced by > Stephen in question my suggestion was that we just revert for 24.03 so > we don't end up with an ABI break later if we choose to solve the > problem without exports. > > I don't know what else to do, but I think we need to decide for 24.03. I am fully aware that we must fix this for 24.03. I would like to be sure Stephen fix (see v3) works for you, so have a look because I am not able to reproduce an issue and validate the fix myself. --=20 David Marchand