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 E4BAAA0C56; Wed, 8 Sep 2021 09:04:45 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 67C4A4116A; Wed, 8 Sep 2021 09:04:16 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60056.outbound.protection.outlook.com [40.107.6.56]) by mails.dpdk.org (Postfix) with ESMTP id 71BA841167; Wed, 8 Sep 2021 09:04:14 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fPOmP+KxwDUfBM7Ol3cpI4F2xyExKXwXcWMIMV4KNDeghSRK3zMktxa2d+BQnWdF6tCA3TatiuO7Jhnp4i09ErMcyUx4cJwCZtwjl5AP0EKxsy3E6TktOHw8tpuWI82sTHAUJcq8rHh7ZCYxzO0WPK6bljL7OpRf8Ww0GDEC+X5P0T20XBtlHGX6A25GljB1HAgEdSkJPSHMoHM0oYFT4HHTQPEEetRjMCocU+PWmIJqzSwvyIMUZ5zYcJknq6rwViqASzPQh0C5GBa6wkiUWSYANiKHyNm1foWvgGKrQp92t4iUzSGJ4DYZhX1IVML96ojU3nOxuFQnaL5/iDX/VA== 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; bh=Dfwi0F0b/znP6RYWmOopmfjKTDxG/F0VJQzp5T3RuWo=; b=YezNU9GX/kO5qCJ29Xk2L5tDkPMzs0qyuraBfFpvRRFF3Mma+9muiNDryypHBYKW347383JoiVcoS0tXr8KzZm2X2K4imzbFPwUem81PwkcgmA1ouy/XDRN5xff2GvLRYDvKn7JhduQZOj11ufVyPMLFGW9waglmx9feuv17jL/fwiqj92K8ufr/mInhcMmZS/HhIJbf659y0V482vmspWij4/K6UMsethqrKZBcnT8pQ1yW6yptCrv6r+rXb5N/mswYrvUq/up8yovl/93sYd3+HGLBuZ8xzl3987OnDs5YrSZ84pK7CyzL1lx7fAZA//UV4ac68Ma6NbmaLZ5TAA== 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=DevqDw8b1YYQAUERc6bDv/aqNRHzBBB7EiC7VXgXi4ZBGJfYtfSSTU7Dx7vUZfRoATDw7Q/nJVAM0fPO6zTOzDeDfH+ON56upRMdtsAS7aKIDk3WTKE6wDuce8V09Sb4sBlFirhYpKUMi1+7X+q7kjD4kl7bBwhV+d8GCxEqBYM= 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 DU2PR04MB8709.eurprd04.prod.outlook.com (2603:10a6:10:2dc::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Wed, 8 Sep 2021 07:04:13 +0000 Received: from DU2PR04MB8630.eurprd04.prod.outlook.com ([fe80::945d:e362:712d:1b80]) by DU2PR04MB8630.eurprd04.prod.outlook.com ([fe80::945d:e362:712d:1b80%4]) with mapi id 15.20.4478.025; Wed, 8 Sep 2021 07:04:13 +0000 From: Hemant Agrawal To: dev@dpdk.org, gakhil@marvell.com Cc: Gagandeep Singh , stable@dpdk.org Date: Wed, 8 Sep 2021 12:29:51 +0530 Message-Id: <20210908065953.28349-8-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210908065953.28349-1-hemant.agrawal@nxp.com> References: <20210907083953.8948-1-hemant.agrawal@nxp.com> <20210908065953.28349-1-hemant.agrawal@nxp.com> Content-Type: text/plain X-ClientProxiedBy: SG2PR01CA0087.apcprd01.prod.exchangelabs.com (2603:1096:3:15::13) 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 SG2PR01CA0087.apcprd01.prod.exchangelabs.com (2603:1096:3:15::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Wed, 8 Sep 2021 07:04:12 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 75385f96-f0af-423f-6bef-08d97296dd6d X-MS-TrafficTypeDiagnostic: DU2PR04MB8709: 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: X0jXW7Q4FSMsZlsxLeeB3gY7wHLW1yVy7/2s7UYcX0V75k/vd83+3DQUfkM0wdMAudMk0yO+9XVioJFD0s0mlZpKtyfpUpkdjxR7LTcJPToHgqWmij16Yb1KS6uQ076Acg+aJwdrpSlni33EUSFd8UmSBAqrj9s9HjFEYL3n1tFxWiumfqTfkvtoKhQ0D+8wEoFEJSy4mgrgev4BOKdgUXOjpnVsV+HVreN8u7UBGOkMWvUf2a6DTlXMeqmPXi0CVYWGsEGPrmOKOzTRkvsh29SET7I4TezDhoMfSkl6Qc5E33f49fVt2jNJLeVPV5bJH623jP9pqqyhHJqerpunsjSdtDMRLOe/ss0bjDhVC+gkJjMGBPmja/P2SUAOG8m5OP1UF/djaANVZup8euLxgqvEDFbKqrKAQkB0fi3VyryUQS5TjtA/YnV5VOfaNAN13z5uLoL39PNcBTxfs4SJh6ELp8rpjMJEb8PTeCa+2THGJgSMCpu5TEsxWNTubH8aWQY5yOvoSCxKTBcdBKihsMcNI08kE9A2icT613dJOOdC4yy8y8guG9cjNL9Wsp089k6Q3xbPS3Mc/vWhGyKNFuepiATLnIvXNkP+18Qyht9yzmnYu2NMqaFUxx5T6ePu8w4FHitQlu3I2+3s40GxYZuXjddBeQU4ABZirDtNXNqliBUzITmDDaJN9dRPnDSdqkXdirRYdwwACvrHrswohw== 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)(136003)(39860400002)(346002)(376002)(396003)(366004)(86362001)(2616005)(956004)(52116002)(66476007)(2906002)(316002)(83380400001)(478600001)(6512007)(4326008)(38350700002)(36756003)(186003)(1076003)(26005)(44832011)(66946007)(66556008)(38100700002)(6506007)(5660300002)(6486002)(8676002)(8936002)(6666004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?521BF0Kw/QwfTdT3PxryS8iHnV95ktD+MWyDQCI9muBHvUP0c73AHHzHxgo1?= =?us-ascii?Q?2MVzUzC3bh/o1bz4gm8kTizoEuh8ZSM/c6VcOQxTYuZhtGlsa8yTO9ZaU3mg?= =?us-ascii?Q?Fz1iFBFfZuFVdI7fOmvWPfVaLvX8R66fTgyEMUWtVdyQQSZGG3fC3n9RuXqq?= =?us-ascii?Q?CYGmB5NjdSu3RKX0zPBsKeAleoATgObm6K/qNBpCzS7GgqcQHK4j2Bs4DAb8?= =?us-ascii?Q?M1aw4KMlej0JS+FHZjlzmvcnqVif8VyZmhQLpEpiRHP/0YGIcfyoFNpCDLjw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7PDuabN3OQw0YE0ABPTu/PgHmCFZ7BQ1eO4?= =?us-ascii?Q?CEDhp48ths8kb59hqqlbX6ReuyIAJEuI8MO6PtXbck2x102CZ+vOwltRR75+?= =?us-ascii?Q?yaNwumF96cWKPcwBE7IMQ5+rGWRlCzyZRr1gu2MddN1NNFkqP0+h0i8MLFNO?= =?us-ascii?Q?0eukA+yowMEWQohqBW/clFFO?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 75385f96-f0af-423f-6bef-08d97296dd6d X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8630.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Sep 2021 07:04:13.8498 (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: RqhkNHARYCX/DgobSH0TkvKDfgI50WXAw9mNDR9lJ3NzNcVGRMdmtlP3eT5owd7kK4XZZ9FQUyT2tDznmOEHKQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8709 Subject: [dpdk-dev] [PATCH v4 08/10] 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