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 BE952A0C46; Tue, 7 Sep 2021 10:45:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 94D7B4115B; Tue, 7 Sep 2021 10:44:47 +0200 (CEST) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70079.outbound.protection.outlook.com [40.107.7.79]) by mails.dpdk.org (Postfix) with ESMTP id E18C341124; Tue, 7 Sep 2021 10:44:45 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LdyrK6MJKGKCC3CTaHH1wnU+2ao8uJLiJQlxFxB4zmMZjZMlpxKHdHbhI8zQfwic40R56/WSPhoa5Tzfvxz37KHIMWenafq2JJSArVujaowJ9P07b0lj9KnzBp0ONl9U8NGB817lBGlMvxNQ0s4HiM/PQEuRmUjD0cl/4+4xcc+biQA5dqxwbhaz0Vh+Y6Er1O01AMpKFuYz9QEKnh6J7ACCNyOl9ZXdIRgILJw9QP6AZ3JiNxVSwFLIYdHDWJGZhzUZI5oVWYUvN5RuqgzRO5HLTFXMFJaBp9yk4/TKRnG7CVeN1gBS3DSZIKW7IpqGvXrxmXdJ73uDNtHfBaIvUA== 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=Xq8it9cTYRug7Gxlb4qfi7HiHrg9h/e/2Ullrk8z2cdVsLiNcdGxUh9WH1m1Dx3R1zPd//rSBEHTIbgUK3bVtuHgoNGgfm1YJ73g+8TfaxdaG173VC03Zm46GIIhEjEKcFTJCMLXivHhCraMxxXUo7CkcyBbjC4VRuq7BV1NWeuDZQu/0O9uEZzP+u3fJZfw1zXbesUzjR87YjKvOZkR/9ilh6CVTPu8dyNqeh9sXtR8eRPmD4MiTvAzoL84mNK9QnLcnboTdokZOgcpKFyMLs8pZPrEqhDlgPKbkAF8ELByuxLXf6xBjnxSv95yu5cCb5jCL889X1gS8Muh9jN+9Q== 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=T1QjHUtW0afH65PPYbkjP5t/1tP28W0NESzLc5Re/eFpjq5ieV+4e+pMwdwvf8TMLkkWClUzoRY6rW/Pxy8QOVQWWo7FLsAxbRzsq7YbLRMIOEiylLVnmjvP1MBVVDJYl7yhitVdnPc/VgLYQHqFzJxFka2rRekJECK23gm1Fhs= 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 DU2PR04MB8949.eurprd04.prod.outlook.com (2603:10a6:10:2e0::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Tue, 7 Sep 2021 08:44:45 +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; Tue, 7 Sep 2021 08:44:45 +0000 From: Hemant Agrawal To: dev@dpdk.org, gakhil@marvell.com Cc: Gagandeep Singh , stable@dpdk.org Date: Tue, 7 Sep 2021 14:09:51 +0530 Message-Id: <20210907083953.8948-8-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210907083953.8948-1-hemant.agrawal@nxp.com> References: <20210825081837.23830-1-hemant.agrawal@nxp.com> <20210907083953.8948-1-hemant.agrawal@nxp.com> Content-Type: text/plain X-ClientProxiedBy: SGBP274CA0024.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b0::36) 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 SGBP274CA0024.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b0::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.20 via Frontend Transport; Tue, 7 Sep 2021 08:44:43 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 309f1c85-c0ce-415c-ed96-08d971dbbde6 X-MS-TrafficTypeDiagnostic: DU2PR04MB8949: 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: RxJdDqybT/KPdQg4u+IP0wbgdGyLKs8/dZYyT6tgvJ+axb3zlUWeP/C59vmujHpUrVMTdDQyo5hlj4i0eG0xe7/BIlw04eLJmoa9IRoCUfg3NdWqiCWvyPxZ9+7zdTzsBDPg8/4955qSiGl36vOkm80+KgKiPzw3Zlt4M6gcEA80ZqwsIOmcG4Vid/Bw0JpvqAeTfkyn/ibimAosrBZvzI8/kYu7g/z5skOE+x9FFVmc8wuOnnzMKsWOmANR+6WrH2GlICIzMuA9+sIxulf7CXn6iJxh7QXHNcZ8qUyZFfPKIMMYHYmKoAHHPYxnTqb5GVWnbyyGrcdAKw/uNV0CDbMtqwD/hboLQ4nQNJ6xHP8dpdh7rnGB30HDIdq6P8ZrJ7iCNHa4pzq/BQTJl8Nh/f29OuSOIiKQ/uboovefXr+utk0Nr6MHXJeOSjiV1axAEP8UXZU35T7PotEeZSfttow3JLdv/6fXTLU8HnR7Ewqjtr4jStU77hEvuaJGu2m3RyUs+zoZD7nol6wgJW42KLTl8ZDFz/t/fcbVZkIU0UDy6LMx30c6ltYJsW5fHKc5lPXsuKMZ1eaBZVf5zN2DmuaUi2nlzuO03r1avmjmAizBeQ0c5eZ3DWHGFDR5SZwKMmhdAYzOcwA8Fo4s99yV68VUbpYs3aJk5JDF64vzC5b5VqUtWfkfb0mjMOx3W0u1TbJYpoAia0GWRr2ktQS88A== 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)(396003)(366004)(136003)(376002)(346002)(39860400002)(86362001)(36756003)(38100700002)(38350700002)(316002)(44832011)(52116002)(6506007)(6512007)(186003)(2906002)(956004)(6666004)(5660300002)(8936002)(8676002)(6486002)(2616005)(26005)(1076003)(83380400001)(4326008)(66946007)(478600001)(66556008)(66476007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?qjxw2y4jRuzSKYL9LuaZ4wmkqSqzCQy9n1/OnDbBwRClr1yMksiiX2+q1+sO?= =?us-ascii?Q?QOcb5sKEtbIsbh9bHHg6A24zo9BqKBSSZ3kqHWZUsAU5qdIMQGeFXV06QEWi?= =?us-ascii?Q?/w/uLWdArsTtF2Fgs8ivWUChyI1pprFxvx8tyIUqrPFaL3ET148UIEuT6RAn?= =?us-ascii?Q?mS/+x/gr4DnvWJTG6HSFxa1oKtz6XFCVWej4PeE4s390BnqN6+EXyZuKpGQT?= =?us-ascii?Q?ujv66WTcQN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82o?= =?us-ascii?Q?mpVS5YKCGrqC9vtHYhKJhPdpGObhIaGHeEl+Ouj79VADzZACa8vybX15GzYa?= =?us-ascii?Q?X/gG+b5HRaWq2JbnxR402tlqNmQ9HLiv089MgF4RzwCIkRVzQ+Q0suWpOQqE?= =?us-ascii?Q?SyiczL17vF0xu46iHf5HUCijO6ogAuxmeV88OW9XmWQ4YeoyE7uw8IVRwH4X?= =?us-ascii?Q?20tDL8lystAM6o9ZoIMoh6Di?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 309f1c85-c0ce-415c-ed96-08d971dbbde6 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8630.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2021 08:44:45.1273 (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: KamTGxEBUu54bJlJTL/N2amIUIWbicpWh56uCIOAyq83mwxvQhspg2L3lSsaIM1dK3l0Qr3VizJ2I2oQ1DeFlA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8949 Subject: [dpdk-dev] [PATCH v3 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