DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Robin Jarry" <rjarry@redhat.com>
To: "Vladimir Medvedkin" <vladimir.medvedkin@intel.com>, <dev@dpdk.org>
Cc: <ruifeng.wang@arm.com>, <honnappa.nagarahalli@arm.com>
Subject: Re: [PATCH] fib: implement RCU rule reclamation
Date: Fri, 27 Sep 2024 18:12:54 -0400	[thread overview]
Message-ID: <D4HEUBAVB18M.2FUTXMQTWC3FJ@redhat.com> (raw)
In-Reply-To: <20240906170907.1325808-1-vladimir.medvedkin@intel.com>

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);
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I'm not sure what to do at this point.


  reply	other threads:[~2024-09-27 22:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-06 17:09 Vladimir Medvedkin
2024-09-27 22:12 ` Robin Jarry [this message]
2024-09-27 23:52   ` 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=D4HEUBAVB18M.2FUTXMQTWC3FJ@redhat.com \
    --to=rjarry@redhat.com \
    --cc=dev@dpdk.org \
    --cc=honnappa.nagarahalli@arm.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).