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 890B5A0C46; Tue, 7 Sep 2021 10:44:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D2B6141145; Tue, 7 Sep 2021 10:44:41 +0200 (CEST) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70070.outbound.protection.outlook.com [40.107.7.70]) by mails.dpdk.org (Postfix) with ESMTP id 18BB041139 for ; Tue, 7 Sep 2021 10:44:40 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EBwCU4HbygI5+wO2fhCSf/3932jkaqIHp64ayPdQq61qFHSESMpsL1kCEc3MsHQZWokjBGR8IlmKnfRKnqT0TBE9rk3YxoiOrlJzkkNsiRyI1/bnHfJ7ArswDcTIrWrjtibjpyGAk6DTnNO0PXb/OOWkPkYUUvX0uy//PQ0bTAWOJg3hnyteciHp7QB/yXSs5l7PlbvqdYW+fFOvlfp23DYGiBVGNdoqjb6HSHfvmVimMUvYiSTFE7v6nLDxW5CPu6JNx/ueNJJfT23RIq/x41YAvuHmKAQ4aLHN8CJN7+XAVXLHuuYarrFhsjA8d4JArdK7HqeKnDFsQuktmSntTQ== 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=6EJIORFNXa7FdvJg1o7Ys9xXalITj78ptB6rE1u5eyQ=; b=jSzIaY1gTjEUJVWghz1eMwwr0JZiKCauVq8A/0jMIHHzHY9tLR1V+HFlR04ZZXf93ivlZcVgWCO8PS4CqYyDNNIq4GTBgFP/dR9T56SMqny41WkMxFqn9vNhzi8/MIMshRFzDrQ7hWDPMghXj0sw9OoCm5ZwLhJKcY+l18IvoBwlR183LhWlnV6kIY0AQGBmURG/Awdflak1+jfdoCRkSBvZAXGOdMYOHaDfVpIiD+gLyoWsBeE5cYUlg1bSvG7KOXmtMGpdhEqR0FqS1hZpkg+AKDAcurkwngLeKJjKxILhFTi74B88YPeQHKlwgl+T8yNKmSYcA6SAKN9CNoZQyA== 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=6EJIORFNXa7FdvJg1o7Ys9xXalITj78ptB6rE1u5eyQ=; b=sg7B/LbeN1u1y3/I/j4q2+biADwc9oyOlM4X72nRVJP1K4om1TQubT+JjclFxX37cFRqOMLvRMGHomt2/oXWWrrWxw25l9bzaOW60WgUyxzs2cVatmEdHvIDwBD902MIK9P9GBjM5aaVxFLdUJyrKU/JPbBONe7/IrHrzVl1PHU= 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:39 +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:39 +0000 From: Hemant Agrawal To: dev@dpdk.org, gakhil@marvell.com Cc: Franck LENORMAND Date: Tue, 7 Sep 2021 14:09:48 +0530 Message-Id: <20210907083953.8948-5-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:37 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: da1efdbc-c223-446e-b66f-08d971dbba57 X-MS-TrafficTypeDiagnostic: DU2PR04MB8949: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:165; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PTohNOSvZJkcdzNvpZbSsZFQBiXRe/HZckia5U7vwOPMgvR6cnY+tM2pPXOL9barMardydOnM91jEkMjNMIjkS2yCwKm2u2kXgN/W7ErJNO5lhL9MtaDJMTQGvVvlyqLNuMjGXy9Cdru4RUbOBZYvKF5/XEEreOgJweZSMpI4bOV9DOzvvDr3eyakokw5Zz3xfXJjjioFvu7GaIKSs0/hcsN6D7PXO8Og6cH4PPNYc47Pg/Hs0XGTttVYYEdSdf1usF5b6NN6ekveE5VD5ahpDCdy3L3oZD1RHskyqoZqe5PGNDeyvHZqglNeP7kaHHqhyqwt6GxS0TmiHUOhbQJBgyEAOqkjUT1Ph+WCBJz01YwM38M/d2x4mFLssakHDbiX1q3oD1IYIaVz+We4+vHh2CNb4LdnxKa/a+pbUuXIyOclWxYMpemPCVWC7h0eck7mATMCbV3MBj+CLObfhMbDNOTtL7CA7TaMGIRbkt7o0+Zf0XLVxhEQyPUgzgwa2922/em7EhC8voRTcxoNBPWRrDckK6BW3QifkirF014ZE67TJcrDR3sehv0hm3UDepUFc48u/GjoJ8kr+/6+U7w9Cl0dBxo97ZR4qmJC8cwJeioTumNdKC+JfQy0nf3YQr9s5ccdK1yc4OHHBdvmAsGvvLtWyPasGbE6l3swYPNs2GckdL2Q6xDcmtF8rqNyHf9ss8qAl2fWBL78kndmC1AvQ== 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?2df95PSwTEZLtJvXjB+8PmxjY4DZan6GdHfJ1a/jvX0PcJY8YArgGZ/XcBkt?= =?us-ascii?Q?xl4XB+3vksauCfswUuhunjDxN0syZ+FTk8hBiz53hsZiAd+3L0O/1oYRhAjM?= =?us-ascii?Q?shPBhNjeRiSA3vWg1ODLcAJYwwwOFU6h4XkEsxBP7k9IItnnvs9dYbxeUWJi?= =?us-ascii?Q?iy5Js7tGQZmPPknJROvIsBm3G6VJYC7pDeep+J6EaBq3z5TJJnSyK5IobNLP?= =?us-ascii?Q?jsEflY9wWuCA9CtkCl2+665QL9Z8RPYy7torg75dPkY6KV0Y13IEp1h9Gyyg?= =?us-ascii?Q?m6rnmkqo5P0dUyLJCr36epYXuU/3KLf3jtgbSlEmICmVWJ3iamhlrYB7iVjE?= =?us-ascii?Q?KTTOgsifg5ni2KlofbG0VRk5WOw1PQJ2k8jPqiAS60KFYU57u2jk9a29U2y1?= =?us-ascii?Q?c5UUXVzUBHRT2gEum+jp4DegnYJCYCUiNqNxte5X3qTagzVN834egirMB6k+?= =?us-ascii?Q?rrJW9prj3zxxmZspk0ods9UiaGKqMnlUrqAFe274QnmTXvhsPqur5lgKKRJU?= =?us-ascii?Q?i76WxeWJssoYOd63U2XTxKBkx4Nh/F6+iLRIyxetIiRgvdiupq+jiK4uTTZ4?= =?us-ascii?Q?pSmwjCtiyirus4bXYJJqggt/6YBQenXT68KQXogvsxTj3PyOdOzdqY6kFxS8?= =?us-ascii?Q?JCaTQov2RSD1thU9aqwO8vUajIT0BBGmFrRPQQjWz3/+aGtdziXy/h9r/tGv?= =?us-ascii?Q?DySAdHByUUUnU4OidZgirt10sPo6/BLmRBVzBlFVG4+LyUdGxyYRh5y2It88?= =?us-ascii?Q?pIGOwG8StZGuokwCbD7GD7vCc0j1a7hBBLhNToHvTMSAILhVpZGlHkYf+pdc?= =?us-ascii?Q?I62cdlimtQZ6kjt52jcJGhwVlpbNZ5ALw+WV3a4GCrwlS9arQE1UFJ+7SB7P?= =?us-ascii?Q?stTHbc95/qsfJ4/6wouCWyVZtKdowrb7NhwTh4zsNj65wbDOWCPcnDNH8DSO?= =?us-ascii?Q?dfIURQHbhTGFy8Tw+WTFNbZSTTXhMvIweVhiEi4om7BMEyKaTdjYmHf+lZYJ?= =?us-ascii?Q?dwkqvMrefc6MSQBNmJkliGHl3I6vJHxlECD/RT2SgRJKtiDJiV5485bkreM4?= =?us-ascii?Q?H6Jcf27QDm9H6IXcXUHc1mA7vfgTFnG1/SGTOpYA/MxDELoNLuKb7+SEcf2V?= =?us-ascii?Q?EpzebVDPuF9WsAqxiCAb90gXkduN/DHZ6GqSmCToTDGXevPR49IgGd3qwMWX?= =?us-ascii?Q?TWEzZpHfZtrN6GdK5wRWbXULFyePN+i1nd277ylmd0MPEoRxlbOJYfM3s5xm?= =?us-ascii?Q?HjnMCJDGkDBMfdCUtHAcWQHQkdIJCNliifSjH/ANb6ccYyXt9pqIS2S46Q7u?= =?us-ascii?Q?hLFwWAO0oJkTxZ4UoDQE/ExJ?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: da1efdbc-c223-446e-b66f-08d971dbba57 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:39.1237 (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: TQN4nHamtV5C5+AIcxp7NEhQOHdDlq93ZODyhdlwyKyK41y+9Fa/pcE6/5gI+DkDsDeUPNYXjdbHkPeLR8hZ6g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8949 Subject: [dpdk-dev] [PATCH v3 05/10] common/dpaax: caamflib load correct HFN from DESCBUF 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: Franck LENORMAND The offset of the HFn word and Bearer/Dir word is different depending on type of PDB. The wrong value was used. This patch address this issue Signed-off-by: Franck LENORMAND --- drivers/common/dpaax/caamflib/desc/pdcp.h | 7 +- drivers/common/dpaax/caamflib/desc/sdap.h | 96 ++++++++++++++++++----- 2 files changed, 80 insertions(+), 23 deletions(-) diff --git a/drivers/common/dpaax/caamflib/desc/pdcp.h b/drivers/common/dpaax/caamflib/desc/pdcp.h index 659e289a45..e97d58cbc1 100644 --- a/drivers/common/dpaax/caamflib/desc/pdcp.h +++ b/drivers/common/dpaax/caamflib/desc/pdcp.h @@ -270,6 +270,9 @@ enum pdb_type_e { PDCP_PDB_TYPE_INVALID }; +#define REDUCED_PDB_DESCBUF_HFN_BEARER_DIR_OFFSET 4 +#define FULL_PDB_DESCBUF_HFN_BEARER_DIR_OFFSET 8 + /** * rta_inline_pdcp_query() - Provide indications if a key can be passed as * immediate data or shall be referenced in a @@ -2564,11 +2567,11 @@ insert_hfn_ov_op(struct program *p, return 0; case PDCP_PDB_TYPE_REDUCED_PDB: - hfn_pdb_offset = 4; + hfn_pdb_offset = REDUCED_PDB_DESCBUF_HFN_BEARER_DIR_OFFSET; break; case PDCP_PDB_TYPE_FULL_PDB: - hfn_pdb_offset = 8; + hfn_pdb_offset = FULL_PDB_DESCBUF_HFN_BEARER_DIR_OFFSET; break; default: diff --git a/drivers/common/dpaax/caamflib/desc/sdap.h b/drivers/common/dpaax/caamflib/desc/sdap.h index 6523db1733..f1c49ea3e6 100644 --- a/drivers/common/dpaax/caamflib/desc/sdap.h +++ b/drivers/common/dpaax/caamflib/desc/sdap.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause - * Copyright 2020 NXP + * Copyright 2020-2021 NXP */ #ifndef __DESC_SDAP_H__ @@ -109,12 +109,17 @@ static inline int pdcp_sdap_insert_no_int_op(struct program *p, bool swap __maybe_unused, struct alginfo *cipherdata, unsigned int dir, - enum pdcp_sn_size sn_size) + enum pdcp_sn_size sn_size, + enum pdb_type_e pdb_type) { int op; uint32_t sn_mask = 0; uint32_t length = 0; uint32_t offset = 0; + int hfn_bearer_dir_offset_in_descbuf = + (pdb_type == PDCP_PDB_TYPE_FULL_PDB) ? + FULL_PDB_DESCBUF_HFN_BEARER_DIR_OFFSET : + REDUCED_PDB_DESCBUF_HFN_BEARER_DIR_OFFSET; if (pdcp_sdap_get_sn_parameters(sn_size, swap, &offset, &length, &sn_mask)) @@ -137,7 +142,8 @@ static inline int pdcp_sdap_insert_no_int_op(struct program *p, SEQSTORE(p, MATH0, offset, length, 0); MATHB(p, MATH1, SHLD, MATH1, MATH1, 8, 0); - MOVEB(p, DESCBUF, 8, MATH2, 0, 8, WAITCOMP | IMMED); + MOVEB(p, DESCBUF, hfn_bearer_dir_offset_in_descbuf, + MATH2, 0, 8, WAITCOMP | IMMED); MATHB(p, MATH1, OR, MATH2, MATH2, 8, 0); MATHB(p, SEQINSZ, SUB, MATH3, VSEQINSZ, 4, 0); @@ -190,9 +196,14 @@ pdcp_sdap_insert_enc_only_op(struct program *p, bool swap __maybe_unused, struct alginfo *cipherdata, struct alginfo *authdata __maybe_unused, unsigned int dir, enum pdcp_sn_size sn_size, - unsigned char era_2_sw_hfn_ovrd __maybe_unused) + unsigned char era_2_sw_hfn_ovrd __maybe_unused, + enum pdb_type_e pdb_type) { uint32_t offset = 0, length = 0, sn_mask = 0; + int hfn_bearer_dir_offset_in_descbuf = + (pdb_type == PDCP_PDB_TYPE_FULL_PDB) ? + FULL_PDB_DESCBUF_HFN_BEARER_DIR_OFFSET : + REDUCED_PDB_DESCBUF_HFN_BEARER_DIR_OFFSET; if (pdcp_sdap_get_sn_parameters(sn_size, swap, &offset, &length, &sn_mask)) @@ -217,7 +228,8 @@ pdcp_sdap_insert_enc_only_op(struct program *p, bool swap __maybe_unused, /* Word (32 bit) swap */ MATHB(p, MATH1, SHLD, MATH1, MATH1, 8, 0); /* Load words from PDB: word 02 (HFN) + word 03 (bearer_dir)*/ - MOVEB(p, DESCBUF, 8, MATH2, 0, 8, WAITCOMP | IMMED); + MOVEB(p, DESCBUF, hfn_bearer_dir_offset_in_descbuf, + MATH2, 0, 8, WAITCOMP | IMMED); /* Create basic IV */ MATHB(p, MATH1, OR, MATH2, MATH2, 8, 0); @@ -309,13 +321,18 @@ static inline int pdcp_sdap_insert_snoop_op(struct program *p, bool swap __maybe_unused, struct alginfo *cipherdata, struct alginfo *authdata, unsigned int dir, enum pdcp_sn_size sn_size, - unsigned char era_2_sw_hfn_ovrd __maybe_unused) + unsigned char era_2_sw_hfn_ovrd __maybe_unused, + enum pdb_type_e pdb_type) { uint32_t offset = 0, length = 0, sn_mask = 0; uint32_t int_op_alg = 0; uint32_t int_op_aai = 0; uint32_t cipher_op_alg = 0; uint32_t cipher_op_aai = 0; + int hfn_bearer_dir_offset_in_descbuf = + (pdb_type == PDCP_PDB_TYPE_FULL_PDB) ? + FULL_PDB_DESCBUF_HFN_BEARER_DIR_OFFSET : + REDUCED_PDB_DESCBUF_HFN_BEARER_DIR_OFFSET; if (authdata->algtype == PDCP_CIPHER_TYPE_ZUC) { if (rta_sec_era < RTA_SEC_ERA_5) { @@ -362,11 +379,13 @@ pdcp_sdap_insert_snoop_op(struct program *p, bool swap __maybe_unused, /* Load the HFN / Beare / Dir from the PDB * CAAM word are 32bit hence loading 8 byte loads 2 words: - * - The HFN at offset 8 - * - The Bearer / Dir at offset 12 + * - The HFN at offset hfn_bearer_dir_offset_in_descbuf + * - The Bearer / Dir at next word */ - MOVEB(p, DESCBUF, 8, MATH2, 0, 8, WAITCOMP | IMMED); - /* Create the 4 first byte of the ICV by oring the math registers */ + MOVEB(p, DESCBUF, hfn_bearer_dir_offset_in_descbuf, + MATH2, 0, 8, WAITCOMP | IMMED); + + /* Create the 4 first byte of the ICV by or-ing the math registers */ MATHB(p, MATH1, OR, MATH2, MATH1, 8, 0); /* Set the IV of class 1 CHA */ @@ -562,11 +581,16 @@ pdcp_sdap_insert_snoop_op(struct program *p, bool swap __maybe_unused, static inline int pdcp_sdap_insert_no_snoop_op( struct program *p, bool swap __maybe_unused, struct alginfo *cipherdata, struct alginfo *authdata, unsigned int dir, enum pdcp_sn_size sn_size, - unsigned char era_2_sw_hfn_ovrd __maybe_unused) + unsigned char era_2_sw_hfn_ovrd __maybe_unused, + enum pdb_type_e pdb_type) { uint32_t offset = 0, length = 0, sn_mask = 0; uint32_t cipher_alg_op = 0; uint32_t cipher_alg_aai = 0; + int hfn_bearer_dir_offset_in_descbuf = + (pdb_type == PDCP_PDB_TYPE_FULL_PDB) ? + FULL_PDB_DESCBUF_HFN_BEARER_DIR_OFFSET : + REDUCED_PDB_DESCBUF_HFN_BEARER_DIR_OFFSET; if (authdata->algtype == PDCP_CIPHER_TYPE_ZUC) { if (rta_sec_era < RTA_SEC_ERA_5) { @@ -592,7 +616,8 @@ static inline int pdcp_sdap_insert_no_snoop_op( #endif MATHB(p, MATH1, SHLD, MATH1, MATH1, 8, 0); - MOVEB(p, DESCBUF, 8, MATH2, 0, 0x08, WAITCOMP | IMMED); + MOVEB(p, DESCBUF, hfn_bearer_dir_offset_in_descbuf, + MATH2, 0, 0x08, WAITCOMP | IMMED); MATHB(p, MATH1, OR, MATH2, MATH2, 8, 0); SEQSTORE(p, MATH0, offset, length, 0); @@ -753,22 +778,51 @@ static inline int pdcp_sdap_insert_no_snoop_op( return 0; } +static inline int +pdcp_sdap_insert_cplane_null_op(struct program *p, + bool swap __maybe_unused, + struct alginfo *cipherdata, + struct alginfo *authdata, + unsigned int dir, + enum pdcp_sn_size sn_size, + unsigned char era_2_sw_hfn_ovrd, + enum pdb_type_e pdb_type __maybe_unused) +{ + return pdcp_insert_cplane_int_only_op(p, swap, cipherdata, authdata, + dir, sn_size, era_2_sw_hfn_ovrd); +} + +static inline int +pdcp_sdap_insert_cplane_int_only_op(struct program *p, + bool swap __maybe_unused, + struct alginfo *cipherdata, + struct alginfo *authdata, + unsigned int dir, + enum pdcp_sn_size sn_size, + unsigned char era_2_sw_hfn_ovrd, + enum pdb_type_e pdb_type __maybe_unused) +{ + return pdcp_insert_cplane_int_only_op(p, swap, cipherdata, authdata, + dir, sn_size, era_2_sw_hfn_ovrd); +} + static int pdcp_sdap_insert_with_int_op( struct program *p, bool swap __maybe_unused, struct alginfo *cipherdata, struct alginfo *authdata, enum pdcp_sn_size sn_size, - unsigned char era_2_sw_hfn_ovrd, unsigned int dir) + unsigned char era_2_sw_hfn_ovrd, unsigned int dir, + enum pdb_type_e pdb_type) { static int ( *pdcp_cp_fp[PDCP_CIPHER_TYPE_INVALID][PDCP_AUTH_TYPE_INVALID])( struct program *, bool swap, struct alginfo *, struct alginfo *, unsigned int, enum pdcp_sn_size, - unsigned char __maybe_unused) = { + unsigned char __maybe_unused, enum pdb_type_e pdb_type) = { { /* NULL */ - pdcp_insert_cplane_null_op, /* NULL */ - pdcp_insert_cplane_int_only_op, /* SNOW f9 */ - pdcp_insert_cplane_int_only_op, /* AES CMAC */ - pdcp_insert_cplane_int_only_op /* ZUC-I */ + pdcp_sdap_insert_cplane_null_op, /* NULL */ + pdcp_sdap_insert_cplane_int_only_op, /* SNOW f9 */ + pdcp_sdap_insert_cplane_int_only_op, /* AES CMAC */ + pdcp_sdap_insert_cplane_int_only_op /* ZUC-I */ }, { /* SNOW f8 */ @@ -796,7 +850,7 @@ static int pdcp_sdap_insert_with_int_op( err = pdcp_cp_fp[cipherdata->algtype] [authdata->algtype](p, swap, cipherdata, authdata, dir, - sn_size, era_2_sw_hfn_ovrd); + sn_size, era_2_sw_hfn_ovrd, pdb_type); if (err) return err; @@ -948,7 +1002,7 @@ cnstr_shdsc_pdcp_sdap_u_plane(uint32_t *descbuf, } else { err = pdcp_sdap_insert_no_int_op(p, swap, cipherdata, caps_mode, - sn_size); + sn_size, pdb_type); if (err) { pr_err("Fail pdcp_sdap_insert_no_int_op\n"); return err; @@ -958,7 +1012,7 @@ cnstr_shdsc_pdcp_sdap_u_plane(uint32_t *descbuf, err = pdcp_sdap_insert_with_int_op(p, swap, cipherdata, authdata, sn_size, era_2_sw_hfn_ovrd, - caps_mode); + caps_mode, pdb_type); if (err) { pr_err("Fail pdcp_sdap_insert_with_int_op\n"); return err; -- 2.17.1