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 7772EA051C for ; Tue, 11 Feb 2020 13:10:20 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 42D331C01B; Tue, 11 Feb 2020 13:10:20 +0100 (CET) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id A9C1D1C01B for ; Tue, 11 Feb 2020 13:10:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581423018; 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:autocrypt:autocrypt; bh=GtJM0NIaFDdm2rtiwObpSs7IFqOEibUCXQc4izfCA6o=; b=bZ0qm+mmxwpmb1NYgzhLEvm2DeEcjJc5LxYjcYCpywl5E1efCNXsBM6XoyYAOEcFYKKyRb BX2tViirj/cH6AFvfdxaj/2mHlMH48zyEggvQNqYs7d5Mx6xKktuMlMYiA+4SyV933feHZ jO/kqG9k6IHHYrkg1o3bYAo7byXFzQs= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-89-Q0MYKDuXOXWLOVW5oQfRxA-1; Tue, 11 Feb 2020 07:10:12 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 785521005513; Tue, 11 Feb 2020 12:10:10 +0000 (UTC) Received: from [10.33.36.133] (unknown [10.33.36.133]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5F02726FB6; Tue, 11 Feb 2020 12:10:08 +0000 (UTC) To: Luca Boccassi , "Dybkowski, AdamX" Cc: "Trahe, Fiona" , Ankur Dwivedi , Anoob Joseph , dpdk stable References: <20200211112216.3929-1-luca.boccassi@gmail.com> <20200211112216.3929-23-luca.boccassi@gmail.com> <522B1A062D56224ABC0C6BDBCD64D9D38CAA4D2E@IRSMSX103.ger.corp.intel.com> From: Kevin Traynor Autocrypt: addr=ktraynor@redhat.com; keydata= mQINBF2J2awBEADUEPNhgNI+nJNgiTAUcw4YIgVXEoHlsNPyyzG1BEXkWXALy0Y3fNTiw6+r ltWDkF9jzL9kfkecgQ67itGfk1OaBXgSGKuw1PUpxAwX2Bi76LAR6M5OsyGM9TSVVQwARalz hMwRBIZPzPc7or6Pw7jAOJ8SQGJ1Zlp1YJCjrvpe87V1tH/LY8Wnxn/EuoseFmWILAQZAtYS tGjcrAgYn3SPMLR1B0BP5bTBY06vWQjiufH8drenfDnMJAzuBdG1mqjnTqCjULZ3Hunv4xqZ aMnkvL/K5Tj1c12Oe4930EE53LrXIBUltRg5mBudSWHnC7twjH0082HH9f963Z/2UI63SFIT iUvRvAzJYytgy7XnWLQ0+goZBADKYfolOuC0H8VgCaux8u8KFF28Dy+N6TV2KI58jTlyg1Zu l7QwykZpnOkJFiy37Gfbu3YEOzO72cP/S7/A+zvuqkxi63jyEkd+FY99vLt/HN2MUZwRmKDw UPbLkmrs8WU01/POVsqDcfvz7vu2St8hqqTiSIdQGS2zyTKB2/DvPSM3jws3udkIYSuhn+X4 QBiV6lkVZ7DSE6a065gnAauAql+b32Eymy+xnG5jCt1tR+0Cp2VZYCR9OU2gmomUKBDoX/He pSgED01CqYPNjN+TddirwmQX7ep4DtXc8FWvv2g/pq9WZFQk2QARAQABtCNLZXZpbiBUcmF5 bm9yIDxrdHJheW5vckByZWRoYXQuY29tPokCTgQTAQgAOBYhBAoiOaH51tHF7VYtEI9CINER a+yJBQJdidmsAhsDBQsJCAcCBhUKCQgLAg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CsqPd5feU= Message-ID: Date: Tue, 11 Feb 2020 12:10:07 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: Q0MYKDuXOXWLOVW5oQfRxA-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-stable] patch 'test/crypto: fix missing operation status check' has been queued to stable release 19.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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" On 11/02/2020 11:52, Luca Boccassi wrote: > Hi, >=20 > That's a question for Kevin, the 18.11 maintainer. >=20 > On Tue, 2020-02-11 at 11:37 +0000, Dybkowski, AdamX wrote: >> Hi Luca. >> >> I originally targeted this patch for DPDK 18.11. That's good it'll go >> into 19.11, too. But will it be applied to 18.11 as well? >> I tried to apply it on 18.11 branch last week, but it doesn't apply and I have a note to say there was too much churn. So, you'll need to send a rebased version on 18.11 branch. It will be on the list of commits that didn't apply and asking authors for rebase that I'll send out a bit later. >> Adam >> >>> -----Original Message----- >>> From:=20 >>> luca.boccassi@gmail.com >>> [mailto: >>> luca.boccassi@gmail.com >>> ] >>> Sent: Tuesday, 11 February, 2020 12:19 >>> To: Dybkowski, AdamX < >>> adamx.dybkowski@intel.com >>>> >>> Cc: Trahe, Fiona < >>> fiona.trahe@intel.com >>>> ; Ankur Dwivedi >>> < >>> adwivedi@marvell.com >>>> ; Anoob Joseph < >>> anoobj@marvell.com >>>> ; dpdk >>> stable < >>> stable@dpdk.org >>>> >>> Subject: patch 'test/crypto: fix missing operation status check' >>> has been >>> queued to stable release 19.11.1 >>> >>> Hi, >>> >>> FYI, your patch has been queued to stable release 19.11.1 >>> >>> Note it hasn't been pushed to=20 >>> http://dpdk.org/browse/dpdk-stable >>> yet. >>> It will be pushed if I get no objections before 02/13/20. 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. >>> >>> Thanks. >>> >>> Luca Boccassi >>> >>> --- >>> From ce8302172f9f8e06833a49abf8b283a71b07dc3b Mon Sep 17 00:00:00 >>> 2001 >>> From: Adam Dybkowski < >>> adamx.dybkowski@intel.com >>>> >>> Date: Fri, 20 Dec 2019 13:58:52 +0100 >>> Subject: [PATCH] test/crypto: fix missing operation status check >>> >>> [ upstream commit b26ef1a11f21ecde63582ed6db281c93ce9fbf23 ] >>> >>> This patch adds checking of the symmetric crypto operation status >>> that was >>> silently skipped before. It fixes the wireless algorithms session >>> creation >>> (SNOW3G, KASUMI, ZUC) and passing of the digest data for the >>> verification >>> by PMD. Also fixed the missing aad padding issue revealed after op >>> status >>> checking was introduced. >>> >>> Fixes: c0f87eb5252b ("cryptodev: change burst API to be crypto op >>> oriented") >>> Fixes: 77a217a19bb7 ("test/crypto: add AES-CCM tests") >>> >>> Signed-off-by: Adam Dybkowski < >>> adamx.dybkowski@intel.com >>>> >>> Acked-by: Fiona Trahe < >>> fiona.trahe@intel.com >>>> >>> Tested-by: Ankur Dwivedi < >>> adwivedi@marvell.com >>>> >>> Reviewed-by: Anoob Joseph < >>> anoobj@marvell.com >>>> >>> --- >>> app/test/test_cryptodev.c | 96 +++++++++++++++++++++------------ >>> ------ >>> 1 file changed, 52 insertions(+), 44 deletions(-) >>> >>> diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c >>> index >>> 1b561456d7..79ced809de 100644 >>> --- a/app/test/test_cryptodev.c >>> +++ b/app/test/test_cryptodev.c >>> @@ -143,7 +143,7 @@ static struct rte_crypto_op * >>> process_crypto_request(uint8_t dev_id, struct rte_crypto_op *op) { >>> =09if (rte_cryptodev_enqueue_burst(dev_id, 0, &op, 1) !=3D 1) { >>> -=09=09printf("Error sending packet for encryption"); >>> +=09=09RTE_LOG(ERR, USER1, "Error sending packet for >>> encryption\n"); >>> =09=09return NULL; >>> =09} >>> >>> @@ -152,6 +152,11 @@ process_crypto_request(uint8_t dev_id, struct >>> rte_crypto_op *op) >>> =09while (rte_cryptodev_dequeue_burst(dev_id, 0, &op, 1) =3D=3D 0) >>> =09=09rte_pause(); >>> >>> +=09if (op->status !=3D RTE_CRYPTO_OP_STATUS_SUCCESS) { >>> +=09=09RTE_LOG(DEBUG, USER1, "Operation status %d\n", op- >>>> status); >>> >>> +=09=09return NULL; >>> +=09} >>> + >>> =09return op; >>> } >>> >>> @@ -2823,9 +2828,18 @@ >>> create_wireless_algo_auth_cipher_session(uint8_t dev_id, >>> =09ut_params->sess =3D rte_cryptodev_sym_session_create( >>> =09=09=09ts_params->session_mpool); >>> >>> -=09status =3D rte_cryptodev_sym_session_init(dev_id, ut_params- >>>> sess, >>> -=09=09=09&ut_params->auth_xform, >>> -=09=09=09ts_params->session_priv_mpool); >>> +=09if (cipher_op =3D=3D RTE_CRYPTO_CIPHER_OP_DECRYPT) { >>> +=09=09ut_params->auth_xform.next =3D NULL; >>> +=09=09ut_params->cipher_xform.next =3D &ut_params->auth_xform; >>> +=09=09status =3D rte_cryptodev_sym_session_init(dev_id, >>> ut_params- >>>> sess, >>> >>> +=09=09=09=09&ut_params->cipher_xform, >>> +=09=09=09=09ts_params->session_priv_mpool); >>> + >>> +=09} else >>> +=09=09status =3D rte_cryptodev_sym_session_init(dev_id, >>> ut_params- >>>> sess, >>> >>> +=09=09=09=09&ut_params->auth_xform, >>> +=09=09=09=09ts_params->session_priv_mpool); >>> + >>> =09TEST_ASSERT_EQUAL(status, 0, "session init failed"); >>> =09TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation >>> failed"); >>> >>> @@ -3018,13 +3032,14 @@ >>> create_wireless_algo_cipher_hash_operation(const uint8_t >>> *auth_tag, } >>> >>> static int >>> -create_wireless_algo_auth_cipher_operation(unsigned int >>> auth_tag_len, >>> +create_wireless_algo_auth_cipher_operation( >>> +=09=09const uint8_t *auth_tag, unsigned int auth_tag_len, >>> =09=09const uint8_t *cipher_iv, uint8_t cipher_iv_len, >>> =09=09const uint8_t *auth_iv, uint8_t auth_iv_len, >>> =09=09unsigned int data_pad_len, >>> =09=09unsigned int cipher_len, unsigned int cipher_offset, >>> =09=09unsigned int auth_len, unsigned int auth_offset, >>> -=09=09uint8_t op_mode, uint8_t do_sgl) >>> +=09=09uint8_t op_mode, uint8_t do_sgl, uint8_t verify) >>> { >>> =09struct crypto_testsuite_params *ts_params =3D &testsuite_params; >>> =09struct crypto_unittest_params *ut_params =3D &unittest_params; @@ >>> -3081,6 +3096,10 @@ >>> create_wireless_algo_auth_cipher_operation(unsigned int >>> auth_tag_len, >>> =09=09} >>> =09} >>> >>> +=09/* Copy digest for the verification */ >>> +=09if (verify) >>> +=09=09memcpy(sym_op->auth.digest.data, auth_tag, >>> auth_tag_len); >>> + >>> =09/* Copy cipher and auth IVs at the end of the crypto operation >>> */ >>> =09uint8_t *iv_ptr =3D rte_crypto_op_ctod_offset( >>> =09=09=09ut_params->op, uint8_t *, IV_OFFSET); @@ >>> -4643,7 >>> +4662,7 @@ test_snow3g_auth_cipher(const struct snow3g_test_data >>> *tdata, >>> >>> =09/* Create SNOW 3G operation */ >>> =09retval =3D create_wireless_algo_auth_cipher_operation( >>> -=09=09tdata->digest.len, >>> +=09=09tdata->digest.data, tdata->digest.len, >>> =09=09tdata->cipher_iv.data, tdata->cipher_iv.len, >>> =09=09tdata->auth_iv.data, tdata->auth_iv.len, >>> =09=09(tdata->digest.offset_bytes =3D=3D 0 ? >>> @@ -4653,7 +4672,7 @@ test_snow3g_auth_cipher(const struct >>> snow3g_test_data *tdata, >>> =09=09tdata->cipher.offset_bits, >>> =09=09tdata->validAuthLenInBits.len, >>> =09=09tdata->auth.offset_bits, >>> -=09=09op_mode, 0); >>> +=09=09op_mode, 0, verify); >>> >>> =09if (retval < 0) >>> =09=09return retval; >>> @@ -4819,7 +4838,7 @@ test_snow3g_auth_cipher_sgl(const struct >>> snow3g_test_data *tdata, >>> >>> =09/* Create SNOW 3G operation */ >>> =09retval =3D create_wireless_algo_auth_cipher_operation( >>> -=09=09tdata->digest.len, >>> +=09=09tdata->digest.data, tdata->digest.len, >>> =09=09tdata->cipher_iv.data, tdata->cipher_iv.len, >>> =09=09tdata->auth_iv.data, tdata->auth_iv.len, >>> =09=09(tdata->digest.offset_bytes =3D=3D 0 ? >>> @@ -4829,7 +4848,7 @@ test_snow3g_auth_cipher_sgl(const struct >>> snow3g_test_data *tdata, >>> =09=09tdata->cipher.offset_bits, >>> =09=09tdata->validAuthLenInBits.len, >>> =09=09tdata->auth.offset_bits, >>> -=09=09op_mode, 1); >>> +=09=09op_mode, 1, verify); >>> >>> =09if (retval < 0) >>> =09=09return retval; >>> @@ -4988,7 +5007,7 @@ test_kasumi_auth_cipher(const struct >>> kasumi_test_data *tdata, >>> >>> =09/* Create KASUMI operation */ >>> =09retval =3D create_wireless_algo_auth_cipher_operation( >>> -=09=09tdata->digest.len, >>> +=09=09tdata->digest.data, tdata->digest.len, >>> =09=09tdata->cipher_iv.data, tdata->cipher_iv.len, >>> =09=09NULL, 0, >>> =09=09(tdata->digest.offset_bytes =3D=3D 0 ? >>> @@ -4998,7 +5017,7 @@ test_kasumi_auth_cipher(const struct >>> kasumi_test_data *tdata, >>> =09=09tdata->validCipherOffsetInBits.len, >>> =09=09tdata->validAuthLenInBits.len, >>> =09=090, >>> -=09=09op_mode, 0); >>> +=09=09op_mode, 0, verify); >>> >>> =09if (retval < 0) >>> =09=09return retval; >>> @@ -5165,7 +5184,7 @@ test_kasumi_auth_cipher_sgl(const struct >>> kasumi_test_data *tdata, >>> >>> =09/* Create KASUMI operation */ >>> =09retval =3D create_wireless_algo_auth_cipher_operation( >>> -=09=09tdata->digest.len, >>> +=09=09tdata->digest.data, tdata->digest.len, >>> =09=09tdata->cipher_iv.data, tdata->cipher_iv.len, >>> =09=09NULL, 0, >>> =09=09(tdata->digest.offset_bytes =3D=3D 0 ? >>> @@ -5175,7 +5194,7 @@ test_kasumi_auth_cipher_sgl(const struct >>> kasumi_test_data *tdata, >>> =09=09tdata->validCipherOffsetInBits.len, >>> =09=09tdata->validAuthLenInBits.len, >>> =09=090, >>> -=09=09op_mode, 1); >>> +=09=09op_mode, 1, verify); >>> >>> =09if (retval < 0) >>> =09=09return retval; >>> @@ -5666,7 +5685,7 @@ test_zuc_auth_cipher(const struct >>> wireless_test_data *tdata, >>> >>> =09/* Create ZUC operation */ >>> =09retval =3D create_wireless_algo_auth_cipher_operation( >>> -=09=09tdata->digest.len, >>> +=09=09tdata->digest.data, tdata->digest.len, >>> =09=09tdata->cipher_iv.data, tdata->cipher_iv.len, >>> =09=09tdata->auth_iv.data, tdata->auth_iv.len, >>> =09=09(tdata->digest.offset_bytes =3D=3D 0 ? >>> @@ -5676,7 +5695,7 @@ test_zuc_auth_cipher(const struct >>> wireless_test_data *tdata, >>> =09=09tdata->validCipherOffsetInBits.len, >>> =09=09tdata->validAuthLenInBits.len, >>> =09=090, >>> -=09=09op_mode, 0); >>> +=09=09op_mode, 0, verify); >>> >>> =09if (retval < 0) >>> =09=09return retval; >>> @@ -5852,7 +5871,7 @@ test_zuc_auth_cipher_sgl(const struct >>> wireless_test_data *tdata, >>> >>> =09/* Create ZUC operation */ >>> =09retval =3D create_wireless_algo_auth_cipher_operation( >>> -=09=09tdata->digest.len, >>> +=09=09tdata->digest.data, tdata->digest.len, >>> =09=09tdata->cipher_iv.data, tdata->cipher_iv.len, >>> =09=09NULL, 0, >>> =09=09(tdata->digest.offset_bytes =3D=3D 0 ? >>> @@ -5862,7 +5881,7 @@ test_zuc_auth_cipher_sgl(const struct >>> wireless_test_data *tdata, >>> =09=09tdata->validCipherOffsetInBits.len, >>> =09=09tdata->validAuthLenInBits.len, >>> =09=090, >>> -=09=09op_mode, 1); >>> +=09=09op_mode, 1, verify); >>> >>> =09if (retval < 0) >>> =09=09return retval; >>> @@ -6643,7 +6662,7 @@ test_mixed_auth_cipher(const struct >>> mixed_cipher_auth_test_data *tdata, >>> >>> =09/* Create the operation */ >>> =09retval =3D create_wireless_algo_auth_cipher_operation( >>> -=09=09=09tdata->digest_enc.len, >>> +=09=09=09tdata->digest_enc.data, tdata->digest_enc.len, >>> =09=09=09tdata->cipher_iv.data, tdata->cipher_iv.len, >>> =09=09=09tdata->auth_iv.data, tdata->auth_iv.len, >>> =09=09=09(tdata->digest_enc.offset =3D=3D 0 ? >>> @@ -6653,7 +6672,7 @@ test_mixed_auth_cipher(const struct >>> mixed_cipher_auth_test_data *tdata, >>> =09=09=09tdata->cipher.offset_bits, >>> =09=09=09tdata->validAuthLen.len_bits, >>> =09=09=09tdata->auth.offset_bits, >>> -=09=09=09op_mode, 0); >>> +=09=09=09op_mode, 0, verify); >>> >>> =09if (retval < 0) >>> =09=09return retval; >>> @@ -6827,7 +6846,7 @@ test_mixed_auth_cipher_sgl(const struct >>> mixed_cipher_auth_test_data *tdata, >>> >>> =09/* Create the operation */ >>> =09retval =3D create_wireless_algo_auth_cipher_operation( >>> -=09=09=09tdata->digest_enc.len, >>> +=09=09=09tdata->digest_enc.data, tdata->digest_enc.len, >>> =09=09=09tdata->cipher_iv.data, tdata->cipher_iv.len, >>> =09=09=09tdata->auth_iv.data, tdata->auth_iv.len, >>> =09=09=09(tdata->digest_enc.offset =3D=3D 0 ? >>> @@ -6837,7 +6856,7 @@ test_mixed_auth_cipher_sgl(const struct >>> mixed_cipher_auth_test_data *tdata, >>> =09=09=09tdata->cipher.offset_bits, >>> =09=09=09tdata->validAuthLen.len_bits, >>> =09=09=09tdata->auth.offset_bits, >>> -=09=09=09op_mode, 1); >>> +=09=09=09op_mode, 1, verify); >>> >>> =09if (retval < 0) >>> =09=09return retval; >>> @@ -10818,13 +10837,8 @@ >>> test_authentication_verify_fail_when_data_corruption( >>> >>> =09ut_params->op =3D process_crypto_request(ts_params- >>>> valid_devs[0], >>> =09=09=09ut_params->op); >>> -=09TEST_ASSERT_NOT_NULL(ut_params->op, "failed crypto process"); >>> -=09TEST_ASSERT_NOT_EQUAL(ut_params->op->status, >>> -=09=09=09RTE_CRYPTO_OP_STATUS_SUCCESS, >>> -=09=09=09"authentication not failed"); >>> >>> -=09ut_params->obuf =3D ut_params->op->sym->m_src; >>> -=09TEST_ASSERT_NOT_NULL(ut_params->obuf, "failed to retrieve >>> obuf"); >>> +=09TEST_ASSERT_NULL(ut_params->op, "authentication not failed"); >>> >>> =09return 0; >>> } >>> @@ -10879,13 +10893,8 @@ >>> test_authentication_verify_GMAC_fail_when_corruption( >>> >>> =09ut_params->op =3D process_crypto_request(ts_params- >>>> valid_devs[0], >>> =09=09=09ut_params->op); >>> -=09TEST_ASSERT_NOT_NULL(ut_params->op, "failed crypto process"); >>> -=09TEST_ASSERT_NOT_EQUAL(ut_params->op->status, >>> -=09=09=09RTE_CRYPTO_OP_STATUS_SUCCESS, >>> -=09=09=09"authentication not failed"); >>> >>> -=09ut_params->obuf =3D ut_params->op->sym->m_src; >>> -=09TEST_ASSERT_NOT_NULL(ut_params->obuf, "failed to retrieve >>> obuf"); >>> +=09TEST_ASSERT_NULL(ut_params->op, "authentication not failed"); >>> >>> =09return 0; >>> } >>> @@ -10940,13 +10949,7 @@ >>> test_authenticated_decryption_fail_when_corruption( >>> =09ut_params->op =3D process_crypto_request(ts_params- >>>> valid_devs[0], >>> =09=09=09ut_params->op); >>> >>> -=09TEST_ASSERT_NOT_NULL(ut_params->op, "failed crypto process"); >>> -=09TEST_ASSERT_NOT_EQUAL(ut_params->op->status, >>> -=09=09=09RTE_CRYPTO_OP_STATUS_SUCCESS, >>> -=09=09=09"authentication not failed"); >>> - >>> -=09ut_params->obuf =3D ut_params->op->sym->m_src; >>> -=09TEST_ASSERT_NOT_NULL(ut_params->obuf, "failed to retrieve >>> obuf"); >>> +=09TEST_ASSERT_NULL(ut_params->op, "authentication not failed"); >>> >>> =09return 0; >>> } >>> @@ -11149,6 +11152,7 @@ create_aead_operation_SGL(enum >>> rte_crypto_aead_operation op, >>> =09const unsigned int auth_tag_len =3D tdata->auth_tag.len; >>> =09const unsigned int iv_len =3D tdata->iv.len; >>> =09unsigned int aad_len =3D tdata->aad.len; >>> +=09unsigned int aad_len_pad =3D 0; >>> >>> =09/* Generate Crypto op data structure */ >>> =09ut_params->op =3D rte_crypto_op_alloc(ts_params->op_mpool, >>> @@ -11203,8 +11207,10 @@ create_aead_operation_SGL(enum >>> rte_crypto_aead_operation op, >>> >>> =09=09rte_memcpy(iv_ptr, tdata->iv.data, iv_len); >>> >>> +=09=09aad_len_pad =3D RTE_ALIGN_CEIL(aad_len, 16); >>> + >>> =09=09sym_op->aead.aad.data =3D (uint8_t *)rte_pktmbuf_prepend( >>> -=09=09=09=09ut_params->ibuf, aad_len); >>> +=09=09=09=09ut_params->ibuf, aad_len_pad); >>> =09=09TEST_ASSERT_NOT_NULL(sym_op->aead.aad.data, >>> =09=09=09=09"no room to prepend aad"); >>> =09=09sym_op->aead.aad.phys_addr =3D rte_pktmbuf_iova( @@ - >>> 11219,7 +11225,7 @@ create_aead_operation_SGL(enum >>> rte_crypto_aead_operation op, >>> =09} >>> >>> =09sym_op->aead.data.length =3D tdata->plaintext.len; >>> -=09sym_op->aead.data.offset =3D aad_len; >>> +=09sym_op->aead.data.offset =3D aad_len_pad; >>> >>> =09return 0; >>> } >>> @@ -11252,7 +11258,7 @@ test_authenticated_encryption_SGL(const >>> struct >>> aead_test_data *tdata, >>> =09int ecx =3D 0; >>> =09void *digest_mem =3D NULL; >>> >>> -=09uint32_t prepend_len =3D tdata->aad.len; >>> +=09uint32_t prepend_len =3D RTE_ALIGN_CEIL(tdata->aad.len, 16); >>> >>> =09if (tdata->plaintext.len % fragsz !=3D 0) { >>> =09=09if (tdata->plaintext.len / fragsz + 1 > SGL_MAX_NO) @@ >>> - >>> 11915,6 +11921,8 @@ static struct unit_test_suite >>> cryptodev_qat_testsuite =3D >>> { >>> >>> =09test_AES_GCM_auth_encrypt_SGL_out_of_place_400B_400B), >>> =09=09TEST_CASE_ST(ut_setup, ut_teardown, >>> >>> =09test_AES_GCM_auth_encrypt_SGL_out_of_place_1500B_2000B), >>> +=09=09TEST_CASE_ST(ut_setup, ut_teardown, >>> + >>> =09test_AES_GCM_auth_encrypt_SGL_out_of_place_400B_1seg), >>> =09=09TEST_CASE_ST(ut_setup, ut_teardown, >>> >>> =09test_AES_GCM_authenticated_encryption_test_case_1), >>> =09=09TEST_CASE_ST(ut_setup, ut_teardown, >>> -- >>> 2.20.1 >>> >>> --- >>> Diff of the applied patch vs upstream commit (please double-check=20 >>> if non- >>> empty: >>> --- >>> --- -=092020-02-11 11:17:39.986002596 +0000 >>> +++ 0023-test-crypto-fix-missing-operation-status-check.patch=09 >>> 2020-02-11 >>> 11:17:38.332000075 +0000 >>> @@ -1,8 +1,10 @@ >>> -From b26ef1a11f21ecde63582ed6db281c93ce9fbf23 Mon Sep 17 00:00:00 >>> 2001 >>> +From ce8302172f9f8e06833a49abf8b283a71b07dc3b Mon Sep 17 00:00:00 >>> 2001 >>> From: Adam Dybkowski < >>> adamx.dybkowski@intel.com >>>> >>> Date: Fri, 20 Dec 2019 13:58:52 +0100 >>> Subject: [PATCH] test/crypto: fix missing operation status check >>> >>> +[ upstream commit b26ef1a11f21ecde63582ed6db281c93ce9fbf23 ] >>> + >>> This patch adds checking of the symmetric crypto operation >>> status that was >>> silently skipped before. It fixes the wireless algorithms session >>> creation >>> (SNOW3G, KASUMI, ZUC) and passing of the digest @@ -11,7 +13,6 @@ >>> >>> Fixes: c0f87eb5252b ("cryptodev: change burst API to be crypto op >>> oriented") >>> Fixes: 77a217a19bb7 ("test/crypto: add AES-CCM tests") >>> -Cc:=20 >>> stable@dpdk.org >>> >>> >>> Signed-off-by: Adam Dybkowski < >>> adamx.dybkowski@intel.com >>>> >>> Acked-by: Fiona Trahe < >>> fiona.trahe@intel.com >>>>