From patchwork Wed Sep 8 06:59:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 507904 Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp335111jai; Wed, 8 Sep 2021 00:04:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBwAu+h/ZAHopZl1fpb78dCHMfEV+Uo9T55owN5T5qNDtfMrvieWLKLm74QmS+8TWxZQN5 X-Received: by 2002:aa7:cf82:: with SMTP id z2mr2295408edx.254.1631084666970; Wed, 08 Sep 2021 00:04:26 -0700 (PDT) Return-Path: Received: from mails.dpdk.org (mails.dpdk.org. [217.70.189.124]) by mx.google.com with ESMTP id d15si1452783edt.431.2021.09.08.00.04.26; Wed, 08 Sep 2021 00:04:26 -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=bcCJq19J; 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 6422E4114C; Wed, 8 Sep 2021 09:04:10 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60052.outbound.protection.outlook.com [40.107.6.52]) by mails.dpdk.org (Postfix) with ESMTP id 099C341147 for ; Wed, 8 Sep 2021 09:04:09 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I75pvpaZ0jUeL4Rl3Umo/nynXMfFbMjAVCYZc2esHOBfZxNVAQeBZCFN46MrsIYpvWwtRcEAujAU5uDR7h8x4BhbGlrg0KV2rtkITstxLJFqx6iQFb2X0V1exjZDK5Hn9UCSAkqm64NfGm31f3X/i9LgU2TdHXf3QMHhE/em6kIRRcpjPVYqMpBrAlNvjv6piY/ndaQuznpsNLokxVnjhoT6dRHwk7Eb0fW2l5NwuwcUgnYo5PDaRthzK4Nj5W/LMQLnGtKM+23nHGblBSOmshZHMkxoayizP5Gx+fRRu9QEdUlaRYOLckIJgiblDcK8T+zkxKiFP3NS90NmJFASzw== 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=ksIoaVxDJvGp6oZ8wiXV7UdLeHo5WJq0TMeS3iIPXRpfv/s7UKVS/X3s27/3QZBLim8pyVLf1gWRr9jO4LN+dlmAPPDKAyDmcYMvEWhXQmbxY2tW0bg892ZW40HiABQ4CxTAOBbZsIqlAU/hIRaBaABu5yEiDdDnTmjXWJLTU13/Y50CdwW5fHxB/0vd0scBAcHBnCIpNK5bJP6ok4PxuPuhKzxjq2Yxj4zdFLJrtdTkFTpnSBt0b7LG+3pOSuHrDB7+jJ25SNzxqWLvJHARL7m1cFbsCbXXwgaNWvLiuWXt5G1kckOHLyrF7RjEDKbeZW+feqJpCqYZh4OGUDbnQA== 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=bcCJq19JKwLpB0kpIjArz/XOL7OKlxEUGA/SBtp7W1wi0/irhl/s8fs3ulawM9rPUv56IDNszNX1XDBwGCzF3bC944EK+WhgfCNWumCDmOlrDf8APvrZd8NJ8qYyYW3mJ7oXuMxyaerZW+/rZ3y7qpeTOWV0qwGUjzIF35OVF0k= 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 DU2PR04MB8903.eurprd04.prod.outlook.com (2603:10a6:10:2e2::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.22; Wed, 8 Sep 2021 07:04:08 +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:08 +0000 From: Hemant Agrawal To: dev@dpdk.org, gakhil@marvell.com Cc: Franck LENORMAND Date: Wed, 8 Sep 2021 12:29:48 +0530 Message-Id: <20210908065953.28349-5-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> 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:06 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 49eb26fa-b185-4e47-5b5b-08d97296da2d X-MS-TrafficTypeDiagnostic: DU2PR04MB8903: 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: s8R+U6FMbVAnocfryD3eNCW0X4Y7U2LpE4BcVYgSLJW1pbvXwzN3XtCGcw+Ht5Ap/WtyPGRvWB4onYoYNj62wIbvvvNkMaMO5XuHxsdIfaOB9DJsOFQjbzqGHz1E65Y2dSgi6HPmB5prVifkWVATAO3z6OqDD1ns6hhWC9wM+V1ssp4RR1quo+0gPaotg0rEkM0qobCmkm2xB2d81cn8qA6I/5I/SrLFl2tHbIbNx3VxhkV9vy9SM/zq3DQ3plshcO4B44qbU3jzjZGQGIqc0g/80xH6jAYw9NC0OYvuWxv1UFuXmBs6VziVdFGG0/YVsN9+6hYWiJXDysFr+rXJzqJKD6ASXG6YKA7EdtWZDw9YDvbfYnDnqKs2phDK0JSib6mgwptYaf2yW15D8R/u0785C3vimreR4QpUgeZpOPa2kxQ1VM+7Q4+cxr8/639A+z5vKrE+buvpY2EyQW3IZBz9SKdDqmewSEF/UE61HfjtJHmGF/QSlafus1rFI8cVT54KZm5Ru3ciM74TBDzEDKM7I0YMEyvIC5pjtZFNiLeoUlhfFZ2kgMTW6FZ04VOcovKd7oUY3etkR4JucTgKWNKmJWMp3ktr43zw3EbiZE2C7vmFORgEfI70ug7GsbkfG236tTz5pdCTxjolCIDpoMuT2ZUxaGweUirJtdhFsODgs/DJEJppj+lSmigjJ/TivHSKb76O2OPTih38nrZC1Q== 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)(366004)(136003)(396003)(39860400002)(346002)(376002)(52116002)(38100700002)(956004)(478600001)(83380400001)(86362001)(5660300002)(38350700002)(6666004)(6486002)(316002)(1076003)(2906002)(4326008)(44832011)(6512007)(6506007)(2616005)(36756003)(8936002)(66946007)(66556008)(186003)(66476007)(26005)(8676002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 53jp00s8/sotkwIRtk+Gvxp2ompciqlh1Jn11rQHdPqmNoOiLoP8445Q2EXjJv3kmufGRWP/nJ5l22CkFe5IwtMQXc7i4X5PqkoH6ob9JeO9Ko22lk1Mz66dE8v3KM+Os5WnHiDueLbRdrMNGE97/2o2U4BLYaDJdnBvyRaHrDZYTDxQhnakBO30QLQK1CM8eEdXjeaKqcOIfEOkSdZP9ZCvfVwis0rPK9/dwFw+ZRGahH9RcGyRf2TEeyBWNYTntYdhr/M0CBGG3eBkJYrBjEAJW47J5OFmchAEY2ozG+6KW3fSo8D0xEJoMHEXQ+0GEJaGXl2xLQmgNH3+/D1qj+bC8+LJi612KWBOa4p8TO4zMJAdjqD2p91AkIR+OUxnFxqUjP72cFjiSrmX7XIKB4wzp1fgp/XcTqLjnRTOxE5W0kVyAkiZaCVadtYDEM//7ckikTyf47q35CBiGstkc9JtmvjytadHL8rw/j0lImqDZalzVVIL+q6LK2dB2aEs4dAyYtsKVqi89SSm6zT/81yjGZJXMmUMuM1h4344pe1v0ddy+jzr/s35MEKQTzIdXx+oyBKsuunEe4781CMq42+j/20c1oND87kuBPwoCL0HlCafOaEev0JohVzx7zDHE0fQpTHu9QFU389fcpctUPG2lj19mkn3hVjH/zzwOV44AlrR8zL7Oqygq8vMK7tieGX5vCx2CHjtQUdiEQ2U2tNW5UBgnmpAazPpq76bRIi1+9OiiUyrye3DWVFSwDN3WXz392flw3zLgyqwxFsKKwcQVZn3x6+LIfrCG97PcnEN3s2m9iWiVjw9PNaN7cSDkgiljm1b7hrZ/PtrfB+F2pYQ5oZ4BFOgRRxUKr6ypbClQ9DLo1jwgpVe8vDNX26DfOhpS1O2e45gDjkcgtdHAgEXwhRLVH0eZtIIvt8BjDWIAS+eJ91zdbwYEFEVRnyic+DlgLvpj1jBxgMyXMwg+sC2YdZJgpCZoq0mTfWoFZ7QuZs6aAMFgpVDUknxy8+lXuCxButC7g+NDf4UddUgmsF93jYzX+x/USwc+RVPlVrlXL0cMIwPCWqsmCVfO49WWftqUD+fZjHIiMTjakFO7VrlTJ2ueRButgNJNPuVeTr9byWoOcKbV2AvKJpmCSJhTV4IXbwn6WLB3WHrhGmD8KI39i86mvQ2w5rmDnvKva6gUWXDrtG1dB9Bq8xawUX8OdlKUVcs53BUjDWF9mo4X5iBqFSr9AaFo0vljETk57bNAEoQAs1VobIvFxOKXTitEhBBDMngYjFVeLXHRpG2VcJ2mtgc1IzCiNUvJuZOcuGFO2oPPSInfpCECDib1Jxq X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 49eb26fa-b185-4e47-5b5b-08d97296da2d 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:08.2603 (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: FlPvI1pC+rcsJv89TczadMJzkFGRrcoBlHOGGsKYTjnGUzKJtn9216+8amKceJCXzbKC82sHkJ0/la+qkUp2+A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8903 Subject: [dpdk-dev] [PATCH v4 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(-) -- 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;