From patchwork Wed Aug 25 08:18:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 502254 Delivered-To: patch@linaro.org Received: by 2002:a02:6f15:0:0:0:0:0 with SMTP id x21csp382547jab; Wed, 25 Aug 2021 01:22:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTFtqYWtyVTR9vEP1ROoupjlA8HmwWN3VMfVxLRAxWLljPzUyK4ZwiKmPUWIQMu5yte9G+ X-Received: by 2002:aa7:c1c4:: with SMTP id d4mr46851535edp.301.1629879770520; Wed, 25 Aug 2021 01:22:50 -0700 (PDT) Return-Path: Received: from mails.dpdk.org (mails.dpdk.org. [217.70.189.124]) by mx.google.com with ESMTP id dn10si5338701ejc.275.2021.08.25.01.22.50; Wed, 25 Aug 2021 01:22:50 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) client-ip=217.70.189.124; Authentication-Results: mx.google.com; dkim=fail header.i=@nxp.com header.s=selector2 header.b=fXdz1otu; arc=fail (signature failed); spf=pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A4619411CE; Wed, 25 Aug 2021 10:22:24 +0200 (CEST) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20054.outbound.protection.outlook.com [40.107.2.54]) by mails.dpdk.org (Postfix) with ESMTP id EB833411C5 for ; Wed, 25 Aug 2021 10:22:22 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N+bpR0SpCsyOtfLfLoJf88rGaJbG4YiaSB7bKOqC5dDwjw/NlxY/hIfiA55/vBDdRVUcZfhUnLGkpOIBS/QpJv9si/RB+q2qPin5Xhn2zJ2OBO2iG9/PfzorPk5vNTH2hCjWdZBq9ojNTR09KQl3mArG3YAIVTAjNELM6DWcianlE/3d05+IycQL62/g1ssNw8jNniQ+5Yn4ozAu/o65InsKB84maSsRLp8zOi1Xn25FaS+CUs3ug0Lm9K70yRyTzI3EUwL3V7R6/s8jCJnJKeRVkFJ9TI8yKtnk4tSG54STddFaajE9fy7FoVRBNqjPX95VxhkpA459Pzy6CCR7xA== 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=6EJIORFNXa7FdvJg1o7Ys9xXalITj78ptB6rE1u5eyQ=; b=MtYDh5tLVgtr/KvJeum7PljO3F/Y970XD0ez/OEvn/O7w1ReJiZBfOT+X7M+1Z82D6UVaUpNw8uLMcYqKrwiYrgfRYUOnfTrVk3IGK/9i31VkmgiKb/Qv5MemhL/DSfjrxefzEkXQste8UuH19U0vvklj6vjQRl7JATacW6ZskTGBpHzRsPh/bPX6PF5daSKNdIwjtNgjZtLUSi9COIhsVjYtd0Nh3AQd+dqjysDK0N5e2Kud7vuBt+l18g46B85DG5XHHHtdPpyL2ANnvb+qF3PaGy2XR08Bz6oZK7A1Kh4ZXnooHZEp9HwVjiTbj7oW5qCgk8gW2n03MGTFybxZQ== 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=fXdz1otuM9gcXFarQyH0FI0VfKjQYQcIbFQo3aeRJ911Lf2kxicFFqMqCI4qcAXmxgLXqQqjEGE6SmIRSgITeBxzbamroxQTuGrnEJ0W2U/3qXKPR7Y/NIbczKaK2ZW7+24tDv5AcnReXwGDSiAT71yxOmi4eC0TOJ1bYTE7U/w= 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 DU2PR04MB8584.eurprd04.prod.outlook.com (2603:10a6:10:2db::24) 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:21 +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:21 +0000 From: Hemant Agrawal To: dev@dpdk.org, gakhil@marvell.com Cc: Franck LENORMAND Date: Wed, 25 Aug 2021 13:48:32 +0530 Message-Id: <20210825081837.23830-6-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> 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:19 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ea97828a-1805-4f16-8b1b-08d967a175a4 X-MS-TrafficTypeDiagnostic: DU2PR04MB8584: 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: pv6DNglkslVimT+b/mpI73Awe9+mv/Dr2+2+lL+dxSGt+GLAbqWEdVrA+9l2r36sdtibvOGyMFfJGwk7yr208l8FhmLKICg2+MVXC52yGh+C2KrlMo5DT6yRaeldTD+MRh+idjoEy/9ZdFgl9O0Bf0A6bdAyeNh1YL1BQza4IVUIne4sp38OXLrTCg+mgLuzg13db8plx4FS3O8Xq7+oiZAt52bCBVdB7ce2ot2xmZsFZ5SkZq26HHBlwQFE1tS7yi30RHyc2J2qK/BmrU0tLKS6rjOPljsjIEOouplGjgnXYEJr0hFLqAmWZUzaD6ekALwgN4ZoCgKtExBIFfWRY/BEJAW4zVquncNv9bzY6Oj5kB3ZqzPO/rk/CwLGH8UVSLu/E4GdrQy7oSt+lIkFg20bd9oN4mbRM5XuP3cc95pK67gp0EuLj66EvWd2NWy2s64tfEWc7wVL7mQL3fjthI80pHoBzvAV0Sk7kXNsgH6hPknExIZDEgpHLM9XC2VdkbAdMvAMiV5wtcqmOvGhvuXRO3iuopvziVKjLYBIC2ljSNMRm3RaY6OVuSI8gp7WoW+ZfD0ig7q5WmkgCLkD2WzawUZXiWI6pbM+bHk+4PcM4rH8lyzxcv/6EN7bkYi1RmpHep/qbmY/EbNvq3ma+NaKtdjU2AP6YGcK+J8SvAxZzZK+/07ll4P1ZATMjTf3eWhpspbkjb4EQhh+LpTK/A== 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)(376002)(396003)(346002)(366004)(39860400002)(136003)(956004)(8676002)(44832011)(4326008)(36756003)(2616005)(38350700002)(86362001)(83380400001)(478600001)(38100700002)(6512007)(26005)(8936002)(6666004)(66556008)(66476007)(1076003)(316002)(5660300002)(2906002)(6486002)(186003)(52116002)(66946007)(6506007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: xiXTOqGRs5u596SacypcYGm07uyzvJG9JVIu8tcswgi7CAdewGepQkNPe6MgFe905nn0YxLFx/3yPv2YUjLKgVtJuxTfsP3yt5phK41VjcKzZ77BuNYjKM0clJSPJ2EfjGKMjkOdsf9ooIp3FY5Efw0ie5VQvx0ukfVToDFtJLmqEp/vS9ohd1ygzYeG9QRTQM2Y9W5Ebg10Q+Hsj6vMTUI7ZRt6Pd55iOLNCNUEnH3M3heCYsRPupMHluelCkVYFW9rW7lqw0n4hjuF0RYeOZAlgTGnG+FxsD7gPys6Ee1c0m1QNh+3j4pPPNWOtWjhloMS2QnK3wx9pSrF4mKHrDIUs2QnO7Jp+7CAgFn1KgcDAinQ8bg/Crfs6cDbdr3Ss7FqKnJNraq4O5R5LqeAivdMA32lBQJREQedY8uhLOj6mkt+nLk+8gViZgp+BlsLYoa9ErWEIZCZyp1h6cZ8qTOGX/t0PbTraOjKx5qu9I+yWS8W8m6BL2fOalQFnHJgM9NbP5I4hH3pRWMaplqVp/YBd85RhVNmxdrdToL9k2dm9rKZQTzNl5l82qQX/RYIWo9GMtN/XkWyFUnkybI9RO5JsSvUeEoLzYbpSMYdOJxI7eRrDGVVUcvcEBeS7mYobplligg2rTGRA9FEQ4O5JqylUukkvvGuTtv7Hm2+ROphZQcctafV0uZNJndpEm5PI9SOiWbX78Qcp14qKCtbCgxUQg4d0dg4DGOcMA/q9w3W6METI4EF7QGjYLIXuInANp+B15k/OgY0uqdgAQsB7F6pHkqYSfxY8zlK+mNuRYdH9oSJsuNqDQaYFZAmMYaRXjdjbG9UL/yWPBFgmeQ766QSQztPWW7r0FxbzuO/MNHgz588a8MgnvV65jYZdJFl5iP8QnMprhPnhJUBzi+m6Yc7O2keY/pSWEhGHFus9ljlBX+fB69XaGopggBoI1+edHILvawscbqgg52EXXL2wx7ayRuzmBeQ0+dAmacZLzbmk0JzqbhwUPy37yBJch/VFuS82FrdhrYscJQiU7223WUtMh0bEPUCaeInkVDx4yALNnihZ93OFn3/qSd+GbJEnwvukO4arUlt/vAujA2WpSy2x29H+DASQfAVkqA3On6/cI6gfn1mn2ildoRggMmoRf3bGFvNrn8DqCdNYi6oyp/UcNpF99k/ljgfgjZh4CZFZqCkY7dMJit0c6QvL7mcmo1QooQVFjxQOf8zTulKBnryJKH0Ds4obIRybWSRavcUAki09MLvoh5EMOPWn+njfrp6+Aoya+A9/lm6vzM1dFDYNS6M2nA6RlfiR8YQrE6gUwhvDUG3jgbpy8tCr75e X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ea97828a-1805-4f16-8b1b-08d967a175a4 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:21.7843 (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: oiTL+bOtUeEN3WoTv+quXTku3hJgofUx1chb8/tXdedQ714KmExL7+jNpjN7ROV992fdByYVzx3usUPAblNn/w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8584 Subject: [dpdk-dev] [PATCH v2 06/11] 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(-) -- 2.17.1 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;