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 152D0A0C53; Wed, 25 Aug 2021 10:23:10 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 48FBA4120F; Wed, 25 Aug 2021 10:22:30 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60070.outbound.protection.outlook.com [40.107.6.70]) by mails.dpdk.org (Postfix) with ESMTP id 254DE41204; Wed, 25 Aug 2021 10:22:29 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J+KtUy7cW92Wxmva/Nod90GMwwLCgPcWFO5DK1nikot7BXFXl2GcMiWnSsDWp0HBpV1Gkf01k9+C8tf/0hqDjx9tpjy4QTBNPoTNCMJMHqh6ojd/PUYY6cykGov3s9ZuJhnZfi3qb0P3PFKrXFrDqInuq4TZM0xFYYi+5AxKHjVTFoMdJwhx8qoGVQGZho3O+oMNtfDSh2Tkn+cL9BLfI9ACVtzTt77kYBzso1cSZlojL+6BrehnEkS+QxgFM2Ba+Q4uGaa4JU4WVQmw5c/JDbGkGDGEJiVSEfS//hrOPF0RO6ak3deS2fZMqrG0HNjD0ZH9nuB2V0McL0pniRNb6A== 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-SenderADCheck; bh=Dfwi0F0b/znP6RYWmOopmfjKTDxG/F0VJQzp5T3RuWo=; b=LnunVXzQyzER2x+bsWSo1WqFZ/4u1icFJAkFfCb8d0tLW78ku7IfTyJqFIrKGgnRyEp1N8jAY7Ez+lyPdSsiU9BUWGJ+FzkO6Y9df4GHwYIDHtWYt54JDnU6dz+mxsuIks/l4ktQvEeSblQP8CRHqEe+LBKxGTbnSCDrCtzCLzS/Yu13x9eaSAvAIdiWp36fMPIM089tuPygHKiZClX5XfP+AvVqewYNSzvenhMKhfvyMa4uK7SXhwFk/n65HGxKd8hhFZmHbCKEXSWm4MDm5PImBg1JE+3dFX6t0C62IGSkfzV2dlqhB9ynueEbTqxfgkpwiqaS7DZ/0quydXE8gg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Dfwi0F0b/znP6RYWmOopmfjKTDxG/F0VJQzp5T3RuWo=; b=WPyJZ9eAQ7zOMhRlPyX4oYbKH5vPgBivDvuRVajpeLZzKi5tkMXWZdrV82kzLLAW0W6js9q+vjChwcCkvongpxhFZ9ogF5Q5/9CC0ikpKHz1rO/4Ivl4Dfy/Lw97qVYgVng8VIwDJ1/HX8FtA+ggHsUJ9p2ImGB2wKyKG2P0nfQ= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=nxp.com; Received: from DU2PR04MB8630.eurprd04.prod.outlook.com (2603:10a6:10:2dd::15) by DU2PR04MB8934.eurprd04.prod.outlook.com (2603:10a6:10:2e1::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.17; Wed, 25 Aug 2021 08:22:28 +0000 Received: from DU2PR04MB8630.eurprd04.prod.outlook.com ([fe80::2590:514a:df1f:a793]) by DU2PR04MB8630.eurprd04.prod.outlook.com ([fe80::2590:514a:df1f:a793%8]) with mapi id 15.20.4436.025; Wed, 25 Aug 2021 08:22:28 +0000 From: Hemant Agrawal To: dev@dpdk.org, gakhil@marvell.com Cc: Gagandeep Singh , stable@dpdk.org Date: Wed, 25 Aug 2021 13:48:35 +0530 Message-Id: <20210825081837.23830-9-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210825081837.23830-1-hemant.agrawal@nxp.com> References: <20210721073920.21893-1-hemant.agrawal@nxp.com> <20210825081837.23830-1-hemant.agrawal@nxp.com> Content-Type: text/plain X-ClientProxiedBy: SG2PR02CA0106.apcprd02.prod.outlook.com (2603:1096:4:92::22) To DU2PR04MB8630.eurprd04.prod.outlook.com (2603:10a6:10:2dd::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from dpdk-xeon.ap.freescale.net (92.120.0.67) by SG2PR02CA0106.apcprd02.prod.outlook.com (2603:1096:4:92::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.17 via Frontend Transport; Wed, 25 Aug 2021 08:22:26 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 31313e86-fbc6-4b74-62ac-08d967a179c4 X-MS-TrafficTypeDiagnostic: DU2PR04MB8934: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:747; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dtHZ2qfSASCxS+5XTcCOUQh5HHXSMbMb5Y5xX/RTB65rO3bGognXlXYTVlBKITYoSQxCA7MJPXJZvQ7ZyS79jdz1A0beN0eVty13sLP/ppq8ltMfczZsjXRX6znGHXwYUmyMyDa0H44rAqEMAHYHKahGeNtPIbfUU+GQ19//g8B6tALKeT7X1EPp5hrIc0KDkpV+pzjRWla5ScPUn0LfGpgjbdefeMh1FLH27tQeT32zNmJ8h6TRVuFcsD1y3vyKOPVfJWnAV+vowDsqZ+e77brNvdBtPg3/gbFnkw/QGGJqlZ4Am6+eCjmOEnpuJPQC+C85UOuC9NUlaZf0G+kY2+vHtc73hACyD5CDQO85cyarxSaex4tHRiB0wQwqVk2ktfx3W01vbTJ0DqLAIGJWgs/9szLBHmDDt0v4NdyIsGjWn+c4NowFKBHov5UMsmRLIkoDLeu6JtT8mNOynWrmgjhNuIxcqdguN/CGlGsc306RQCmrYP3ZO6LznnW6fUk9HFSkmkY01mULohUm65Nta9Df6Q8PEeBQoRp5eDlDLvwJBdVsP9KaB58uL2vIfcaa5MAVII1g+2QZ5XGwfyXZJbQW+NElhlhl41JJWPBQwHz1gtEBeE2irP+bjEaCZ4FIqr1XtMqbYWg0R2FsK5OVpXDzBpKOrvmHtn0Qqwinl42lNzSFws8Ltcn5A1lO+E3MDeKuMbCp7djGd94CCVIPHA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU2PR04MB8630.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(366004)(396003)(376002)(39860400002)(136003)(6486002)(44832011)(6666004)(316002)(26005)(4326008)(5660300002)(6512007)(2906002)(186003)(8936002)(36756003)(38350700002)(38100700002)(478600001)(52116002)(2616005)(956004)(66476007)(66556008)(86362001)(8676002)(1076003)(66946007)(6506007)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?r+Pgp7P4o/+FZIpEXNWu2sM6DG/n7Zr+41PjM3XZe3VwvshY2T38ZoDW50Db?= =?us-ascii?Q?sQiUQoz81sfPCmRdPlerI3OhcvEsPme4lYYqnqchPl9Fs6XoFI6aONwZ2BdU?= =?us-ascii?Q?8ph6bxZvG1dN4QQHb+sX9AjsFP4TyK7SjNwylg3SOA8m2cB/ifZ0Tdnz7Qft?= =?us-ascii?Q?l5GfAqCoVee4L+nq7XSfrSmeXDY9MaydTY8RfSeLY8qre0wsZjSbemv7aG3g?= =?us-ascii?Q?mmTsCranxBeq8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fXomlnDoRoQvSmdv3dBiR7?= =?us-ascii?Q?p9RiVDGl4i5HOUWHomGxxtOxMahwtac0SejbYcutACZFnTBTEu1qJQ+UZS5k?= =?us-ascii?Q?bBwMbdpF/SIR6QeENop4BSsVEkRmuFz+2hWsqrVVNZFySHD8/KsW0iAIYUtI?= =?us-ascii?Q?D4stdG/HZvpzkRm4dthV/C75DDPlLQ/MlPbMBtGk1ViKK7krHB0Z9Sv5/qd8?= =?us-ascii?Q?JqHmiWxuU4VEBRjRb41GvHO+?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 31313e86-fbc6-4b74-62ac-08d967a179c4 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8630.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2021 08:22:28.4400 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: zOUF2wuEjuNVXJcLRqqUdGvytTS9RQdil+k7K6uJtSrDituwnuxcArsPMdRTXk+Ukr9n46zeE+iZHAzB1v3LrQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8934 Subject: [dpdk-dev] [PATCH v2 09/11] common/dpaax: fix IV value for shortMAC-I for SNOW algo 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 Sender: "dev" From: Gagandeep Singh The logic was incorecly doing conditional swap. It need to be bit swap always. Fixes: 73a24060cd70 ("crypto/dpaa2_sec: add sample PDCP descriptor APIs") Cc: stable@dpdk.org Signed-off-by: Gagandeep Singh --- drivers/common/dpaax/caamflib/desc/pdcp.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/common/dpaax/caamflib/desc/pdcp.h b/drivers/common/dpaax/caamflib/desc/pdcp.h index 5b3d846099..8e8daf5ba8 100644 --- a/drivers/common/dpaax/caamflib/desc/pdcp.h +++ b/drivers/common/dpaax/caamflib/desc/pdcp.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: BSD-3-Clause or GPL-2.0+ * Copyright 2008-2013 Freescale Semiconductor, Inc. - * Copyright 2019-2020 NXP + * Copyright 2019-2021 NXP */ #ifndef __DESC_PDCP_H__ @@ -3715,9 +3715,10 @@ cnstr_shdsc_pdcp_short_mac(uint32_t *descbuf, break; case PDCP_AUTH_TYPE_SNOW: + /* IV calculation based on 3GPP specs. 36331, section:5.3.7.4 */ iv[0] = 0xFFFFFFFF; - iv[1] = swap ? swab32(0x04000000) : 0x04000000; - iv[2] = swap ? swab32(0xF8000000) : 0xF8000000; + iv[1] = swab32(0x04000000); + iv[2] = swab32(0xF8000000); KEY(p, KEY2, authdata->key_enc_flags, authdata->key, authdata->keylen, INLINE_KEY(authdata)); -- 2.17.1