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 43693A0C41 for ; Tue, 30 Nov 2021 17:43:30 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3BEB4410F7; Tue, 30 Nov 2021 17:43:30 +0100 (CET) Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by mails.dpdk.org (Postfix) with ESMTP id B46A1410F7 for ; Tue, 30 Nov 2021 17:43:28 +0100 (CET) Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 9001E3F1B1 for ; Tue, 30 Nov 2021 16:43:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638290608; bh=lo9XhryJ2lla658wrU5XH/cHCvEA05o41mlC5xfVkN0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=LK/DfPUD9sJUx/vNt1bpdj1u5BfuC6WIog2YrfXzf1y2yPmKGupIhMJhqrpd6mfaY 3hisgzb00e6uxECeUJR7E9OAszws6byumysVKThMxe70iuEYhS+w/l0DuSs4rd08r9 vHu3VeVWKrrw1O0HECU+pRpBTKZuSKh8aHvzkuVzKdnYayOUk8nhVA376YsZJZyUFN tQFcaSwgY0eAeKk1Euiu1eVPLdLHPBojfs+NLm9ucju163jU+KVFZv2YzagTvKEsrN +x5AgnFPWbBDJMO1goyBPvzG5P7fE7UZ/RFeummOQIKVKFe12t4KwwHM6aSaaSYzsv oX2ptMcLNQ6hw== Received: by mail-ed1-f72.google.com with SMTP id eg20-20020a056402289400b003eb56fcf6easo17392871edb.20 for ; Tue, 30 Nov 2021 08:43:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lo9XhryJ2lla658wrU5XH/cHCvEA05o41mlC5xfVkN0=; b=A82x9sEec2MuJgP0l1rp9oMEOn6guxbiSxCWuqKDbywBMvIwBvHo8T4gX88E0VeuJr MqB7frv7VReUbbLRF3dSpfh/9qHCr0xboTjrrW52ZFyTa0aDv9ckQVZ6ru1pgpdBAInj hzwiVGXYj6HWE0lztAyKtzzGehN8bt1cn7XtugjCOoYOysBDNyAWwebIGDZXsf/SuEfJ MNme1MzOTs0og1G0I+WlCwDobwJHQf0gL60SwlbmpfZHEkZVTjao2Uv8I/MTVwheLjaL kx4AWzslMChnyAnNJzy5ouBYmGBkN370lOqek2jiYHe39EenviAai4kbryK1UL7dES1n ojag== X-Gm-Message-State: AOAM530x/WroYMrbWUN961mW38nMArI3FHIx7LhpgC3gFYPUUTv53dhg 16Gee3NCM92+W1zokSLB+sIlfubHhM+zsbrV6gs4D40ysl6lFDnve5aUC/SPksCeK+ve5q15seC F4cOWcZcJNufZhcW6ccESAhh4 X-Received: by 2002:a17:906:2f10:: with SMTP id v16mr251026eji.434.1638290608291; Tue, 30 Nov 2021 08:43:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJxQ10S2LgBxUVcj7vlAdNeaUCgPOfXIqYUieE+6rxT7iYwJB2QJZ7Gsfn3yLktWmEaG7itEsg== X-Received: by 2002:a17:906:2f10:: with SMTP id v16mr251008eji.434.1638290608130; Tue, 30 Nov 2021 08:43:28 -0800 (PST) Received: from localhost.localdomain ([2001:67c:1560:8007::aac:c4ad]) by smtp.gmail.com with ESMTPSA id kx3sm9157364ejc.112.2021.11.30.08.43.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 08:43:27 -0800 (PST) From: christian.ehrhardt@canonical.com To: Anoob Joseph Cc: Ciara Power , Pablo de Lara , dpdk stable Subject: patch 'test/crypto: skip plain text compare for null cipher' has been queued to stable release 19.11.11 Date: Tue, 30 Nov 2021 17:35:46 +0100 Message-Id: <20211130163605.2460997-142-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211130163605.2460997-1-christian.ehrhardt@canonical.com> References: <20211130163605.2460997-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 19.11.11 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before December 10th 2021. 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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/6bf2029993e5d39783078abff164fb57c92cf3df Thanks. Christian Ehrhardt --- >From 6bf2029993e5d39783078abff164fb57c92cf3df Mon Sep 17 00:00:00 2001 From: Anoob Joseph Date: Wed, 10 Nov 2021 18:34:08 +0530 Subject: [PATCH] test/crypto: skip plain text compare for null cipher [ upstream commit 9fc69835feb33d0e155076163ecc2f5479cf1bc2 ] NULL cipher is used for validating auth only cases. With NULL cipher, validating plain text should not be done as the PMD is only expected to update auth data. Fixes: e847fc512817 ("test/crypto: add encrypted digest case for AES-CTR-CMAC") Signed-off-by: Anoob Joseph Acked-by: Ciara Power Acked-by: Pablo de Lara --- app/test/test_cryptodev.c | 63 ++++++++++++++++++++++----------------- 1 file changed, 35 insertions(+), 28 deletions(-) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 42c573664b..89cd53e746 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -6789,27 +6789,30 @@ test_mixed_auth_cipher(const struct mixed_cipher_auth_test_data *tdata, tdata->digest_enc.len); } - /* Validate obuf */ - if (verify) { - TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT( - plaintext, - tdata->plaintext.data, - tdata->plaintext.len_bits >> 3, - "Plaintext data not as expected"); - } else { - TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT( - ciphertext, - tdata->ciphertext.data, - tdata->validDataLen.len_bits, - "Ciphertext data not as expected"); - + if (!verify) { TEST_ASSERT_BUFFERS_ARE_EQUAL( ut_params->digest, tdata->digest_enc.data, - DIGEST_BYTE_LENGTH_SNOW3G_UIA2, + tdata->digest_enc.len, "Generated auth tag not as expected"); } + if (tdata->cipher_algo != RTE_CRYPTO_CIPHER_NULL) { + if (verify) { + TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT( + plaintext, + tdata->plaintext.data, + tdata->plaintext.len_bits >> 3, + "Plaintext data not as expected"); + } else { + TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT( + ciphertext, + tdata->ciphertext.data, + tdata->validDataLen.len_bits, + "Ciphertext data not as expected"); + } + } + TEST_ASSERT_EQUAL(ut_params->op->status, RTE_CRYPTO_OP_STATUS_SUCCESS, "crypto op processing failed"); @@ -7006,19 +7009,7 @@ test_mixed_auth_cipher_sgl(const struct mixed_cipher_auth_test_data *tdata, tdata->digest_enc.data, tdata->digest_enc.len); } - /* Validate obuf */ - if (verify) { - TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT( - plaintext, - tdata->plaintext.data, - tdata->plaintext.len_bits >> 3, - "Plaintext data not as expected"); - } else { - TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT( - ciphertext, - tdata->ciphertext.data, - tdata->validDataLen.len_bits, - "Ciphertext data not as expected"); + if (!verify) { TEST_ASSERT_BUFFERS_ARE_EQUAL( digest, tdata->digest_enc.data, @@ -7026,6 +7017,22 @@ test_mixed_auth_cipher_sgl(const struct mixed_cipher_auth_test_data *tdata, "Generated auth tag not as expected"); } + if (tdata->cipher_algo != RTE_CRYPTO_CIPHER_NULL) { + if (verify) { + TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT( + plaintext, + tdata->plaintext.data, + tdata->plaintext.len_bits >> 3, + "Plaintext data not as expected"); + } else { + TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT( + ciphertext, + tdata->ciphertext.data, + tdata->validDataLen.len_bits, + "Ciphertext data not as expected"); + } + } + TEST_ASSERT_EQUAL(ut_params->op->status, RTE_CRYPTO_OP_STATUS_SUCCESS, "crypto op processing failed"); -- 2.34.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-30 16:50:14.105972537 +0100 +++ 0142-test-crypto-skip-plain-text-compare-for-null-cipher.patch 2021-11-30 16:50:06.006875115 +0100 @@ -1 +1 @@ -From 9fc69835feb33d0e155076163ecc2f5479cf1bc2 Mon Sep 17 00:00:00 2001 +From 6bf2029993e5d39783078abff164fb57c92cf3df Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 9fc69835feb33d0e155076163ecc2f5479cf1bc2 ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ -index 52457596e2..1b68d7c43b 100644 +index 42c573664b..89cd53e746 100644 @@ -24 +25 @@ -@@ -7484,27 +7484,30 @@ test_mixed_auth_cipher(const struct mixed_cipher_auth_test_data *tdata, +@@ -6789,27 +6789,30 @@ test_mixed_auth_cipher(const struct mixed_cipher_auth_test_data *tdata, @@ -70 +71 @@ -@@ -7701,19 +7704,7 @@ test_mixed_auth_cipher_sgl(const struct mixed_cipher_auth_test_data *tdata, +@@ -7006,19 +7009,7 @@ test_mixed_auth_cipher_sgl(const struct mixed_cipher_auth_test_data *tdata, @@ -91 +92 @@ -@@ -7721,6 +7712,22 @@ test_mixed_auth_cipher_sgl(const struct mixed_cipher_auth_test_data *tdata, +@@ -7026,6 +7017,22 @@ test_mixed_auth_cipher_sgl(const struct mixed_cipher_auth_test_data *tdata,