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 5D4C0A0C41 for ; Tue, 30 Nov 2021 17:43:31 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 581B441177; Tue, 30 Nov 2021 17:43:31 +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 08AFF410F7 for ; Tue, 30 Nov 2021 17:43:30 +0100 (CET) Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (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 D7CB13F1B1 for ; Tue, 30 Nov 2021 16:43:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638290609; bh=wK7YGokwamPeKWgGodqbKNIv5Zg3Esb3RxOO1Jx261Y=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=CrXi4Hzpr/CJTqshHCUiiedVJRFCazmse6x9uXs6M+jOx+5Ca0n8ACiGbQ317GT5m UiVj1bsJ/MRZJOElkmLVE4AKSKXwTnYctySiYCWjnlI3nDdC33mSTAN7Itbqqn+x+e BNMIvABjkvG8kZhlkjLs+kIBQH6yzVKbL1NLiYIO+8f5NwD0JO/na6YocOfziPVLgc 6kFLPkN73hO3WAPIYiWr5NVIk7ldAHkrXK2PddeTFpNRN4MWtGfwmKrQyIayDxypQu ejhE02kExFfDiYOFhUH5vo3HxNVbWCVeCFy9qTxluvusT6rZwEnkEV2gOdr4xMqUE6 bUp0M0fWN8JuA== Received: by mail-ed1-f70.google.com with SMTP id s12-20020a50ab0c000000b003efdf5a226fso11310649edc.10 for ; Tue, 30 Nov 2021 08:43:29 -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=wK7YGokwamPeKWgGodqbKNIv5Zg3Esb3RxOO1Jx261Y=; b=plUXqYvqYpHYOqIKcYnrnL6A2uI/5abnIIWpFXgJHA69SDLAus1pfHCYfwjKEal3PH esVK2Jh2G4OxwcHMgmPFKiQueUSJCUogFP/Gbhd3cT1noWZDGj36cOMn+Xbfa6lSuQqV IT0qHqlw1QaVjkQuQVrJCmMrFVwJyYM4YBUkZenx1T/IbHi0nE0K8dZTjKtDQ6S19NR8 bf9cuEH0Ttc6y6VN9VcjrFa4M4io+2yV/rYx9CW/QxxEG1yxO4UvbI3IpXiSbBBtuIw7 gMA7s1l53eQls7dr0UWX6M8fAQzQzRUltI167und0QerN64sywUJBYfwRNRAKcnk1DvD kSqA== X-Gm-Message-State: AOAM532YQIdC702/0zQBvAtsw1+BdSdFA1JInF+EeSDKAz7ifDKfQq+J X7D7jZ/CKf0Wk+RXaUih2lZr/9PjyVIGQ8sD9oaA/wCmnK2+km/dJ0I+CcHT3tHfvXvezuYzXcS Ah5nxWN4XCI8o8KlFAJ9PkwAX X-Received: by 2002:a05:6402:5206:: with SMTP id s6mr81223edd.113.1638290609199; Tue, 30 Nov 2021 08:43:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJwIEncXk60xsiYMo7ixQIjh/ACansacBMixKPp3bW3lihdSJsRY9S9Wr+Y0tV3Vl0n4QlDaPA== X-Received: by 2002:a05:6402:5206:: with SMTP id s6mr81201edd.113.1638290609036; Tue, 30 Nov 2021 08:43:29 -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.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 08:43:28 -0800 (PST) From: christian.ehrhardt@canonical.com To: Kai Ji Cc: Anoob Joseph , dpdk stable Subject: patch 'test/crypto: fix data lengths' has been queued to stable release 19.11.11 Date: Tue, 30 Nov 2021 17:35:47 +0100 Message-Id: <20211130163605.2460997-143-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/3cf7745c4f1358b2fde4a1be7ddd61293945d786 Thanks. Christian Ehrhardt --- >From 3cf7745c4f1358b2fde4a1be7ddd61293945d786 Mon Sep 17 00:00:00 2001 From: Kai Ji Date: Tue, 9 Nov 2021 10:42:31 +0000 Subject: [PATCH] test/crypto: fix data lengths [ upstream commit f52b75c61b7cf75e5c9a665e465dfbace2a18f30 ] This patch fixes incorrect data lengths computation in cryptodev unit test. Previously some data lengths were incorrectly set, which was insensitive for crypto op unit tets but is critical for raw data path API unit tests. The patch addressed the issue by setting the correct data lengths for some tests. Fixes: 681f540da52b ("cryptodev: do not use AAD in wireless algorithms") Fixes: e847fc512817 ("test/crypto: add encrypted digest case for AES-CTR-CMAC") Fixes: b1c1df46878d ("test/crypto: add ZUC test cases for auth-cipher") Signed-off-by: Kai Ji Acked-by: Anoob Joseph --- app/test/test_cryptodev.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 89cd53e746..189f7be4a4 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -3957,9 +3957,9 @@ test_kasumi_decryption(const struct kasumi_test_data *tdata) /* Create KASUMI operation */ retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data, - tdata->cipher_iv.len, - tdata->ciphertext.len, - tdata->validCipherOffsetInBits.len); + tdata->cipher_iv.len, + RTE_ALIGN_CEIL(tdata->validCipherLenInBits.len, 8), + tdata->validCipherOffsetInBits.len); if (retval < 0) return retval; @@ -5717,20 +5717,20 @@ test_zuc_auth_cipher(const struct wireless_test_data *tdata, ciphertext = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf, ciphertext_pad_len); memcpy(ciphertext, tdata->ciphertext.data, ciphertext_len); - if (op_mode == OUT_OF_PLACE) - rte_pktmbuf_append(ut_params->obuf, ciphertext_pad_len); debug_hexdump(stdout, "ciphertext:", ciphertext, ciphertext_len); } else { + /* make sure enough space to cover partial digest verify case */ plaintext = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf, - plaintext_pad_len); + ciphertext_pad_len); memcpy(plaintext, tdata->plaintext.data, plaintext_len); - if (op_mode == OUT_OF_PLACE) - rte_pktmbuf_append(ut_params->obuf, plaintext_pad_len); debug_hexdump(stdout, "plaintext:", plaintext, plaintext_len); } + if (op_mode == OUT_OF_PLACE) + rte_pktmbuf_append(ut_params->obuf, ciphertext_pad_len); + /* Create ZUC operation */ retval = create_wireless_algo_auth_cipher_operation( tdata->digest.data, tdata->digest.len, @@ -6704,19 +6704,19 @@ test_mixed_auth_cipher(const struct mixed_cipher_auth_test_data *tdata, ciphertext = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf, ciphertext_pad_len); memcpy(ciphertext, tdata->ciphertext.data, ciphertext_len); - if (op_mode == OUT_OF_PLACE) - rte_pktmbuf_append(ut_params->obuf, ciphertext_pad_len); debug_hexdump(stdout, "ciphertext:", ciphertext, ciphertext_len); } else { + /* make sure enough space to cover partial digest verify case */ plaintext = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf, - plaintext_pad_len); + ciphertext_pad_len); memcpy(plaintext, tdata->plaintext.data, plaintext_len); - if (op_mode == OUT_OF_PLACE) - rte_pktmbuf_append(ut_params->obuf, plaintext_pad_len); debug_hexdump(stdout, "plaintext:", plaintext, plaintext_len); } + if (op_mode == OUT_OF_PLACE) + rte_pktmbuf_append(ut_params->obuf, ciphertext_pad_len); + /* Create the operation */ retval = create_wireless_algo_auth_cipher_operation( tdata->digest_enc.data, tdata->digest_enc.len, -- 2.34.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-30 16:50:14.159082996 +0100 +++ 0143-test-crypto-fix-data-lengths.patch 2021-11-30 16:50:06.022875232 +0100 @@ -1 +1 @@ -From f52b75c61b7cf75e5c9a665e465dfbace2a18f30 Mon Sep 17 00:00:00 2001 +From 3cf7745c4f1358b2fde4a1be7ddd61293945d786 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit f52b75c61b7cf75e5c9a665e465dfbace2a18f30 ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -24 +25 @@ -index 1b68d7c43b..29e8675e30 100644 +index 89cd53e746..189f7be4a4 100644 @@ -27 +28 @@ -@@ -4102,9 +4102,9 @@ test_kasumi_decryption(const struct kasumi_test_data *tdata) +@@ -3957,9 +3957,9 @@ test_kasumi_decryption(const struct kasumi_test_data *tdata) @@ -40 +41 @@ -@@ -6332,20 +6332,20 @@ test_zuc_auth_cipher(const struct wireless_test_data *tdata, +@@ -5717,20 +5717,20 @@ test_zuc_auth_cipher(const struct wireless_test_data *tdata, @@ -66 +67 @@ -@@ -7400,19 +7400,19 @@ test_mixed_auth_cipher(const struct mixed_cipher_auth_test_data *tdata, +@@ -6704,19 +6704,19 @@ test_mixed_auth_cipher(const struct mixed_cipher_auth_test_data *tdata,