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 9DA79A0C4C for ; Mon, 12 Jul 2021 15:13:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 97DF840685; Mon, 12 Jul 2021 15:13:59 +0200 (CEST) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by mails.dpdk.org (Postfix) with ESMTP id 10DDE406B4 for ; Mon, 12 Jul 2021 15:13:58 +0200 (CEST) Received: by mail-wm1-f46.google.com with SMTP id h18-20020a05600c3512b029020e4ceb9588so14447486wmq.5 for ; Mon, 12 Jul 2021 06:13:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kRc5D0BXQmtf+fy7IwhOvHPX5iTbirtFBJI31DUguXY=; b=cXpNilWXnatdU5tuwR01zh4hxrsAPARmYL8CEhhgcly3hM04ccmF6eg6UBrGZb919o TplbPx/tugbIokgN8qVvl/Evay3n8DFp+k17zUMq/xLPYi1i6dT6ANH6TIJXV9bAln8h wJxVm7IA2meQBJ6dIA0MF6DJl4aeu5qL7jT4FVB/z+gZTpqiJ9xW5C2Z5NJ1agE0jpSm WPIYtW49IoakXyOJzvc0vhpDl9f2h2JoVbWS6CPs8/chId42c3QEPuFYPlWizNhm1M7B UZQfAskRYgT3fxDXeVqGDk1Nfz/NL+g+DcK7oLyajJe5qfuRetj7J8bawgoW1N13D1eW 6x1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kRc5D0BXQmtf+fy7IwhOvHPX5iTbirtFBJI31DUguXY=; b=Xx4o/B60+ztQT9HYmcKVZiafFnl+/ytpkBHdzFgiDe3W8DaK+0S4wVKy+eLtiYim1z T7mAxG2+0M65QQMvH4uHifl93pMP9iKthNTqG9Ic8jygTSnGaRm9rD2/fPveAbCrglHl X7AHnTTFS98m9nbma1An16moKmUWREfnFrzD7Ql4l/m4WDjyol8kemswQHO4Mg6YvCjV K0V8bh4QDVCvH212Cg4Mivoo83o0Y62sw9Y9d1LjPWiip/qw5m8unkU0hr+0WTUdkHgJ NzuDdTeNkHsE1gBCsgFLItdXETDfC8LNL1uDT6EprGTaLDvaY4575ZJvT2TptQ7ld9YJ D/5w== X-Gm-Message-State: AOAM531GdDXSFT+mMo6atozC8z3de+YAWwNL5u+J/Y1AtNpGFkRBev/b WXYq3WUzLe/trFgiBTwGLfM= X-Google-Smtp-Source: ABdhPJyVsAE5aRjHtKjHHWlUHl/F/i2tCU1Djor6qhK3KkhH9KSCW+uVaXxf3zRA1WkjIfdGB1Mi0g== X-Received: by 2002:a05:600c:214a:: with SMTP id v10mr13801632wml.17.1626095637898; Mon, 12 Jul 2021 06:13:57 -0700 (PDT) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id z13sm14805297wro.79.2021.07.12.06.13.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jul 2021 06:13:57 -0700 (PDT) From: luca.boccassi@gmail.com To: Kai Ji Cc: Fan Zhang , dpdk stable Date: Mon, 12 Jul 2021 14:05:10 +0100 Message-Id: <20210712130551.2462159-75-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210712130551.2462159-1-luca.boccassi@gmail.com> References: <20210712130551.2462159-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'crypto/aesni_gcm: fix performance on some AVX512 CPUs' has been queued to stable release 20.11.3 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/14/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/636a31ebdd5f0e9ec7490c7da625733d121f95c9 Thanks. Luca Boccassi --- >From 636a31ebdd5f0e9ec7490c7da625733d121f95c9 Mon Sep 17 00:00:00 2001 From: Kai Ji Date: Tue, 29 Jun 2021 16:19:07 +0100 Subject: [PATCH] crypto/aesni_gcm: fix performance on some AVX512 CPUs [ upstream commit 93d5bdb5e39a46dad5d87e2317cc59a483cdc3a3 ] This patch fixes the aesni_gcm performance issue on systems with AVX512 CPU flag presented but with VAES CPU flag missing, such as Skylake. Fixes: 81fe96a0cece ("crypto/aesni_gcm: use architecture independent API") Signed-off-by: Kai Ji Acked-by: Fan Zhang --- drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c index 0de51202a6..cc4e08512b 100644 --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c @@ -842,8 +842,14 @@ aesni_gcm_create(const char *name, init_mb_mgr_avx2(mb_mgr); break; case RTE_AESNI_GCM_AVX512: - dev->feature_flags |= RTE_CRYPTODEV_FF_CPU_AVX512; - init_mb_mgr_avx512(mb_mgr); + if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_VAES)) { + dev->feature_flags |= RTE_CRYPTODEV_FF_CPU_AVX512; + init_mb_mgr_avx512(mb_mgr); + } else { + dev->feature_flags |= RTE_CRYPTODEV_FF_CPU_AVX2; + init_mb_mgr_avx2(mb_mgr); + vector_mode = RTE_AESNI_GCM_AVX2; + } break; default: AESNI_GCM_LOG(ERR, "Unsupported vector mode %u\n", vector_mode); -- 2.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-07-12 13:41:40.558669133 +0100 +++ 0075-crypto-aesni_gcm-fix-performance-on-some-AVX512-CPUs.patch 2021-07-12 13:41:36.650125944 +0100 @@ -1 +1 @@ -From 93d5bdb5e39a46dad5d87e2317cc59a483cdc3a3 Mon Sep 17 00:00:00 2001 +From 636a31ebdd5f0e9ec7490c7da625733d121f95c9 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 93d5bdb5e39a46dad5d87e2317cc59a483cdc3a3 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index bc87e44a9d..886e2a5aaa 100644 +index 0de51202a6..cc4e08512b 100644