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 D0D3BA0C41 for ; Tue, 30 Nov 2021 17:39:23 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C57D541142; Tue, 30 Nov 2021 17:39:23 +0100 (CET) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id CDAFE410F7 for ; Tue, 30 Nov 2021 17:39:22 +0100 (CET) Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (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-1.canonical.com (Postfix) with ESMTPS id A139240009 for ; Tue, 30 Nov 2021 16:39:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638290362; bh=+oH3mFclYfbXS7oBrCPTAeNSO/AxDCa4v90nSy0zx0s=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Qegq4P7Lo8Yi8hxvW3j5SVaP7m3MumnB+UlaGufI7En8iy8/ryxaDN+atNFWhl3Pm JkWxS44ATyOQbxV7gKXzTjnivtZT6yv0qEcX7I+LFRG0ub1EYl8j6sCVtgb7Ugw0mr QO+TACZyrwQDVIqyOK5bUtJHwLr+4L7VjbliQxxUWHIFoL7VocX7A1yLjHgktTCu9K DswV/+Vf5NHv9/hq7Vln9qaONHPUx7mPqIx1ph2moDBlq9QaSKPmLptzqrf9XNFzox mfKXD+DeWBUrNmF3hR9pEdSn1M2GSVnjI2NyB3FA3oLE/A5gMhtNB1+urX2YvPDD9Z /wc7d4ZZgNSVA== Received: by mail-ed1-f71.google.com with SMTP id a3-20020a05640213c300b003e7d12bb925so17545158edx.9 for ; Tue, 30 Nov 2021 08:39:22 -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=+oH3mFclYfbXS7oBrCPTAeNSO/AxDCa4v90nSy0zx0s=; b=Cyg3tlEhb5TP/AP2lWnMBRHdHEh1Qp1u+4ufKXxTFUjo5GcJ/yxcWcLEMZTs7LuWsa 6lj0Mp44vMR4DYNUG3FGbK14PzPkp3O7qdPFOnUB0LWFNgNoUJ7NFkIpGedvRYIeA3Vj +IFuiNslm552p/BaFIbEyIP/xSdmCGlPyGRD+7AFK8USqPJbDduh8rsGtntocFutwvHS MPwf3VWOClwxULfRq6jt2eQDh5kHL554SRHV8V3rNOZiebewdxhZYVsV2EEy8xGeAr3+ voy1t9vYnZk0ozJ6k+ctNdDeTdlOtmr1SVzLwid2rJ7bLu1vjTf1hSeesjce+t80Uzox jZ0Q== X-Gm-Message-State: AOAM532areiig/CgIEjZTlkrWGN06QsRz4PqXFqm3gbzeaPoEjM8BnJW Fde8fNZxZXaUm6nt7pPg0B8NN2cxDtPtygft8DICcpTF8KiVoGr1pA0IBrQAtoxAVKOaEr/FmYZ f8WLa/KLjPsZfzDzLPI4lIcFU X-Received: by 2002:a17:906:a0d7:: with SMTP id bh23mr280899ejb.82.1638290361997; Tue, 30 Nov 2021 08:39:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJyQLk2WtKRZDaVHqPxOCLEx3EVFqjAMlOJhu4ykFCdL1wPGcdslS7bHa4VwNPyz6XWOP8lz7g== X-Received: by 2002:a17:906:a0d7:: with SMTP id bh23mr280873ejb.82.1638290361779; Tue, 30 Nov 2021 08:39:21 -0800 (PST) Received: from localhost.localdomain ([2001:67c:1560:8007::aac:c4ad]) by smtp.gmail.com with ESMTPSA id f7sm11590549edw.44.2021.11.30.08.39.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 08:39:21 -0800 (PST) From: christian.ehrhardt@canonical.com To: Shijith Thotton Cc: Abhinandan Gujjar , dpdk stable Subject: patch 'test/event_crypto: fix event crypto metadata write' has been queued to stable release 19.11.11 Date: Tue, 30 Nov 2021 17:34:25 +0100 Message-Id: <20211130163605.2460997-61-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/03cbc1d238e872c2f67fdf6a24fd9974f2c8ab94 Thanks. Christian Ehrhardt --- >From 03cbc1d238e872c2f67fdf6a24fd9974f2c8ab94 Mon Sep 17 00:00:00 2001 From: Shijith Thotton Date: Mon, 27 Sep 2021 20:59:13 +0530 Subject: [PATCH] test/event_crypto: fix event crypto metadata write [ upstream commit 67c8baecaee2ef312330102544b1f1e892a95502 ] Using memcpy to update event crypto metadata fields (request/response) will result in one overwriting the other. To avoid this, fields of each structure should be updated one by one. Fixes: 3c2c535ecfc0 ("test: add event crypto adapter auto-test") Signed-off-by: Shijith Thotton Acked-by: Abhinandan Gujjar --- app/test/test_event_crypto_adapter.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c index b30e0f8f3e..fe016fec7b 100644 --- a/app/test/test_event_crypto_adapter.c +++ b/app/test/test_event_crypto_adapter.c @@ -208,10 +208,10 @@ test_op_forward_mode(uint8_t session_less) if (cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA) { /* Fill in private user data information */ - rte_memcpy(&m_data.response_info, &response_info, - sizeof(response_info)); - rte_memcpy(&m_data.request_info, &request_info, - sizeof(request_info)); + m_data.request_info.cdev_id = request_info.cdev_id; + m_data.request_info.queue_pair_id = + request_info.queue_pair_id; + m_data.response_info.event = response_info.event; rte_cryptodev_sym_session_set_user_data(sess, &m_data, sizeof(m_data)); } @@ -227,10 +227,9 @@ test_op_forward_mode(uint8_t session_less) uint32_t len = IV_OFFSET + MAXIMUM_IV_LENGTH; op->private_data_offset = len; /* Fill in private data information */ - rte_memcpy(&m_data.response_info, &response_info, - sizeof(response_info)); - rte_memcpy(&m_data.request_info, &request_info, - sizeof(request_info)); + m_data.request_info.cdev_id = request_info.cdev_id; + m_data.request_info.queue_pair_id = request_info.queue_pair_id; + m_data.response_info.event = response_info.event; rte_memcpy((uint8_t *)op + len, &m_data, sizeof(m_data)); } @@ -401,8 +400,7 @@ test_op_new_mode(uint8_t session_less) if (cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA) { /* Fill in private user data information */ - rte_memcpy(&m_data.response_info, &response_info, - sizeof(m_data)); + m_data.response_info.event = response_info.event; rte_cryptodev_sym_session_set_user_data(sess, &m_data, sizeof(m_data)); } @@ -421,8 +419,7 @@ test_op_new_mode(uint8_t session_less) uint32_t len = IV_OFFSET + MAXIMUM_IV_LENGTH; op->private_data_offset = len; /* Fill in private data information */ - rte_memcpy(&m_data.response_info, &response_info, - sizeof(m_data)); + m_data.response_info.event = response_info.event; rte_memcpy((uint8_t *)op + len, &m_data, sizeof(m_data)); } -- 2.34.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-30 16:50:09.540842639 +0100 +++ 0061-test-event_crypto-fix-event-crypto-metadata-write.patch 2021-11-30 16:50:05.726873060 +0100 @@ -1 +1 @@ -From 67c8baecaee2ef312330102544b1f1e892a95502 Mon Sep 17 00:00:00 2001 +From 03cbc1d238e872c2f67fdf6a24fd9974f2c8ab94 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 67c8baecaee2ef312330102544b1f1e892a95502 ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index 3ad20921e2..0c7ebe6981 100644 +index b30e0f8f3e..fe016fec7b 100644 @@ -23 +24 @@ -@@ -212,10 +212,10 @@ test_op_forward_mode(uint8_t session_less) +@@ -208,10 +208,10 @@ test_op_forward_mode(uint8_t session_less) @@ -38 +39 @@ -@@ -231,10 +231,9 @@ test_op_forward_mode(uint8_t session_less) +@@ -227,10 +227,9 @@ test_op_forward_mode(uint8_t session_less) @@ -52 +53 @@ -@@ -405,8 +404,7 @@ test_op_new_mode(uint8_t session_less) +@@ -401,8 +400,7 @@ test_op_new_mode(uint8_t session_less) @@ -62 +63 @@ -@@ -425,8 +423,7 @@ test_op_new_mode(uint8_t session_less) +@@ -421,8 +419,7 @@ test_op_new_mode(uint8_t session_less)