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 41D33A034F for ; Tue, 1 Mar 2022 11:44:11 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3BEA6426DD; Tue, 1 Mar 2022 11:44:11 +0100 (CET) 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 5E5DB426DD for ; Tue, 1 Mar 2022 11:44:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646131447; 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=c7CFaavHuZG1ePpAvEkyCdnPOIBZs3tEfsBNioBnF9s=; b=dtUSb9SNFVJzooxb3h0Ef1S78GqtcxLu2nrgD8ish4HZdCyzsVfuuhVDJJDi8LYQ3m09pX c+u3qHkbeiG7pzG2IdgAZnRXi2QeSO72ZQkIZBHJQZS4Rzd3ksFkpnmZDoduZ3NU6YVr9c 3UqjC83T3DaaRCCq+Nv6G1FdDV//KOk= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-335-oaS6GCONP-GAwXJOS8_Z7Q-1; Tue, 01 Mar 2022 05:44:05 -0500 X-MC-Unique: oaS6GCONP-GAwXJOS8_Z7Q-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5B08B100C609; Tue, 1 Mar 2022 10:44:04 +0000 (UTC) Received: from rh.Home (unknown [10.39.194.142]) by smtp.corp.redhat.com (Postfix) with ESMTP id 807256FB02; Tue, 1 Mar 2022 10:44:03 +0000 (UTC) From: Kevin Traynor To: Pablo de Lara Cc: dpdk stable Subject: patch 'crypto/ipsec_mb: fix ZUC operation overwrite' has been queued to stable release 21.11.1 Date: Tue, 1 Mar 2022 10:41:50 +0000 Message-Id: <20220301104300.334382-34-ktraynor@redhat.com> In-Reply-To: <20220301104300.334382-1-ktraynor@redhat.com> References: <20220301104300.334382-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" 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 Hi, FYI, your patch has been queued to stable release 21.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/06/22. 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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/cfa7703c8e58d2610c8ff87f0247e20cfe03597e Thanks. Kevin --- >From cfa7703c8e58d2610c8ff87f0247e20cfe03597e Mon Sep 17 00:00:00 2001 From: Pablo de Lara Date: Wed, 23 Feb 2022 16:01:15 +0000 Subject: [PATCH] crypto/ipsec_mb: fix ZUC operation overwrite [ upstream commit 96d0dc2a3cd21d6f392347ae1d2ff3c21e27231a ] ZUC PMD batches crypto operations depending on their type (encryption + tag generation, tag verification + decryption, etc), to allow parallelization. The array used to store the pointers to these operations was always the same array provided by dequeue_burst() function, and it was looping around the same positions (from 0 to ZUC_MAX_BURST - 1). A new internal array is used to avoid overwriting the pointers of the array provided by dequeue_burst() function. Fixes: cf7685d68f00 ("crypto/zuc: add driver for ZUC library") Signed-off-by: Pablo de Lara --- drivers/crypto/ipsec_mb/pmd_zuc.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/ipsec_mb/pmd_zuc.c b/drivers/crypto/ipsec_mb/pmd_zuc.c index 07cf1462d2..e36c7092d6 100644 --- a/drivers/crypto/ipsec_mb/pmd_zuc.c +++ b/drivers/crypto/ipsec_mb/pmd_zuc.c @@ -260,4 +260,5 @@ zuc_pmd_dequeue_burst(void *queue_pair, struct zuc_session *curr_sess; struct zuc_session *sessions[ZUC_MAX_BURST]; + struct rte_crypto_op *int_c_ops[ZUC_MAX_BURST]; enum ipsec_mb_operation prev_zuc_op = IPSEC_MB_OP_NOT_SUPPORTED; enum ipsec_mb_operation curr_zuc_op; @@ -291,9 +292,9 @@ zuc_pmd_dequeue_burst(void *queue_pair, if (burst_size == 0) { prev_zuc_op = curr_zuc_op; - c_ops[0] = curr_c_op; + int_c_ops[0] = curr_c_op; sessions[0] = curr_sess; burst_size++; } else if (curr_zuc_op == prev_zuc_op) { - c_ops[burst_size] = curr_c_op; + int_c_ops[burst_size] = curr_c_op; sessions[burst_size] = curr_sess; burst_size++; @@ -303,5 +304,5 @@ zuc_pmd_dequeue_burst(void *queue_pair, */ if (burst_size == ZUC_MAX_BURST) { - processed_ops = process_ops(c_ops, curr_zuc_op, + processed_ops = process_ops(int_c_ops, curr_zuc_op, sessions, qp, burst_size); if (processed_ops < burst_size) { @@ -317,5 +318,5 @@ zuc_pmd_dequeue_burst(void *queue_pair, * of the previous type. */ - processed_ops = process_ops(c_ops, prev_zuc_op, + processed_ops = process_ops(int_c_ops, prev_zuc_op, sessions, qp, burst_size); if (processed_ops < burst_size) { @@ -327,5 +328,5 @@ zuc_pmd_dequeue_burst(void *queue_pair, prev_zuc_op = curr_zuc_op; - c_ops[0] = curr_c_op; + int_c_ops[0] = curr_c_op; sessions[0] = curr_sess; burst_size++; @@ -335,5 +336,5 @@ zuc_pmd_dequeue_burst(void *queue_pair, if (burst_size != 0) { /* Process the crypto ops of the last operation type. */ - processed_ops = process_ops(c_ops, prev_zuc_op, + processed_ops = process_ops(int_c_ops, prev_zuc_op, sessions, qp, burst_size); } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-03-01 10:41:02.257350828 +0000 +++ 0034-crypto-ipsec_mb-fix-ZUC-operation-overwrite.patch 2022-03-01 10:41:01.286244094 +0000 @@ -1 +1 @@ -From 96d0dc2a3cd21d6f392347ae1d2ff3c21e27231a Mon Sep 17 00:00:00 2001 +From cfa7703c8e58d2610c8ff87f0247e20cfe03597e Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 96d0dc2a3cd21d6f392347ae1d2ff3c21e27231a ] + @@ -17 +18,0 @@ -Cc: stable@dpdk.org