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 98146A00C4; Tue, 26 Jul 2022 05:38:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8C02240DDD; Tue, 26 Jul 2022 05:38:33 +0200 (CEST) Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2087.outbound.protection.outlook.com [40.107.117.87]) by mails.dpdk.org (Postfix) with ESMTP id 49C3140695; Tue, 26 Jul 2022 05:38:32 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DlofCdpvsvllq3PEOPLxHLoXiorTl6kSVywiza/2gTVTZUY1+wAHeXCiU/lgnCU2at/eQE8kDCkQ+H3aW+gwOIfEVGCar4dFge0+uRwlZp4TCCbOFiSEBSsZLzXXZ9jgmR4CTMIq0l8JRczJ4SZ1ZUqHvCRTQRyaCPY+6WTbhDVeBNjdr4YWF6IjFx+/LIKndhoKa53LOfRJvt5u+oEutwT4Uokjh5LMffakN11zuONCkJ/REnkuuaoLet9vwd/3WSxP01V65ecHM9EMJ5w7tQR/ntH4Tmj8LAsedk6MwoZeJ3MV2Ur8qm8yYUsumzkkDAL1xjDuQvgJVODa0d3cVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=V3scSoZUz0fhkCCwMAPcA189bcCO4mO/CnR/mEhJv38=; b=Ur6Lqwn4Uw20ejWtDSl555UG5Dc0GSjFmyjB2Wh8XJwJ5LozhdLJrvqgMkZuu9w+e75UPqHLNfOz3JW3dLK9YDUlM6p4UCLZSEyNVG7Uv4vU46+s95Xp0uQ8Co6/jYAX79zpEM0dNnzOoAjlfCCvxmX4Rectoywz8Fv73+s3IMIwnqWG0FRZXUCBIwFnQBSCL58OshK1gOJIp4416uWzwpTSTkyZklmCUMaoP8/8PnUCjgcJJw9I//M/VtGGyW1crZ0OfTz/NBBNRJ2gVvxPURNLvLVKicS6LsDzghdw7I3QN7DnoPsecoXYJkks/tw29bEOZtOu6OPRFbsBmrP34Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=jaguarmicro.com; dmarc=pass action=none header.from=jaguarmicro.com; dkim=pass header.d=jaguarmicro.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jaguarmicro.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=V3scSoZUz0fhkCCwMAPcA189bcCO4mO/CnR/mEhJv38=; b=jo8yyNUIMKIQr7jOPqtzTY3rjEaB2f9aOJqYSP+A0aolZkLnU3RImwd+3Ze9e5kzBnETg8OtiiQPQhFFR2zUPu5uPd3JVA1Aq3xo4ns3l5fMjuTMHU7oEeox9MflV7CM9em5nWfbX3XRGn4uj573cJF2k47O+RvFrUwW9/vfKKB0MAWopklQjzzaIKmDqphkfmBNKbukEZSnlYPwFsYnyYe6b9D+cUbRt+5OqMy5fw7CSmmyBZSbTKirLdVplOh3G7hdpRaCVj0eFdGOqaBT/yXUowBUBIfwPnQHJfufOeB6N2rDVa5b2IfsaFSqmTDX1c3P/2BAQ8TJAecnXrIeaA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=jaguarmicro.com; Received: from SI2PR06MB5266.apcprd06.prod.outlook.com (2603:1096:4:1e5::11) by PSAPR06MB4421.apcprd06.prod.outlook.com (2603:1096:301:8b::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.18; Tue, 26 Jul 2022 03:38:29 +0000 Received: from SI2PR06MB5266.apcprd06.prod.outlook.com ([fe80::40a:642e:110b:b721]) by SI2PR06MB5266.apcprd06.prod.outlook.com ([fe80::40a:642e:110b:b721%2]) with mapi id 15.20.5458.025; Tue, 26 Jul 2022 03:38:29 +0000 From: Sunyang Wu To: dev@dpdk.org Cc: gakhil@marvell.com, roy.fan.zhang@intel.com, stable@dpdk.org Subject: [PATCH] test/crypto: fix the bug of wrong debug messages Date: Tue, 26 Jul 2022 11:38:19 +0800 Message-Id: <20220726033819.9464-1-sunyang.wu@jaguarmicro.com> X-Mailer: git-send-email 2.19.0.rc0.windows.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2P153CA0015.APCP153.PROD.OUTLOOK.COM (2603:1096::25) To SI2PR06MB5266.apcprd06.prod.outlook.com (2603:1096:4:1e5::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 404cc228-e017-4ed4-a8e1-08da6eb84e6c X-MS-TrafficTypeDiagnostic: PSAPR06MB4421:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JvQi5J7AZnqcaQHenG7IsUMwqv5Pn+S7RZDtUF9A/aR8+jY3dEzCCjJUbR/XefS6wNxC3sg2UbgxkBSpc0VIWFnkmzEc3vYLy5s+ZckxGlGvT8MeM0xXlWQp3MkCMc5TH2Rm09f2YaEmYNSOkK6Jx+ev7c893DzpuaeizSOmpaoHc+TwdimeXGdPjVBe1Aq8xF0CSTOvOjETYsuYAh3TTIFWSanG/N73B0rgrf5NegqHRBImy0cQjFoWM2P3PEwnOt95bO9/GakcsJ5QSEIdO0nmQ/0XydUPHvW1z/21IPzWw/DFdmc3rsoUaWi/uC7Eggdp6obVUO8F0UzmWIw9NHK0wv+bTrDAwXxupEFzNtC6KHWN/VE+jqOx5zfMAEWi0QciDHwzqINZa8QhSxXXhOZmffU4K7e1N1qza6j3OqCsq2NQLCg9hI3iakYhwK0P14VTYGZQlQwHU6Q1kEjk09IELf9zkAe8npReDlnSa9FbvWAH8Kk8NY9Y2piNNovMX+Me6C9DGGyxdH9B1Z4uOgzehWDtaoPbghZSQs1YnfsblmqGTD8YPS77yYptzjXe+aRLxTb0LWZ2TmOh1wB35sy+qAwVALlzIYSfWWtPYuOl6H/87vbwmNoQesKTx7/wiLL9y+ziI9o8te04UL3dcJU1mVKgVs2DynOzizMWlgx61FVickDCQ5bvG3JlMPgclIJiIlfTTSc7lFSoa5cErz8Ip6RGqyCb+UH6WsOR4iDkAm0sPqY8cSVHi7zU1A6My+MFJDTM17a6ws00m5y67hmmRpNUhfcim5/wh1XsyUU= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SI2PR06MB5266.apcprd06.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(136003)(346002)(376002)(39840400004)(366004)(396003)(316002)(38350700002)(15650500001)(38100700002)(36756003)(86362001)(66476007)(83380400001)(66556008)(8676002)(66946007)(4326008)(52116002)(8936002)(41300700001)(6666004)(6506007)(186003)(2906002)(478600001)(6916009)(6512007)(2616005)(6486002)(5660300002)(1076003)(44832011)(26005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?ocKCzYbZvoaNyC4OZCP2QN4yvSDK32jZwPQ0uEeiNoEhRt5iUDLBydhgXK94?= =?us-ascii?Q?e4a6ht4jF2KefamlLHfGrDETsVeeZ/0NnXfbXVNISOxlXzIqw6W7EIlF+W27?= =?us-ascii?Q?HMqViRi1VBYz83T9aQUf7B8s/bfZJAX0X3SKhDZFK4cNS6WAP737IbgmZ25a?= =?us-ascii?Q?7ZtoE5PtmjrpRrsgLkB5VALub4MLevYqNmcanfF81mOHxqnLjkBjaHHhg5eW?= =?us-ascii?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baI+7a4Tai?= =?us-ascii?Q?f4VpPqI3x5rV0Q+XzTW4VZPMfYkAoRUdfQaMtv47Kclqzf2RN401N0lbxXC9?= =?us-ascii?Q?Qs/Fx3R20HelV05JEDWgnlo81/VKZNbmP4yixK8QCqJ8COEaOcti6tT2W4H6?= =?us-ascii?Q?P1fFAzDflBZUBzRapJrE1vaXEmVMfOyArtmM+am7heZgFqAOyhOZ5axNq/8T?= =?us-ascii?Q?clF4TjR1ghzmekh7h0QRJxNcaVB7Zu2kLJfQzc18j7yiHo9u2M4a38eo/5f7?= =?us-ascii?Q?K4Peg5jiml8PJwi/TTh5RYkkVrqMPsHu3b6YAaFGtMCyIown1tZpp7fc1PkC?= =?us-ascii?Q?T1DoKV0aIz03lVSvB7lQrgF+ejhTM3TJvyq3x+HPJ8XC0gi5Acce9DBwDFlo?= =?us-ascii?Q?e+Uug2om62vA++UI3PQECb/47tynvfN30RvLMokZh1ONPFMAbLRu2RoEwXFp?= =?us-ascii?Q?bvSSujvKbwaLKc0S9OpcVhYTgw3PfdQ5xem2hAsWbyj/5Z4ZfNxydmCVjAD1?= =?us-ascii?Q?ww=3D=3D?= X-OriginatorOrg: jaguarmicro.com X-MS-Exchange-CrossTenant-Network-Message-Id: 404cc228-e017-4ed4-a8e1-08da6eb84e6c X-MS-Exchange-CrossTenant-AuthSource: SI2PR06MB5266.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2022 03:38:29.6534 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 1e45a5c2-d3e1-46b3-a0e6-c5ebf6d8ba7b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: GkMGuSoGvS+La0jdVyoo5RlqmHemIdqoGtnPek6X0bzJhAPnvs5SAIcxEXFeQnAsbsmWbpkaBZuFTsDAncqZbWeIscw74lu62SYoFNLYVaY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PSAPR06MB4421 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org When the queue_ops_rsa_enc_dec function is called, the plaintext will be printed twice instead of both plaintext and ciphertext. When the create_aead_operation function is called, the contents of iv and aad will be printed incorrectly. This patch fixes the issues above. Fixes: 77a217a19bb7 ("test/crypto: add AES-CCM tests") 5ae36995f10f ("test/crypto: move RSA enqueue/ dequeue into functions") Cc: stable@dpdk.org Signed-off-by: Sunyang Wu Reviewed-by: Joey Xing Reviewed-by: Qingmin Liu Reviewed-by: Lei Cai --- app/test/test_cryptodev.c | 4 ++-- app/test/test_cryptodev_asym.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 69a0301de0..54ce306b42 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -8287,7 +8287,7 @@ create_aead_operation(enum rte_crypto_aead_operation op, rte_pktmbuf_iova(ut_params->ibuf); /* Copy AAD 18 bytes after the AAD pointer, according to the API */ memcpy(sym_op->aead.aad.data + 18, tdata->aad.data, tdata->aad.len); - debug_hexdump(stdout, "aad:", sym_op->aead.aad.data, + debug_hexdump(stdout, "aad:", sym_op->aead.aad.data + 18, tdata->aad.len); /* Append IV at the end of the crypto operation*/ @@ -8296,7 +8296,7 @@ create_aead_operation(enum rte_crypto_aead_operation op, /* Copy IV 1 byte after the IV pointer, according to the API */ rte_memcpy(iv_ptr + 1, tdata->iv.data, tdata->iv.len); - debug_hexdump(stdout, "iv:", iv_ptr, + debug_hexdump(stdout, "iv:", iv_ptr + 1, tdata->iv.len); } else { aad_pad_len = RTE_ALIGN_CEIL(tdata->aad.len, 16); diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c index fc1a727472..9da54530e5 100644 --- a/app/test/test_cryptodev_asym.c +++ b/app/test/test_cryptodev_asym.c @@ -208,8 +208,8 @@ queue_ops_rsa_enc_dec(void *sess) status = TEST_FAILED; goto error_exit; } - debug_hexdump(stdout, "encrypted message", asym_op->rsa.message.data, - asym_op->rsa.message.length); + debug_hexdump(stdout, "encrypted message", asym_op->rsa.cipher.data, + asym_op->rsa.cipher.length); /* Use the resulted output as decryption Input vector*/ asym_op = result_op->asym; -- 2.19.0.rc0.windows.1