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 6E75C45A48; Sat, 28 Sep 2024 00:12:59 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0A577402EF; Sat, 28 Sep 2024 00:12:59 +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 8D0F7402DA for ; Sat, 28 Sep 2024 00:12:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727475177; 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=H/wxi68AJM0dMpy2DEBVcqNzLg3upOdmGGvmeCp/VwM=; b=L9jPpkNcSFIYl3epPPD6CR4YNJ/yIpp8qDszpCUWTv99n6KHc1wz7dQ+ol/v4uNE9VA0Z1 UNVt6wAanIDaPcEbGKQDs5z0s14alDmdzG8lEnlze3vfE0QLiFrYIbTmoRBvA9EJxEcPZz QwMMzYmYQFE3OhiyCiQYcZkzSlkuTf4= Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-385-d2O2VzITPa-ixkyIdv7TpQ-1; Fri, 27 Sep 2024 18:12:56 -0400 X-MC-Unique: d2O2VzITPa-ixkyIdv7TpQ-1 Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-4585482ca78so45873031cf.0 for ; Fri, 27 Sep 2024 15:12:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727475175; x=1728079975; h=in-reply-to:references:user-agent:subject:to:from:cc:message-id :date:content-transfer-encoding:mime-version:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=H/wxi68AJM0dMpy2DEBVcqNzLg3upOdmGGvmeCp/VwM=; b=RLdeoChCnXTjjTOZc8PBhKw5VY5FhzViWwgB8NCpcOmbH1+mIJlOPhiA4DA8SGzJ1V J6ffnaNIhVVOp62a1/X6d7qXosHCf4HMWkyRuB1sCvUQTRsJ9aAD0mKzuHTBKoYrGFYf 53TiqCS/MH85DWuAq0tPH8hb5W0J/PGwd4N71ZJx9H3TFHXWEvveyhf+H54wsep6BQz6 7MhtffSBqu3uKFKF+TgH9ZmJF0D2qsELKM7fu7vrPTD7SnTuOsSHEAERaHxLtyQgH/Kt 0vsv36ADxWQRQrKcOvzNJw3Ti1QDbWoNXLFs2P4ArH42gC00qcr2U+nZqKs1/LIIFhWI QatA== X-Forwarded-Encrypted: i=1; AJvYcCUjxxlD0cyoWQSpYttBV/bcyojhqbyOv3iUWQHYmfDOdHR3Vnkzl63al8cg2N7244D6j+Y=@dpdk.org X-Gm-Message-State: AOJu0Yxw4ffgSP67kYJm2tMep7I15vJqlFVgMQ+zlSchkcSH4jx9L0Ta z+RrCcVbC8PdCp3okQ7YeaD7DlgQiG7bXB/mooe3UxK269JgIwrrnxS2gaDl6k6w0yYoS8QyY1f fLkqt7aeKKO6ee/QbRywBtIH9+WYeK2khdrLm1qWZLiByn+iVWts= X-Received: by 2002:a05:622a:14c6:b0:458:3871:e062 with SMTP id d75a77b69052e-45c9f21f6a8mr62120841cf.34.1727475175342; Fri, 27 Sep 2024 15:12:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHT8TCybnwVynE0IVutiUNurnFZz5jan/AfI3VFcvHr/5+CJrv1u46ICWNlKajGZazj3r3mhw== X-Received: by 2002:a05:622a:14c6:b0:458:3871:e062 with SMTP id d75a77b69052e-45c9f21f6a8mr62120581cf.34.1727475175001; Fri, 27 Sep 2024 15:12:55 -0700 (PDT) Received: from localhost ([207.164.135.99]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-45c9f362e06sm11931661cf.90.2024.09.27.15.12.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 27 Sep 2024 15:12:54 -0700 (PDT) Mime-Version: 1.0 Date: Fri, 27 Sep 2024 18:12:54 -0400 Message-Id: Cc: , From: "Robin Jarry" To: "Vladimir Medvedkin" , Subject: Re: [PATCH] fib: implement RCU rule reclamation User-Agent: aerc/0.18.2-62-g3b42f3130eb7-dirty References: <20240906170907.1325808-1-vladimir.medvedkin@intel.com> In-Reply-To: <20240906170907.1325808-1-vladimir.medvedkin@intel.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8; format=Flowed 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 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 > --- > 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=20 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: N= o 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/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 = =E2=80=98dir24_8_vec_lookup_x16=E2=80=99: /usr/lib/gcc/x86_64-redhat-linux/14/include/avx512bwintrin.h:1947:1: error:= inlining failed in call to =E2=80=98always_inline=E2=80=99 =E2=80=98_mm512= _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 here 38 | ip_vec =3D _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 =E2=80=98always_inline=E2=80=99 =E2=80=98_mm512= _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 here 38 | ip_vec =3D _mm512_shuffle_epi8(ip_vec, bswap32); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ I'm not sure what to do at this point.