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 8017AA00C5 for ; Wed, 3 Aug 2022 12:12:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6DC5F40A7E; Wed, 3 Aug 2022 12:12:04 +0200 (CEST) Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by mails.dpdk.org (Postfix) with ESMTP id 1B5F240141 for ; Wed, 3 Aug 2022 12:12:03 +0200 (CEST) Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 3328E3F128 for ; Wed, 3 Aug 2022 10:12:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1659521522; bh=pgi3XTokGTlLz0KOS1tP6DJ/hIPCYruYE1n8MPcbUAI=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=H3t26PyfnbRMlURB/SdVG+II+cNKldjOH7nr3YuSUlzsh50LaUmkCKcMUexWv4Hzu vr9zt3IzdkpnNKQYTN5crieqMfnL3By9o8lHTn14S4UWQN5pXXjSN8psC+5APMRLq5 x8Q6D6UBi88+7LPsl67a4hTm5FQzmD/P2ZRru4EIHTaNbx8gBP3OQLEg0IR8o//RgL bnDUm84VgbV4qvCkNNYjIfqX//t/yEfesG9mb7PwnfxeRgGH4XYeKOJJJ3GcNGD3Dz pWPY4C4d8q3orxgWiOzO54oZi/YXvzdq374ez6AyaOEZpilTsRUJDYBqtN7ouheP0Q TJLvsltdyeZFg== Received: by mail-lj1-f197.google.com with SMTP id by17-20020a05651c1a1100b0025e54bda6c7so2246159ljb.22 for ; Wed, 03 Aug 2022 03:12:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=pgi3XTokGTlLz0KOS1tP6DJ/hIPCYruYE1n8MPcbUAI=; b=mgjV589I8w5zl/J1TNoAwJkhHaa4N/XZHIP62EKbl8Cxjp/PtV5pwCm26a9xbGHq1H 1SVwTCQYXo8dwNUVpvLseNfzxHRvPUYYGxZDuDRBIr8IvxA2lhZqEmYVXeHNBG154CSb s8thHjoOBuGuWLNyKZ5KgvpmPRY4dCGAFUYPlHXPVKixhopFV2nVespP8aceixuF007e CMK//o0XnftlXPym92z9y2HCUoPBaJCiLe8q/6F+OFUzGtWYIdUWhcAm5W0W+xl4CzSI tUuh+IloJ1APMs2A2vnOkAJNHBeqV1ewPKdGaGb1CxO8pg0YoTDo+mxdrX/kFj4t/328 dfbA== X-Gm-Message-State: AJIora/G7/qb9GHxciImC+M/bcIgLbD55XdjbfJP/6f3z7828vMywHlD DuprzURe8VG79iOUMXKcru1AIPnncUDM0wwgWZLoJO79CbyWZ7113bsP8RfhxuevoLr+qDyE7AF zhv1cFWcbwXu8kSKEhJAYMzT5I5GQcOhQlnpOAxzf X-Received: by 2002:a05:651c:2c1:b0:25d:79be:766a with SMTP id f1-20020a05651c02c100b0025d79be766amr7616108ljo.225.1659521521642; Wed, 03 Aug 2022 03:12:01 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tFrfmWzM4E0M8lrHGCTrYgrMvlSeGy7XK5sJ26cOIGYSZizu9xlQ1SVVvMVhvWuE7NdsuZD6Dchd4pQUspio4= X-Received: by 2002:a05:651c:2c1:b0:25d:79be:766a with SMTP id f1-20020a05651c02c100b0025d79be766amr7616101ljo.225.1659521521404; Wed, 03 Aug 2022 03:12:01 -0700 (PDT) MIME-Version: 1.0 References: <20220728113750.11392-1-bruce.richardson@intel.com> In-Reply-To: <20220728113750.11392-1-bruce.richardson@intel.com> From: Christian Ehrhardt Date: Wed, 3 Aug 2022 12:11:35 +0200 Message-ID: Subject: Re: [PATCH 19.11] eal/freebsd: fix use of newer cpuset macros To: Bruce Richardson Cc: stable@dpdk.org, YuX.Jiang@intel.com, David Marchand Content-Type: text/plain; charset="UTF-8" X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On Thu, Jul 28, 2022 at 1:38 PM Bruce Richardson wrote: > > FreeBSD has updated its CPU macros to align more with the definitions > used on Linux[1]. Unfortunately, while this makes compatibility better > in future, it means we need to have both legacy and newer definition > support. Use a meson check to determine which set of macros are used. > > [1] https://cgit.freebsd.org/src/commit/?id=e2650af157bc Thank you for the ongoing help keeping the old releases buildable. This is queued now, it depends if we will have a -rc2 if it will be in 19.11.13 or 19.11.14. > Bugzilla ID: 1014 > Fixes: c3568ea37670 ("eal: restrict control threads to startup CPU affinity") > Fixes: b6be16acfeb1 ("eal: fix control thread affinity with --lcores") > > Signed-off-by: David Marchand > Signed-off-by: Bruce Richardson > --- > This is a backport of commit 2f51bc9c27a4f1da674d66499667155663dcc419 > for 19.11 release tree > --- > lib/librte_eal/freebsd/eal/include/rte_os.h | 16 +++++++++++++++- > lib/librte_eal/freebsd/eal/meson.build | 11 +++++++++++ > 2 files changed, 26 insertions(+), 1 deletion(-) > > diff --git a/lib/librte_eal/freebsd/eal/include/rte_os.h b/lib/librte_eal/freebsd/eal/include/rte_os.h > index 78ee6fd8f4..908c37e9aa 100644 > --- a/lib/librte_eal/freebsd/eal/include/rte_os.h > +++ b/lib/librte_eal/freebsd/eal/include/rte_os.h > @@ -17,6 +17,7 @@ extern "C" { > #include > > typedef cpuset_t rte_cpuset_t; > +#ifdef RTE_EAL_FREEBSD_CPUSET_LEGACY > #define RTE_CPU_AND(dst, src1, src2) do \ > { \ > cpuset_t tmp; \ > @@ -50,7 +51,20 @@ typedef cpuset_t rte_cpuset_t; > CPU_ANDNOT(&tmp, src); \ > CPU_COPY(&tmp, dst); \ > } while (0) > -#endif > +#endif /* CPU_NAND */ > + > +#else /* RTE_EAL_FREEBSD_CPUSET_LEGACY */ > + > +#define RTE_CPU_AND CPU_AND > +#define RTE_CPU_OR CPU_OR > +#define RTE_CPU_FILL CPU_FILL > +#define RTE_CPU_NOT(dst, src) do { \ > + cpu_set_t tmp; \ > + CPU_FILL(&tmp); \ > + CPU_XOR(dst, src, &tmp); \ > +} while (0) > + > +#endif /* RTE_EAL_FREEBSD_CPUSET_LEGACY */ > > #ifdef __cplusplus > } > diff --git a/lib/librte_eal/freebsd/eal/meson.build b/lib/librte_eal/freebsd/eal/meson.build > index 1426f7e5f1..deb367f44c 100644 > --- a/lib/librte_eal/freebsd/eal/meson.build > +++ b/lib/librte_eal/freebsd/eal/meson.build > @@ -20,3 +20,14 @@ env_sources = files('eal_alarm.c', > ) > > deps += ['kvargs'] > + > +# test for version of cpuset macros > +cpuset_test_code = ''' > + #include > + #include > + void cpu_test_or(cpuset_t *s) { CPU_OR(s, s, s); } > +''' > + > +if not cc.compiles(cpuset_test_code, name: 'Detect argument count for CPU_OR') > + dpdk_conf.set('RTE_EAL_FREEBSD_CPUSET_LEGACY', 1) > +endif > -- > 2.37.1 > -- Christian Ehrhardt Senior Staff Engineer, Ubuntu Server Canonical Ltd