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 DB3AD459FA; Sat, 28 Sep 2024 01:52:45 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BDEF7402C8; Sat, 28 Sep 2024 01:52:45 +0200 (CEST) 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 E9AF1402AE for ; Sat, 28 Sep 2024 01:52:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727481164; 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=6om95unrQR7msMkb6NkEMTiBxE61urJaZvBy84FoiaY=; b=IOQj28Ke+jrgfr7p9g5RcXCKlxp58ij7a31AJqeC/8ZwwOWJMsFBb6UxedPX3BvZ905eC6 9c1yReAG21mTyPXY/8nTvlKQXvWJ65IBRnWeDyXAoFsMGY357AYZ+TPewA5GWHZo4HSgQH QUiye52Ia80DWQLxNJx3lvxk+MBGBTg= 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-627-KmqTPuxWPK2Em2IzuFY1KA-1; Fri, 27 Sep 2024 19:52:43 -0400 X-MC-Unique: KmqTPuxWPK2Em2IzuFY1KA-1 Received: by mail-lf1-f70.google.com with SMTP id 2adb3069b0e04-5398dde92f4so16400e87.3 for ; Fri, 27 Sep 2024 16:52:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727481162; x=1728085962; 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=6om95unrQR7msMkb6NkEMTiBxE61urJaZvBy84FoiaY=; b=M+pdRbphW4nKOBKdm1IngUrWPSXCS7dfNkaBb6NDnHmVPwqNFV8+q4T20o5R72c+1i P2KZPaZMtP8S0AWy9EfI8/HDFh+Lq/frggQMUKJMOV5ELpdnnuNrwssfAC6FIv8KJm5W uf3CTisxdZBvfiQaaA722LX4LBvD1phJCazh9I9Aio0/bSOlo+qHABx4SfmYV7epo/sV lfIo0fw98OmW9TuQHzzIPIebAvo8Fs1xl+Nf1DF0Y8oaWptmtyIRXmWuBZ/63/Uv5xUH KVcvp/5tq7HHoa9/6u7Mc1QpIncfNYu2qUOcl0lxNl5RZgZSO7n/MiVszyBWZ2/xwpQo XRYQ== X-Gm-Message-State: AOJu0YxAWZ9E8e3HY7eE43rHoWuUfFEwxQbhu187KsUSKsEK+w35kpzQ 16iIjBO4LyphQPgO2oKDIV+6Zo6gihFH8rStuEY15Xsmi+wh2UGIhESmLEA27OasepPWA1W2RqZ 0VXrw+r9F8smtjsf8eJaVCXJTKSev2xkMXB5Y7FmJsl17wvG9JnBSkfUTgyr3SDSKZ58TYa335D lXlrhnmaOi59BQ1tY= X-Received: by 2002:ac2:4c56:0:b0:535:6992:f2cb with SMTP id 2adb3069b0e04-5389fc76fd7mr3462757e87.42.1727481161601; Fri, 27 Sep 2024 16:52:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFFQc7FC8XOD0uuZyTFym9c7VlzzEpY/8hpH22YUp2fqat5RPNnWoaDqgFYrdXB72Be5XGCM79wt0ihDQBp6VA= X-Received: by 2002:ac2:4c56:0:b0:535:6992:f2cb with SMTP id 2adb3069b0e04-5389fc76fd7mr3462750e87.42.1727481161178; Fri, 27 Sep 2024 16:52:41 -0700 (PDT) MIME-Version: 1.0 References: <20240906170907.1325808-1-vladimir.medvedkin@intel.com> In-Reply-To: From: David Marchand Date: Fri, 27 Sep 2024 19:52:29 -0400 Message-ID: Subject: Re: [PATCH] fib: implement RCU rule reclamation To: Robin Jarry , Vladimir Medvedkin Cc: dev@dpdk.org, ruifeng.wang@arm.com, honnappa.nagarahalli@arm.com 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 Fri, Sep 27, 2024 at 6:13=E2=80=AFPM Robin Jarry wro= te: > > Vladimir Medvedkin, Sep 06, 2024 at 13:09: > > Currently, for DIR24-8 algorithm, the tbl8 group is freed even though t= he > > readers might be using the tbl8 group entries. The freed tbl8 group can > > be reallocated quickly. As a result, lookup may be performed incorrectl= y. > > > > To address that, RCU QSBR is integrated for safe tbl8 group reclamation= . > > > > Signed-off-by: Vladimir Medvedkin > > --- > > > diff --git a/lib/fib/meson.build b/lib/fib/meson.build > > index 6795f41a0a..1895f37050 100644 > > --- a/lib/fib/meson.build > > +++ b/lib/fib/meson.build > > @@ -11,6 +11,7 @@ endif > > sources =3D files('rte_fib.c', 'rte_fib6.c', 'dir24_8.c', 'trie.c') > > headers =3D files('rte_fib.h', 'rte_fib6.h') > > deps +=3D ['rib'] > > +deps +=3D ['rcu'] > > Hi Vladimir, > > thanks a lot for working on this! > > I tested with static linking and there is a missing dependency to > static_rte_rcu: > > In file included from ../subprojects/dpdk/lib/fib/dir24_8_avx512.c:6: > ../subprojects/dpdk/lib/fib/rte_fib.h:19:10: fatal error: rte_rcu_qsbr.h:= No such file or directory > 19 | #include > | ^~~~~~~~~~~~~~~~ > > After adding it: > > @@ -45,7 +45,7 @@ if dpdk_conf.has('RTE_ARCH_X86_64') and binutils_ok > elif cc.has_multi_arguments('-mavx512f', '-mavx512dq') > dir24_8_avx512_tmp =3D static_library('dir24_8_avx512_tmp', > 'dir24_8_avx512.c', > - dependencies: static_rte_eal, > + dependencies: [static_rte_eal, static_rte_rcu], > c_args: cflags + ['-mavx512f', '-mavx512dq']) > objs +=3D dir24_8_avx512_tmp.extract_objects('dir24_8_avx512.c') > cflags +=3D ['-DCC_DIR24_8_AVX512_SUPPORT'] > > I get another error: > > In file included from /usr/lib/gcc/x86_64-redhat-linux/14/include/immintr= in.h:65, > from /usr/lib/gcc/x86_64-redhat-linux/14/include/x86intr= in.h:32, > from ../subprojects/dpdk/lib/eal/x86/include/rte_vect.h:= 26, > from ../subprojects/dpdk/lib/fib/dir24_8_avx512.c:5: > /usr/lib/gcc/x86_64-redhat-linux/14/include/avx512bwintrin.h: In function= =E2=80=98dir24_8_vec_lookup_x16=E2=80=99: > /usr/lib/gcc/x86_64-redhat-linux/14/include/avx512bwintrin.h:1947:1: erro= r: inlining failed in call to =E2=80=98always_inline=E2=80=99 =E2=80=98_mm5= 12_shuffle_epi8=E2=80=99: target specific option mismatch > 1947 | _mm512_shuffle_epi8 (__m512i __A, __m512i __B) > | ^~~~~~~~~~~~~~~~~~~ > ../subprojects/dpdk/lib/fib/dir24_8_avx512.c:38:26: note: called from her= e > 38 | ip_vec =3D _mm512_shuffle_epi8(ip_vec, bswap32); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > /usr/lib/gcc/x86_64-redhat-linux/14/include/avx512bwintrin.h:1947:1: erro= r: inlining failed in call to =E2=80=98always_inline=E2=80=99 =E2=80=98_mm5= 12_shuffle_epi8=E2=80=99: target specific option mismatch > 1947 | _mm512_shuffle_epi8 (__m512i __A, __m512i __B) > | ^~~~~~~~~~~~~~~~~~~ > ../subprojects/dpdk/lib/fib/dir24_8_avx512.c:38:26: note: called from her= e > 38 | ip_vec =3D _mm512_shuffle_epi8(ip_vec, bswap32); > | ^~~~~~~~~ The latter issue is because you had applied the endianness change. I replied in the other thread. --=20 David Marchand