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 4D8DBA0C43; Thu, 26 Aug 2021 13:23:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 779A44120F; Thu, 26 Aug 2021 13:23:38 +0200 (CEST) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80041.outbound.protection.outlook.com [40.107.8.41]) by mails.dpdk.org (Postfix) with ESMTP id AD8B54120E; Thu, 26 Aug 2021 13:23:37 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KsAUs0RzyiWk4OL30+nxS6ZHNv9X/GrK4dBtMfqGKlKio1xbAIqJ7ks+NFaFDuZwnLX6Kad56TWTQU7hhj5SNnxSTn/uyN4enzZA2H+CFWE4hKekoD4ffyn2limXSaTBO0GvxO0YOHN6IYsCSel0+3acJjAEuqJq6yfyasvb7KTfGmWbWGX483YhSO4nkEO0bczy7RluH2S50cTTsXatGbRhYdHhCkewCRa6CIhbRX1uCd+GjlwadxIoq9HzmKmEnO+yXJGYyaRbrRfSwkwV++Wu6oFyLWR/eFoHQ9tE3b4ji339pFsDc1l4ldPSmqaa3kT8a5flbNPyxRpwo24Lkw== 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=F5JhijWtwz5QU6tHosnZDKAravUDY169JdzOjxtWMpQ=; b=Aj8CjWJcUIMS3tyOBDhe8SFdpdSpx3WHgYBVFXdCtnQYnGvZK5gaKey3vmYlhRaf2OINe/5iwFWMkomG7zWmeBhFwLXkR9kuP8EKUi2WXnf8DY3QxEOHxeigq3kZ890nUHMG4z1EKlVVwtf1kD/4bMXzQk1z7nAtoe0iWhOAXdh1laTtca9Hs0cdpO2hhvrBz0jC9CTfc0WGScV8PKTxEhvWQzg2cAwrJTp5pEUOi3gIX9JgcpN0VLrbxm80UIATh/312p49bC1hYxwV9YF/lEsavAmu0HxJlzBkIkh4R9QQDRSGp7PNBvEKv8BaZyVa5NUhZiFqICGZlcop+B2Waw== 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=F5JhijWtwz5QU6tHosnZDKAravUDY169JdzOjxtWMpQ=; b=Wf9zdp6AFKjGpOpIdRXimHb/jW5Lje3sdr66Gw2bFYP5iq5pWVlTXpkbBiT3ctrI+iRGbOD/HBLjeSGY5aqIsSK4/MgXDLRutzMYxa4AJfL1iipNXlogNZgB+slbnkxdZ//buXtXKRxuo5Za6kywvUno84JEUTjpzIViicLhx9U= Authentication-Results: marvell.com; dkim=none (message not signed) header.d=none;marvell.com; dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB6960.eurprd04.prod.outlook.com (2603:10a6:803:12d::10) by VI1PR04MB4477.eurprd04.prod.outlook.com (2603:10a6:803:6e::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.20; Thu, 26 Aug 2021 11:23:36 +0000 Received: from VI1PR04MB6960.eurprd04.prod.outlook.com ([fe80::d496:fcce:f667:7aa7]) by VI1PR04MB6960.eurprd04.prod.outlook.com ([fe80::d496:fcce:f667:7aa7%8]) with mapi id 15.20.4457.018; Thu, 26 Aug 2021 11:23:36 +0000 From: Gagandeep Singh To: gakhil@marvell.com, dev@dpdk.org Cc: thomas@monjalon.net, Gagandeep Singh , stable@dpdk.org Date: Thu, 26 Aug 2021 16:53:11 +0530 Message-Id: <20210826112315.1375237-2-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210826112315.1375237-1-g.singh@nxp.com> References: <20210826112315.1375237-1-g.singh@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR06CA0179.apcprd06.prod.outlook.com (2603:1096:1:1e::33) To VI1PR04MB6960.eurprd04.prod.outlook.com (2603:10a6:803:12d::10) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from lsv03457.swis.in-blr01.nxp.com (14.142.151.118) by SG2PR06CA0179.apcprd06.prod.outlook.com (2603:1096:1:1e::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.19 via Frontend Transport; Thu, 26 Aug 2021 11:23:34 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 844bd538-53d4-4cf1-cd5c-08d96883f1ef X-MS-TrafficTypeDiagnostic: VI1PR04MB4477: 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: kBlxKtCdHEer13b+PUI2pajsg7UTb0auut6JhZ2tUgQwC5RyiW6X42ZpToWmI05hfJFcVwWcYbWu1duYcIZAqbjLEyfwWTxjYXpmomceMs4lsZKDjH8ktMWWBy2MhvRDGqia9CfH0EI9jZ09AV4OR9wwHgSwI5Q48mgRb4AJdBisViRobMqOwPxCIygw2YgmyzDIDVSwDJ9sbzt/f11d+ksPNYIxv+AZkjxerauubpdMuKkMfPJaW78iSpX8DcPHCh9by2V17I95ZXpRslhOqoo6BaitsLcX/plVSHUyKtfp6pwrebPLrYH23e3fPeQqkGbWnBZgQPkvRECSumf5lbrkoZK3oe2IBj2aF0bg50gZuDVovf3MlCUzlXVIGmxjB1TcjQOd217XJP6N2Dylj2WLSufnfVdNputcnT4kw3YW6gJkvvLQBocJiqM105aBpsya3QH3kBAdFa5dZ2o3wN1STMh8Nj8zEtHgBJJCPqOjPl5ydHaz0Nb8Apsn6Bs2vM/9MFuOihJHzn41cuQJxtP8knFCQ9EfoX9doUaf3MGDEWHqcSpkwLQxgpkVI2xBi9jjrQ7mgb0aAIC5bphezpCWhlNv0lZ2TCIdpzzs8YXOv+d5zD57WySDyOWRHw+Q523FBVKdiq4HkTf7e+YSlgARN3SheQioDwuYknOOL2EnFk9W7VOYMe2qrBDcBAXrLGXv+ApmoRlE9JR8BHhx9gls5QIwp2gapfzP1OYTHcQ= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR04MB6960.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(508600001)(55236004)(66946007)(8676002)(8936002)(66556008)(2616005)(26005)(86362001)(186003)(83380400001)(956004)(66476007)(6666004)(36756003)(52116002)(7696005)(1006002)(4326008)(5660300002)(2906002)(38100700002)(38350700002)(1076003)(316002)(6486002)(110426009); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?aKsldZE7tq3MOOtL77h2FSr7iaNoYz8htUy8kzr/qfoqqJmQ4FpcyJWQJhv7?= =?us-ascii?Q?yCm6UiONFBoogGT/ghlBBejqXx0Eeurg+xUkJsb3vTpxxOTndH1KwprZwcvi?= =?us-ascii?Q?PiHMdIBT9XV3qIn7oLKiw/GL84tq4sQrfvPWvFS+xni9TfLqEbMmbmIhqD6o?= =?us-ascii?Q?zU0sfIhAcMjm0wUfrILJ/xIiYEYeOij1JiX9rrEV1in9DgaI3E3i+wxeYLRF?= =?us-ascii?Q?gKTAaF/Fgx2R0uERM+QnwthkI6GBVjnjRYbBVWLrzsJ3v3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Vc+pFY7i/qyGrakYkvgbwrA/8OxEirebJLEWEzK24y0R7aMII98Yn4o?= =?us-ascii?Q?ILu2v5yGz6ie8QMz2VHKCffkOkelh1pX3M1DwM1/+hgJ9f9qYQE3Ia/ru9hc?= =?us-ascii?Q?xTuBJy90NkiXFjP9MA+qKTZ/V3fq2OlpLxunlhalDFZ5rd4pP+X/UBPa1Gga?= =?us-ascii?Q?7t8WeUwCBHyA0LWNcGoKdqaA?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 844bd538-53d4-4cf1-cd5c-08d96883f1ef X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB6960.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Aug 2021 11:23:36.3503 (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: xtA+hZtx0ZpFnnXSotB/JoPLPBpPNCEYSMUy4RE5jmSoSBkGZYojf3fLvONoh0cd X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4477 Subject: [dpdk-dev] [PATCH 1/5] 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" 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 659e289a45..041c66cfba 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__ @@ -3710,9 +3710,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.25.1