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 41D31A0526; Wed, 8 Jul 2020 14:23:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8B0821DB54; Wed, 8 Jul 2020 14:23:17 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id E3A951DB51 for ; Wed, 8 Jul 2020 14:23:15 +0200 (CEST) IronPort-SDR: Kex1BsyKini41vGpwm53CWZcegEzMC9KvXQC6p2QTmYulPKhKD8f3QcTGgkdmHhum4zQ6qSm1e NTkRbq+0IPEw== X-IronPort-AV: E=McAfee;i="6000,8403,9675"; a="145884266" X-IronPort-AV: E=Sophos;i="5.75,327,1589266800"; d="scan'208";a="145884266" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2020 05:23:15 -0700 IronPort-SDR: mUPE8XbiNVfT/9EOHO5HtDgSPmuob9I0eNCItf+X3VM/Fm4ibZ/wJZk/qmo5MI1Ajzj4DuodLI FOZX4FkLQb2w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,327,1589266800"; d="scan'208";a="388805422" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga001.fm.intel.com with ESMTP; 08 Jul 2020 05:23:15 -0700 Received: from fmsmsx117.amr.corp.intel.com (10.18.116.17) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 8 Jul 2020 05:23:14 -0700 Received: from FMSEDG001.ED.cps.intel.com (10.1.192.133) by fmsmsx117.amr.corp.intel.com (10.18.116.17) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 8 Jul 2020 05:23:14 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.177) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 8 Jul 2020 05:23:14 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UxIIhlnQcmB5eKL/RE2TlNL8drfUSLzu35Ik9HQ0x304Zxnc7xUVaZPwdM5mFOQoyDdTB2ADIx0iTJLVJ3CUgbUzdWf/+JjcubJhR42r4oEuBlIkaeUyWN6RJPQeXCHTFDc6qPk8exSbHqOdbXY78tUGcS3ZwIzCsAK9Y+M5xBujIjSJKgPKDJpYTakfWVUdRtqWeKTAFWakU+1FVlUaW9lq2SzINatGzUOYDSoBK3U7ae0qEuXxfQo5znd1NofM67tPxC7tzPJSYHlJR1p4+nkRqk/JaSFvHaFMEn1yy0ow0DVCbp1Tmj5Uo2iUQifYeWZDdwjPNIcc961YiiHqyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dMMzOPotB2UkYKCrEbWE9992EAfNR6NG/UybUX2XSJg=; b=meW6XhFioIGdqUOxif6ucIicBBLUOqR4m+KFYx34kTkylKP+NExYjYUhxkBKyyxLdEqJIFhXrgcDNWWFkNxx/QGKDuzd3p+eI5Pr7X5/cwWUdaAVmCToQ1aQDtec9t6SXtN3o7zfDrdBt9kQry0w+NWoRGv9YWwh38Q9EtZDKCnMyU/1HiTi7Po2qcrkXS1E+6b+n1Yuinn8/gJED/J0Q5+NE4m2mmhskFoAXx8IW1IoxpeoV5roZYEbsD1oKw7Jph+kxWnXP8B9gUmn8YjOfvpRmT131v1CfPIrHp6E5HISNUEg9q1dCQEqzAZvlZAxVOuRioGfvbZUQYlsZfcezA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dMMzOPotB2UkYKCrEbWE9992EAfNR6NG/UybUX2XSJg=; b=rBWBISC+mNLJlu1oFzUT1n7/YlW8D4wAyGPsldoZqhe8OD/Z5lv/bmtXPu54DyttbiZO1C7pY6rUcLQIiKJ8UlLpUDzr4VQy+Lr6buJRV0Wrk7gAtuBIKU8d4TBoCnldH9+BcErO7aPXE0WCnDTFogpyMdsKANQhssijLbcwUgs= Received: from BYAPR11MB3301.namprd11.prod.outlook.com (2603:10b6:a03:7f::26) by BY5PR11MB4006.namprd11.prod.outlook.com (2603:10b6:a03:188::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.20; Wed, 8 Jul 2020 12:23:12 +0000 Received: from BYAPR11MB3301.namprd11.prod.outlook.com ([fe80::f160:29ab:b8f9:4189]) by BYAPR11MB3301.namprd11.prod.outlook.com ([fe80::f160:29ab:b8f9:4189%6]) with mapi id 15.20.3153.031; Wed, 8 Jul 2020 12:23:12 +0000 From: "Ananyev, Konstantin" To: "Medvedkin, Vladimir" , "dev@dpdk.org" CC: "Richardson, Bruce" Thread-Topic: [PATCH v3 7/8] fib6: introduce AVX512 lookup Thread-Index: AQHWLdb0A2IzRxPZNE+wfI/8PpgWY6j96HGw Date: Wed, 8 Jul 2020 12:23:12 +0000 Message-ID: References: <99bcffd72d5678e58289830c43ce2bf3829d310a.1589890263.git.vladimir.medvedkin@intel.com> In-Reply-To: <99bcffd72d5678e58289830c43ce2bf3829d310a.1589890263.git.vladimir.medvedkin@intel.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.2.0.6 authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.151.187] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f6d82660-7a16-4850-0e6e-08d82339aee6 x-ms-traffictypediagnostic: BY5PR11MB4006: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6108; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: RGA6qztxo0Hi2yxvcgs7ICbZvmW0rYxORZOci1BsCutZMr3z9Dksv1wUmJ+FyCH8Y3bq8osCUvMYiUMaRpVDCryGp2tCfW3rPxMf5osx44FlZVgGzMrWp6rBf1pQjS/L3uz8MKr3yHHNbVcl9jqmKH2L0FeN+aquwjttzWz5rKOMmlthzLj3RNSyDiw1dWFl7hzkdzIhjnLaqJqzivxJB1EY/PmEB7C7du9txSw2KAZ3lX/3q5PORDxtZiWpDph5Hy8v7kW4LUDT/16qmuVcdxoKW88T3SOJkKF/zYkeKV+Fpkzt2c+rDoNmUIWsHFmpkv6LpQvOF3fPKiJzvrIptQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3301.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(396003)(366004)(346002)(376002)(136003)(39860400002)(316002)(55016002)(9686003)(66556008)(64756008)(26005)(66446008)(66476007)(6506007)(110136005)(66946007)(478600001)(2906002)(107886003)(8936002)(76116006)(86362001)(8676002)(7696005)(186003)(33656002)(71200400001)(83380400001)(52536014)(5660300002)(4326008); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: 7c1LAuUAy2jQVJQ99B5CotpRV3JUbmNAL6Hv/WsMCt46dTPNngIaGFutsngWAwiBnPsJPhl3LvanHC3iMA+RrV3PyaWbR2VvSB1mKb8pwnxKG3hUYEezvI2qGpxy1LQl1M1t5Obs9FCNz20+pdZLnyLd5IoRgWbxREqGbn1HIVbG72jGBAojZjAbW3BbftaoJHveOuiIESvTm2r+brfvshFI35KCXNjF2/tQ+yQAkFzjpShy6LkYMbGws/TX0FJhZFtaYHntqxKERZJdRZF5mS0n0TmOLdLwn9g3FXREKBA0t/+tZMDrhFbNV2ZQB+FHWjZpYTfDn2FX5nC2dcHmcQSDDhV4NJm6P2eRAo6/QzA1e5DJeLXwJ932U4ZugnjuGP2fRbnKSPOIaC2wygC7mnrObNmwa/Ny3N5mrJDHCzYS2vU2pr9ZWSfWs+vs2MMbFZAWzDjjmIjD4VwEP6c0nOJaghtF3BHOTIj1whRe2dUUydvR0Eqc97WtRHybH3H/ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3301.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f6d82660-7a16-4850-0e6e-08d82339aee6 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Jul 2020 12:23:12.5506 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: hr9LptPSHC7g2vNtFEiPYAzBxzxsC+edH1KuA+WZfbKauguab1b9OZtog64aw4pOtoGjGfW0pPIsK05v625X8KTNXQcltAkMUoIMNThl+ZY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4006 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 7/8] fib6: introduce AVX512 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" >=20 > Add new lookup implementation for FIB6 trie algorithm using > AVX512 instruction set >=20 > Signed-off-by: Vladimir Medvedkin > --- > lib/librte_fib/Makefile | 10 ++ > lib/librte_fib/meson.build | 9 ++ > lib/librte_fib/rte_fib6.h | 3 +- > lib/librte_fib/trie.c | 21 ++++ > lib/librte_fib/trie_avx512.c | 269 +++++++++++++++++++++++++++++++++++++= ++++++ > lib/librte_fib/trie_avx512.h | 20 ++++ > 6 files changed, 331 insertions(+), 1 deletion(-) > create mode 100644 lib/librte_fib/trie_avx512.c > create mode 100644 lib/librte_fib/trie_avx512.h >=20 > diff --git a/lib/librte_fib/Makefile b/lib/librte_fib/Makefile > index 3958da1..761c7c8 100644 > --- a/lib/librte_fib/Makefile > +++ b/lib/librte_fib/Makefile > @@ -25,12 +25,22 @@ grep -q __AVX512F__ && echo 1) > CC_AVX512DQ_SUPPORT=3D$(shell $(CC) -mavx512dq -dM -E - &1 = | \ > grep -q __AVX512DQ__ && echo 1) >=20 > +CC_AVX512BW_SUPPORT=3D$(shell $(CC) -mavx512bw -dM -E - &1 = | \ > +grep -q __AVX512BW__ && echo 1) > + > ifeq ($(CC_AVX512F_SUPPORT), 1) > ifeq ($(CC_AVX512DQ_SUPPORT), 1) > SRCS-$(CONFIG_RTE_LIBRTE_FIB) +=3D dir24_8_avx512.c > CFLAGS_dir24_8_avx512.o +=3D -mavx512f > CFLAGS_dir24_8_avx512.o +=3D -mavx512dq > CFLAGS_dir24_8.o +=3D -DCC_DIR24_8_AVX512_SUPPORT > + ifeq ($(CC_AVX512BW_SUPPORT), 1) > + SRCS-$(CONFIG_RTE_LIBRTE_FIB) +=3D trie_avx512.c > + CFLAGS_trie_avx512.o +=3D -mavx512f > + CFLAGS_trie_avx512.o +=3D -mavx512dq > + CFLAGS_trie_avx512.o +=3D -mavx512bw > + CFLAGS_trie.o +=3D -DCC_TRIE_AVX512_SUPPORT > + endif > endif > endif > include $(RTE_SDK)/mk/rte.lib.mk > diff --git a/lib/librte_fib/meson.build b/lib/librte_fib/meson.build > index 0963f3c..98adf11 100644 > --- a/lib/librte_fib/meson.build > +++ b/lib/librte_fib/meson.build > @@ -14,5 +14,14 @@ if dpdk_conf.has('RTE_ARCH_X86') and cc.has_argument('= -mavx512f') > c_args: cflags + ['-mavx512f'] + ['-mavx512dq']) > objs +=3D dir24_8_avx512_tmp.extract_objects('dir24_8_avx512.c') > cflags +=3D '-DCC_DIR24_8_AVX512_SUPPORT' > + if cc.has_argument('-mavx512bw') > + trie_avx512_tmp =3D static_library('trie_avx512_tmp', > + 'trie_avx512.c', > + dependencies: static_rte_eal, > + c_args: cflags + ['-mavx512f'] + \ > + ['-mavx512dq'] + ['-mavx512bw']) > + objs +=3D trie_avx512_tmp.extract_objects('trie_avx512.c') > + cflags +=3D '-DCC_TRIE_AVX512_SUPPORT' > + endif > endif > endif > diff --git a/lib/librte_fib/rte_fib6.h b/lib/librte_fib/rte_fib6.h > index b70369a..c55efdf 100644 > --- a/lib/librte_fib/rte_fib6.h > +++ b/lib/librte_fib/rte_fib6.h > @@ -53,7 +53,8 @@ enum rte_fib_trie_nh_sz { > }; >=20 > enum rte_fib_trie_lookup_type { > - RTE_FIB6_TRIE_SCALAR > + RTE_FIB6_TRIE_SCALAR, > + RTE_FIB6_TRIE_VECTOR As a nit - does this enum needs to be public? If it does, then probably worth to name it VECTOR_AVX512, in case someone in future will want to add another vector implementation. Probably same thought for v4. Apart from that - LGTM. Acked-by: Konstantin Ananyev =20