From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E877DA0540; Tue, 14 Jul 2020 16:38:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 446C21D51F; Tue, 14 Jul 2020 16:38:34 +0200 (CEST) Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by dpdk.org (Postfix) with ESMTP id CF59C1D183 for ; Tue, 14 Jul 2020 16:38:32 +0200 (CEST) Received: by mail-pl1-f193.google.com with SMTP id x8so7102564plm.10 for ; Tue, 14 Jul 2020 07:38:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QYFqdySl8J/ZaVXquB7qjjeb67XhRKAZC6T3dagpVSc=; b=Aik4qF1LHVLuPx5o4e4Yq8YW6vtt0HqnwJJKZl1bs1qNRBiGNeDt5To3BVsb8kvgfG DKDUwRmvVw3lxG5XT8rYS2t/Jr7ZRq+I+RaKTImVhv9C13Bi/djy4w0RjTiYyAS9cDSO QhEsXZBKthG+AZAB5f1cxrPna3N0iOtSgFSwiJvn0ShvZI0Ke/3ATuTSLNeIACdwx4j1 pvDKuiXzQRZ4pVGr12/0FVD9XZJ2yuifhivqxjNOQkYyduh/rUITouZIiU2sRD6i9bly 9jf6uLOGvFctgspD/zJf7XSldGCSHPxozkUiwFJ9cFl1hyj2H+x/jfah28ZFvnKA8RcV Jcsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QYFqdySl8J/ZaVXquB7qjjeb67XhRKAZC6T3dagpVSc=; b=ZqUE7BeUIY8f8MrIwfm/0qEuvi4xA3uWWZ9qhvIfwTm7D0r42zP7Sq8JdlhKYXJsXN qXdwtKvELFB6zNGzY4RYyQ9vBfBdA2hHjOKXuDecFP9XiR0Bg7AftNRTVektP5LVZcdy 0IElKbgrebAQ20TZABY+Yt6DV8Wo3cYC0kKXn/wlkJ1KrsDsJFesrt4+0Ozf5UQEqzH/ 36jTkz9tOhajgJ/dm9t3TU03qmv63UHUrL3Yq4rwZcOg+tG3QymIZ/6TT739EEccdxic q1Gxy7CqOqE2AUosrq6Gwl4u59AG+CeGVsy+O6bnTmcuYz5rZi9NxKyrqOe9EbtK1+6M HvVQ== X-Gm-Message-State: AOAM531h/fMR2kC3cGomKX+pc7jCg5t8RS5BjEMWssOaDJa9yme4Toe4 1C3cjuNwFirdVH5Po6ZniwWKfQ== X-Google-Smtp-Source: ABdhPJxYQI8xCV+bvS/kZV3cSgxX82SEQsDCiYDWsI5XBOdnqWj2NH2Nu/C1+5DATgUd/rpEear40A== X-Received: by 2002:a17:90b:70d:: with SMTP id s13mr4950898pjz.161.1594737511925; Tue, 14 Jul 2020 07:38:31 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id i67sm18491956pfg.13.2020.07.14.07.38.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 07:38:31 -0700 (PDT) Date: Tue, 14 Jul 2020 07:38:28 -0700 From: Stephen Hemminger To: "Kinsella, Ray" Cc: Vladimir Medvedkin , dev@dpdk.org, david.marchand@redhat.com, jerinj@marvell.com, thomas@monjalon.net, konstantin.ananyev@intel.com, bruce.richardson@intel.com Message-ID: <20200714073828.7cdd7355@hermes.lan> In-Reply-To: <98d800b4-41f8-751d-c1a5-5365135c225e@ashroe.eu> References: <20200713151919.1d6e88ea@hermes.lan> <98d800b4-41f8-751d-c1a5-5365135c225e@ashroe.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v6 0/8] fib: implement AVX512 vector lookup X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, 14 Jul 2020 08:31:32 +0100 "Kinsella, Ray" wrote: > On 13/07/2020 23:19, Stephen Hemminger wrote: > > On Mon, 13 Jul 2020 12:11:19 +0100 > > Vladimir Medvedkin wrote: > > > >> This patch series implements vectorized lookup using AVX512 for > >> ipv4 dir24_8 and ipv6 trie algorithms. > >> Also introduced rte_fib_set_lookup_fn() to change lookup function type. > >> Added option to select lookup function type in testfib application. > >> > >> v6: > >> - style fixes > >> > >> v5: > >> - prefix zmm macro in rte_vect.h with RTE_X86 > >> - remove unnecessary typedef for _x86_zmm_t > >> - reword commit title > >> - fix typos > >> > >> v4: > >> - use __rte_aligned() instead of using compiler attribute directly > >> - rework and add comments to meson.build > >> > >> v3: > >> - separate out the AVX-512 code into a separate file > >> > >> v2: > >> - rename rte_zmm to __rte_x86_zmm to reflect its internal usage > >> - make runtime decision to use avx512 lookup > >> > >> Vladimir Medvedkin (8): > >> eal/x86: introduce AVX 512-bit type > >> fib: make lookup function type configurable > >> fib: move lookup definition into the header file > >> fib: introduce AVX512 lookup > >> fib6: make lookup function type configurable > >> fib6: move lookup definition into the header file > >> fib6: introduce AVX512 lookup > >> app/testfib: add support for different lookup functions > >> > >> app/test-fib/main.c | 58 +++++- > >> lib/librte_eal/x86/include/rte_vect.h | 19 ++ > >> lib/librte_fib/Makefile | 24 +++ > >> lib/librte_fib/dir24_8.c | 281 +++++--------------------- > >> lib/librte_fib/dir24_8.h | 226 ++++++++++++++++++++- > >> lib/librte_fib/dir24_8_avx512.c | 165 +++++++++++++++ > >> lib/librte_fib/dir24_8_avx512.h | 24 +++ > >> lib/librte_fib/meson.build | 31 +++ > >> lib/librte_fib/rte_fib.c | 21 +- > >> lib/librte_fib/rte_fib.h | 24 +++ > >> lib/librte_fib/rte_fib6.c | 20 +- > >> lib/librte_fib/rte_fib6.h | 22 ++ > >> lib/librte_fib/rte_fib_version.map | 2 + > >> lib/librte_fib/trie.c | 161 +++------------ > >> lib/librte_fib/trie.h | 119 ++++++++++- > >> lib/librte_fib/trie_avx512.c | 269 ++++++++++++++++++++++++ > >> lib/librte_fib/trie_avx512.h | 20 ++ > >> 17 files changed, 1114 insertions(+), 372 deletions(-) > >> create mode 100644 lib/librte_fib/dir24_8_avx512.c > >> create mode 100644 lib/librte_fib/dir24_8_avx512.h > >> create mode 100644 lib/librte_fib/trie_avx512.c > >> create mode 100644 lib/librte_fib/trie_avx512.h > >> > > > > Did anyone else see the recent AVX512 discussion from Linus: > > "I hope AVX512 dies a painful death, and that Intel starts fixing real problems > > instead of trying to create magic instructions to then create benchmarks that they can look good on. > > Yup - I saw this one. > Sweeping statements like these are good to provoke debate, the truth is generally more nuanced. > If you continue to read the post, Linus appears to be mostly questioning microprocessor design decisions. > > That is an interesting discussion, however the reality is that the technology does exists and may be beneficial for Packet Processing. > > I would suggest, we continue to apply the same logic governing adoption of any technology by DPDK. > When the technology is present and a clear benefit is shown, we use it with caution. > > In the case of Vladimir's patch, > the user has to explicitly switch on the AVX512 lookup with RTE_FIB_DIR24_8_VECTOR_AVX512. > Using what is available makes sense in DPDK.