DPDK patches and discussions
 help / color / mirror / Atom feed
From: Vladimir Medvedkin <medvedkinv@gmail.com>
To: David Marchand <david.marchand@redhat.com>
Cc: Robin Jarry <rjarry@redhat.com>,
	Vladimir Medvedkin <vladimir.medvedkin@intel.com>,
	dev@dpdk.org,  ruifeng.wang@arm.com,
	honnappa.nagarahalli@arm.com
Subject: Re: [PATCH] fib: implement RCU rule reclamation
Date: Fri, 4 Oct 2024 13:03:01 +0100	[thread overview]
Message-ID: <CANDrEHnj1Au0sOXjTtFCGnOcTaz1z-hV_mExz322OHbag6dwYA@mail.gmail.com> (raw)
In-Reply-To: <CAJFAV8wZXZZnJGTYcR7fT3SOJn_HxZcmqzKhG08i3AVsYzERmQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3791 bytes --]

Hi David, Robin,

Thanks, I'll send v2 with the fix.

сб, 28 сент. 2024 г. в 00:59, David Marchand <david.marchand@redhat.com>:

> On Fri, Sep 27, 2024 at 6:13 PM Robin Jarry <rjarry@redhat.com> wrote:
> >
> > Vladimir Medvedkin, Sep 06, 2024 at 13:09:
> > > Currently, for DIR24-8 algorithm, the tbl8 group is freed even though
> the
> > > readers might be using the tbl8 group entries. The freed tbl8 group can
> > > be reallocated quickly. As a result, lookup may be performed
> incorrectly.
> > >
> > > To address that, RCU QSBR is integrated for safe tbl8 group
> reclamation.
> > >
> > > Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
> > > ---
> >
> > > 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 = files('rte_fib.c', 'rte_fib6.c', 'dir24_8.c', 'trie.c')
> > >  headers = files('rte_fib.h', 'rte_fib6.h')
> > >  deps += ['rib']
> > > +deps += ['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 <rte_rcu_qsbr.h>
> >       |          ^~~~~~~~~~~~~~~~
> >
> > 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 = 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 += dir24_8_avx512_tmp.extract_objects('dir24_8_avx512.c')
> >          cflags += ['-DCC_DIR24_8_AVX512_SUPPORT']
> >
> > I get another error:
> >
> > In file included from
> /usr/lib/gcc/x86_64-redhat-linux/14/include/immintrin.h:65,
> >                  from
> /usr/lib/gcc/x86_64-redhat-linux/14/include/x86intrin.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 ‘dir24_8_vec_lookup_x16’:
> > /usr/lib/gcc/x86_64-redhat-linux/14/include/avx512bwintrin.h:1947:1:
> error: inlining failed in call to ‘always_inline’ ‘_mm512_shuffle_epi8’:
> 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
> here
> >    38 |                 ip_vec = _mm512_shuffle_epi8(ip_vec, bswap32);
> >       |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > /usr/lib/gcc/x86_64-redhat-linux/14/include/avx512bwintrin.h:1947:1:
> error: inlining failed in call to ‘always_inline’ ‘_mm512_shuffle_epi8’:
> 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
> here
> >    38 |                 ip_vec = _mm512_shuffle_epi8(ip_vec, bswap32);
> >       |                          ^~~~~~~~~
>
> The latter issue is because you had applied the endianness change.
> I replied in the other thread.
>
>
> --
> David Marchand
>
>

-- 
Regards,
Vladimir

[-- Attachment #2: Type: text/html, Size: 5079 bytes --]

  reply	other threads:[~2024-10-04 12:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-06 17:09 Vladimir Medvedkin
2024-09-27 22:12 ` Robin Jarry
2024-09-27 23:52   ` David Marchand
2024-10-04 12:03     ` Vladimir Medvedkin [this message]
2024-10-08 17:55 ` [PATCH v2 1/2] " Vladimir Medvedkin
2024-10-08 17:55   ` [PATCH v2 2/2] test/fib: add RCU functional tests Vladimir Medvedkin
2024-10-08 18:18   ` [PATCH v2 1/2] fib: implement RCU rule reclamation Stephen Hemminger
2024-10-09 19:12     ` Doug Foster
2024-10-08 18:28   ` Stephen Hemminger
2024-10-10 11:21     ` Medvedkin, Vladimir
2024-10-10 11:27   ` [PATCH v3 " Vladimir Medvedkin
2024-10-10 11:27     ` [PATCH v3 2/2] test/fib: add RCU functional tests Vladimir Medvedkin
2024-10-11  9:10     ` [PATCH v3 1/2] fib: implement RCU rule reclamation David Marchand
2024-10-14 16:58     ` David Marchand
2024-10-14 17:10     ` David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CANDrEHnj1Au0sOXjTtFCGnOcTaz1z-hV_mExz322OHbag6dwYA@mail.gmail.com \
    --to=medvedkinv@gmail.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=honnappa.nagarahalli@arm.com \
    --cc=rjarry@redhat.com \
    --cc=ruifeng.wang@arm.com \
    --cc=vladimir.medvedkin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).