get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/98145/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 98145,
    "url": "https://patches.dpdk.org/api/patches/98145/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210907083953.8948-5-hemant.agrawal@nxp.com/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20210907083953.8948-5-hemant.agrawal@nxp.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210907083953.8948-5-hemant.agrawal@nxp.com",
    "date": "2021-09-07T08:39:48",
    "name": "[v3,05/10] common/dpaax: caamflib load correct HFN from DESCBUF",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "1ec170815f5c8dbfe6bbc3859e47a708c3540da7",
    "submitter": {
        "id": 477,
        "url": "https://patches.dpdk.org/api/people/477/?format=api",
        "name": "Hemant Agrawal",
        "email": "hemant.agrawal@nxp.com"
    },
    "delegate": {
        "id": 6690,
        "url": "https://patches.dpdk.org/api/users/6690/?format=api",
        "username": "akhil",
        "first_name": "akhil",
        "last_name": "goyal",
        "email": "gakhil@marvell.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210907083953.8948-5-hemant.agrawal@nxp.com/mbox/",
    "series": [
        {
            "id": 18728,
            "url": "https://patches.dpdk.org/api/series/18728/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=18728",
            "date": "2021-09-07T08:39:44",
            "name": "[v3,01/10] crypto/dpaa_sec: support DES-CBC",
            "version": 3,
            "mbox": "https://patches.dpdk.org/series/18728/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/98145/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/98145/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 890B5A0C46;\n\tTue,  7 Sep 2021 10:44:59 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id D2B6141145;\n\tTue,  7 Sep 2021 10:44:41 +0200 (CEST)",
            "from EUR04-HE1-obe.outbound.protection.outlook.com\n (mail-eopbgr70070.outbound.protection.outlook.com [40.107.7.70])\n by mails.dpdk.org (Postfix) with ESMTP id 18BB041139\n for <dev@dpdk.org>; Tue,  7 Sep 2021 10:44:40 +0200 (CEST)",
            "from DU2PR04MB8630.eurprd04.prod.outlook.com (2603:10a6:10:2dd::15)\n by DU2PR04MB8949.eurprd04.prod.outlook.com (2603:10a6:10:2e0::13)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Tue, 7 Sep\n 2021 08:44:39 +0000",
            "from DU2PR04MB8630.eurprd04.prod.outlook.com\n ([fe80::945d:e362:712d:1b80]) by DU2PR04MB8630.eurprd04.prod.outlook.com\n ([fe80::945d:e362:712d:1b80%4]) with mapi id 15.20.4478.025; Tue, 7 Sep 2021\n 08:44:39 +0000",
            "from dpdk-xeon.ap.freescale.net (92.120.0.67) by\n SGBP274CA0024.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b0::36) with Microsoft\n SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.20.4478.20 via Frontend Transport; Tue, 7 Sep 2021 08:44:37 +0000"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n 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;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version;\n bh=6EJIORFNXa7FdvJg1o7Ys9xXalITj78ptB6rE1u5eyQ=;\n b=jSzIaY1gTjEUJVWghz1eMwwr0JZiKCauVq8A/0jMIHHzHY9tLR1V+HFlR04ZZXf93ivlZcVgWCO8PS4CqYyDNNIq4GTBgFP/dR9T56SMqny41WkMxFqn9vNhzi8/MIMshRFzDrQ7hWDPMghXj0sw9OoCm5ZwLhJKcY+l18IvoBwlR183LhWlnV6kIY0AQGBmURG/Awdflak1+jfdoCRkSBvZAXGOdMYOHaDfVpIiD+gLyoWsBeE5cYUlg1bSvG7KOXmtMGpdhEqR0FqS1hZpkg+AKDAcurkwngLeKJjKxILhFTi74B88YPeQHKlwgl+T8yNKmSYcA6SAKN9CNoZQyA==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass\n header.d=nxp.com; arc=none",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=6EJIORFNXa7FdvJg1o7Ys9xXalITj78ptB6rE1u5eyQ=;\n b=sg7B/LbeN1u1y3/I/j4q2+biADwc9oyOlM4X72nRVJP1K4om1TQubT+JjclFxX37cFRqOMLvRMGHomt2/oXWWrrWxw25l9bzaOW60WgUyxzs2cVatmEdHvIDwBD902MIK9P9GBjM5aaVxFLdUJyrKU/JPbBONe7/IrHrzVl1PHU=",
        "Authentication-Results": "dpdk.org; dkim=none (message not signed)\n header.d=none;dpdk.org; dmarc=none action=none header.from=nxp.com;",
        "From": "Hemant Agrawal <hemant.agrawal@nxp.com>",
        "To": "dev@dpdk.org,\n\tgakhil@marvell.com",
        "Cc": "Franck LENORMAND <franck.lenormand@nxp.com>",
        "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>\n <20210907083953.8948-1-hemant.agrawal@nxp.com>",
        "Content-Type": "text/plain",
        "X-ClientProxiedBy": "SGBP274CA0024.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b0::36)\n To DU2PR04MB8630.eurprd04.prod.outlook.com\n (2603:10a6:10:2dd::15)",
        "MIME-Version": "1.0",
        "X-MS-Exchange-MessageSentRepresentingType": "1",
        "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": "\n <DU2PR04MB8949531C1A3B80841080935589D39@DU2PR04MB8949.eurprd04.prod.outlook.com>",
        "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": "\n 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:;\n IPV:NLI; SFV:NSPM; H:DU2PR04MB8630.eurprd04.prod.outlook.com; PTR:; CAT:NONE;\n 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);\n DIR:OUT; SFP:1101;",
        "X-MS-Exchange-AntiSpam-MessageData-ChunkCount": "1",
        "X-MS-Exchange-AntiSpam-MessageData-0": "\n 2df95PSwTEZLtJvXjB+8PmxjY4DZan6GdHfJ1a/jvX0PcJY8YArgGZ/XcBktxl4XB+3vksauCfswUuhunjDxN0syZ+FTk8hBiz53hsZiAd+3L0O/1oYRhAjMshPBhNjeRiSA3vWg1ODLcAJYwwwOFU6h4XkEsxBP7k9IItnnvs9dYbxeUWJiiy5Js7tGQZmPPknJROvIsBm3G6VJYC7pDeep+J6EaBq3z5TJJnSyK5IobNLPjsEflY9wWuCA9CtkCl2+665QL9Z8RPYy7torg75dPkY6KV0Y13IEp1h9Gyygm6rnmkqo5P0dUyLJCr36epYXuU/3KLf3jtgbSlEmICmVWJ3iamhlrYB7iVjEKTTOgsifg5ni2KlofbG0VRk5WOw1PQJ2k8jPqiAS60KFYU57u2jk9a29U2y1c5UUXVzUBHRT2gEum+jp4DegnYJCYCUiNqNxte5X3qTagzVN834egirMB6k+rrJW9prj3zxxmZspk0ods9UiaGKqMnlUrqAFe274QnmTXvhsPqur5lgKKRJUi76WxeWJssoYOd63U2XTxKBkx4Nh/F6+iLRIyxetIiRgvdiupq+jiK4uTTZ4pSmwjCtiyirus4bXYJJqggt/6YBQenXT68KQXogvsxTj3PyOdOzdqY6kFxS8JCaTQov2RSD1thU9aqwO8vUajIT0BBGmFrRPQQjWz3/+aGtdziXy/h9r/tGvDySAdHByUUUnU4OidZgirt10sPo6/BLmRBVzBlFVG4+LyUdGxyYRh5y2It88pIGOwG8StZGuokwCbD7GD7vCc0j1a7hBBLhNToHvTMSAILhVpZGlHkYf+pdcI62cdlimtQZ6kjt52jcJGhwVlpbNZ5ALw+WV3a4GCrwlS9arQE1UFJ+7SB7PstTHbc95/qsfJ4/6wouCWyVZtKdowrb7NhwTh4zsNj65wbDOWCPcnDNH8DSOdfIURQHbhTGFy8Tw+WTFNbZSTTXhMvIweVhiEi4om7BMEyKaTdjYmHf+lZYJdwkqvMrefc6MSQBNmJkliGHl3I6vJHxlECD/RT2SgRJKtiDJiV5485bkreM4H6Jcf27QDm9H6IXcXUHc1mA7vfgTFnG1/SGTOpYA/MxDELoNLuKb7+SEcf2VEpzebVDPuF9WsAqxiCAb90gXkduN/DHZ6GqSmCToTDGXevPR49IgGd3qwMWXTWEzZpHfZtrN6GdK5wRWbXULFyePN+i1nd277ylmd0MPEoRxlbOJYfM3s5xmHjnMCJDGkDBMfdCUtHAcWQHQkdIJCNliifSjH/ANb6ccYyXt9pqIS2S46Q7uhLFwWAO0oJkTxZ4UoDQE/ExJ",
        "X-OriginatorOrg": "nxp.com",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 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": "\n 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\n from DESCBUF",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: Franck LENORMAND <franck.lenormand@nxp.com>\n\nThe offset of the HFn word and Bearer/Dir word is different\ndepending on type of PDB.\n\nThe wrong value was used.\n\nThis patch address this issue\n\nSigned-off-by: Franck LENORMAND <franck.lenormand@nxp.com>\n---\n drivers/common/dpaax/caamflib/desc/pdcp.h |  7 +-\n drivers/common/dpaax/caamflib/desc/sdap.h | 96 ++++++++++++++++++-----\n 2 files changed, 80 insertions(+), 23 deletions(-)",
    "diff": "diff --git a/drivers/common/dpaax/caamflib/desc/pdcp.h b/drivers/common/dpaax/caamflib/desc/pdcp.h\nindex 659e289a45..e97d58cbc1 100644\n--- a/drivers/common/dpaax/caamflib/desc/pdcp.h\n+++ b/drivers/common/dpaax/caamflib/desc/pdcp.h\n@@ -270,6 +270,9 @@ enum pdb_type_e {\n \tPDCP_PDB_TYPE_INVALID\n };\n \n+#define REDUCED_PDB_DESCBUF_HFN_BEARER_DIR_OFFSET 4\n+#define FULL_PDB_DESCBUF_HFN_BEARER_DIR_OFFSET 8\n+\n /**\n  * rta_inline_pdcp_query() - Provide indications if a key can be passed as\n  *                           immediate data or shall be referenced in a\n@@ -2564,11 +2567,11 @@ insert_hfn_ov_op(struct program *p,\n \t\treturn 0;\n \n \tcase PDCP_PDB_TYPE_REDUCED_PDB:\n-\t\thfn_pdb_offset = 4;\n+\t\thfn_pdb_offset = REDUCED_PDB_DESCBUF_HFN_BEARER_DIR_OFFSET;\n \t\tbreak;\n \n \tcase PDCP_PDB_TYPE_FULL_PDB:\n-\t\thfn_pdb_offset = 8;\n+\t\thfn_pdb_offset = FULL_PDB_DESCBUF_HFN_BEARER_DIR_OFFSET;\n \t\tbreak;\n \n \tdefault:\ndiff --git a/drivers/common/dpaax/caamflib/desc/sdap.h b/drivers/common/dpaax/caamflib/desc/sdap.h\nindex 6523db1733..f1c49ea3e6 100644\n--- a/drivers/common/dpaax/caamflib/desc/sdap.h\n+++ b/drivers/common/dpaax/caamflib/desc/sdap.h\n@@ -1,5 +1,5 @@\n /* SPDX-License-Identifier: BSD-3-Clause\n- * Copyright 2020 NXP\n+ * Copyright 2020-2021 NXP\n  */\n \n #ifndef __DESC_SDAP_H__\n@@ -109,12 +109,17 @@ static inline int pdcp_sdap_insert_no_int_op(struct program *p,\n \t\t\t\t\t     bool swap __maybe_unused,\n \t\t\t\t\t     struct alginfo *cipherdata,\n \t\t\t\t\t     unsigned int dir,\n-\t\t\t\t\t     enum pdcp_sn_size sn_size)\n+\t\t\t\t\t     enum pdcp_sn_size sn_size,\n+\t\t\t\t\t     enum pdb_type_e pdb_type)\n {\n \tint op;\n \tuint32_t sn_mask = 0;\n \tuint32_t length = 0;\n \tuint32_t offset = 0;\n+\tint hfn_bearer_dir_offset_in_descbuf =\n+\t\t(pdb_type == PDCP_PDB_TYPE_FULL_PDB) ?\n+\t\t\tFULL_PDB_DESCBUF_HFN_BEARER_DIR_OFFSET :\n+\t\t\tREDUCED_PDB_DESCBUF_HFN_BEARER_DIR_OFFSET;\n \n \tif (pdcp_sdap_get_sn_parameters(sn_size, swap, &offset, &length,\n \t\t\t\t\t&sn_mask))\n@@ -137,7 +142,8 @@ static inline int pdcp_sdap_insert_no_int_op(struct program *p,\n \tSEQSTORE(p, MATH0, offset, length, 0);\n \n \tMATHB(p, MATH1, SHLD, MATH1, MATH1, 8, 0);\n-\tMOVEB(p, DESCBUF, 8, MATH2, 0, 8, WAITCOMP | IMMED);\n+\tMOVEB(p, DESCBUF, hfn_bearer_dir_offset_in_descbuf,\n+\t\t\tMATH2, 0, 8, WAITCOMP | IMMED);\n \tMATHB(p, MATH1, OR, MATH2, MATH2, 8, 0);\n \n \tMATHB(p, SEQINSZ, SUB, MATH3, VSEQINSZ, 4, 0);\n@@ -190,9 +196,14 @@ pdcp_sdap_insert_enc_only_op(struct program *p, bool swap __maybe_unused,\n \t\t\t     struct alginfo *cipherdata,\n \t\t\t     struct alginfo *authdata __maybe_unused,\n \t\t\t     unsigned int dir, enum pdcp_sn_size sn_size,\n-\t\t\t     unsigned char era_2_sw_hfn_ovrd __maybe_unused)\n+\t\t\t     unsigned char era_2_sw_hfn_ovrd __maybe_unused,\n+\t\t\t     enum pdb_type_e pdb_type)\n {\n \tuint32_t offset = 0, length = 0, sn_mask = 0;\n+\tint hfn_bearer_dir_offset_in_descbuf =\n+\t\t(pdb_type == PDCP_PDB_TYPE_FULL_PDB) ?\n+\t\t\tFULL_PDB_DESCBUF_HFN_BEARER_DIR_OFFSET :\n+\t\t\tREDUCED_PDB_DESCBUF_HFN_BEARER_DIR_OFFSET;\n \n \tif (pdcp_sdap_get_sn_parameters(sn_size, swap, &offset, &length,\n \t\t\t\t\t&sn_mask))\n@@ -217,7 +228,8 @@ pdcp_sdap_insert_enc_only_op(struct program *p, bool swap __maybe_unused,\n \t/* Word (32 bit) swap */\n \tMATHB(p, MATH1, SHLD, MATH1, MATH1, 8, 0);\n \t/* Load words from PDB: word 02 (HFN) + word 03 (bearer_dir)*/\n-\tMOVEB(p, DESCBUF, 8, MATH2, 0, 8, WAITCOMP | IMMED);\n+\tMOVEB(p, DESCBUF, hfn_bearer_dir_offset_in_descbuf,\n+\t\t\tMATH2, 0, 8, WAITCOMP | IMMED);\n \t/* Create basic IV */\n \tMATHB(p, MATH1, OR, MATH2, MATH2, 8, 0);\n \n@@ -309,13 +321,18 @@ static inline int\n pdcp_sdap_insert_snoop_op(struct program *p, bool swap __maybe_unused,\n \t\t\t  struct alginfo *cipherdata, struct alginfo *authdata,\n \t\t\t  unsigned int dir, enum pdcp_sn_size sn_size,\n-\t\t\t  unsigned char era_2_sw_hfn_ovrd __maybe_unused)\n+\t\t\t  unsigned char era_2_sw_hfn_ovrd __maybe_unused,\n+\t\t\t  enum pdb_type_e pdb_type)\n {\n \tuint32_t offset = 0, length = 0, sn_mask = 0;\n \tuint32_t int_op_alg = 0;\n \tuint32_t int_op_aai = 0;\n \tuint32_t cipher_op_alg = 0;\n \tuint32_t cipher_op_aai = 0;\n+\tint hfn_bearer_dir_offset_in_descbuf =\n+\t\t(pdb_type == PDCP_PDB_TYPE_FULL_PDB) ?\n+\t\t\tFULL_PDB_DESCBUF_HFN_BEARER_DIR_OFFSET :\n+\t\t\tREDUCED_PDB_DESCBUF_HFN_BEARER_DIR_OFFSET;\n \n \tif (authdata->algtype == PDCP_CIPHER_TYPE_ZUC) {\n \t\tif (rta_sec_era < RTA_SEC_ERA_5) {\n@@ -362,11 +379,13 @@ pdcp_sdap_insert_snoop_op(struct program *p, bool swap __maybe_unused,\n \n \t/* Load the HFN / Beare / Dir from the PDB\n \t * CAAM word are 32bit hence loading 8 byte loads 2 words:\n-\t *  - The HFN at offset 8\n-\t *  - The Bearer / Dir at offset 12\n+\t *  - The HFN at offset hfn_bearer_dir_offset_in_descbuf\n+\t *  - The Bearer / Dir at next word\n \t */\n-\tMOVEB(p, DESCBUF, 8, MATH2, 0, 8, WAITCOMP | IMMED);\n-\t/* Create the 4 first byte of the ICV by oring the math registers */\n+\tMOVEB(p, DESCBUF, hfn_bearer_dir_offset_in_descbuf,\n+\t\t\tMATH2, 0, 8, WAITCOMP | IMMED);\n+\n+\t/* Create the 4 first byte of the ICV by or-ing the math registers */\n \tMATHB(p, MATH1, OR, MATH2, MATH1, 8, 0);\n \n \t/* Set the IV of class 1 CHA */\n@@ -562,11 +581,16 @@ pdcp_sdap_insert_snoop_op(struct program *p, bool swap __maybe_unused,\n static inline int pdcp_sdap_insert_no_snoop_op(\n \tstruct program *p, bool swap __maybe_unused, struct alginfo *cipherdata,\n \tstruct alginfo *authdata, unsigned int dir, enum pdcp_sn_size sn_size,\n-\tunsigned char era_2_sw_hfn_ovrd __maybe_unused)\n+\tunsigned char era_2_sw_hfn_ovrd __maybe_unused,\n+\tenum pdb_type_e pdb_type)\n {\n \tuint32_t offset = 0, length = 0, sn_mask = 0;\n \tuint32_t cipher_alg_op = 0;\n \tuint32_t cipher_alg_aai = 0;\n+\tint hfn_bearer_dir_offset_in_descbuf =\n+\t\t(pdb_type == PDCP_PDB_TYPE_FULL_PDB) ?\n+\t\t\tFULL_PDB_DESCBUF_HFN_BEARER_DIR_OFFSET :\n+\t\t\tREDUCED_PDB_DESCBUF_HFN_BEARER_DIR_OFFSET;\n \n \tif (authdata->algtype == PDCP_CIPHER_TYPE_ZUC) {\n \t\tif (rta_sec_era < RTA_SEC_ERA_5) {\n@@ -592,7 +616,8 @@ static inline int pdcp_sdap_insert_no_snoop_op(\n #endif\n \n \tMATHB(p, MATH1, SHLD, MATH1, MATH1, 8, 0);\n-\tMOVEB(p, DESCBUF, 8, MATH2, 0, 0x08, WAITCOMP | IMMED);\n+\tMOVEB(p, DESCBUF, hfn_bearer_dir_offset_in_descbuf,\n+\t\t\tMATH2, 0, 0x08, WAITCOMP | IMMED);\n \tMATHB(p, MATH1, OR, MATH2, MATH2, 8, 0);\n \n \tSEQSTORE(p, MATH0, offset, length, 0);\n@@ -753,22 +778,51 @@ static inline int pdcp_sdap_insert_no_snoop_op(\n \treturn 0;\n }\n \n+static inline int\n+pdcp_sdap_insert_cplane_null_op(struct program *p,\n+\t\t\t   bool swap __maybe_unused,\n+\t\t\t   struct alginfo *cipherdata,\n+\t\t\t   struct alginfo *authdata,\n+\t\t\t   unsigned int dir,\n+\t\t\t   enum pdcp_sn_size sn_size,\n+\t\t\t   unsigned char era_2_sw_hfn_ovrd,\n+\t\t\t   enum pdb_type_e pdb_type __maybe_unused)\n+{\n+\treturn pdcp_insert_cplane_int_only_op(p, swap, cipherdata, authdata,\n+\t\t\t\t\tdir, sn_size, era_2_sw_hfn_ovrd);\n+}\n+\n+static inline int\n+pdcp_sdap_insert_cplane_int_only_op(struct program *p,\n+\t\t\t   bool swap __maybe_unused,\n+\t\t\t   struct alginfo *cipherdata,\n+\t\t\t   struct alginfo *authdata,\n+\t\t\t   unsigned int dir,\n+\t\t\t   enum pdcp_sn_size sn_size,\n+\t\t\t   unsigned char era_2_sw_hfn_ovrd,\n+\t\t\t   enum pdb_type_e pdb_type __maybe_unused)\n+{\n+\treturn pdcp_insert_cplane_int_only_op(p, swap, cipherdata, authdata,\n+\t\t\t\tdir, sn_size, era_2_sw_hfn_ovrd);\n+}\n+\n static int pdcp_sdap_insert_with_int_op(\n \tstruct program *p, bool swap __maybe_unused, struct alginfo *cipherdata,\n \tstruct alginfo *authdata, enum pdcp_sn_size sn_size,\n-\tunsigned char era_2_sw_hfn_ovrd, unsigned int dir)\n+\tunsigned char era_2_sw_hfn_ovrd, unsigned int dir,\n+\tenum pdb_type_e pdb_type)\n {\n \tstatic int (\n \t\t*pdcp_cp_fp[PDCP_CIPHER_TYPE_INVALID][PDCP_AUTH_TYPE_INVALID])(\n \t\tstruct program *, bool swap, struct alginfo *, struct alginfo *,\n \t\tunsigned int, enum pdcp_sn_size,\n-\t\tunsigned char __maybe_unused) = {\n+\t\tunsigned char __maybe_unused, enum pdb_type_e pdb_type) = {\n \t\t{\n \t\t\t/* NULL */\n-\t\t\tpdcp_insert_cplane_null_op,     /* NULL */\n-\t\t\tpdcp_insert_cplane_int_only_op, /* SNOW f9 */\n-\t\t\tpdcp_insert_cplane_int_only_op, /* AES CMAC */\n-\t\t\tpdcp_insert_cplane_int_only_op  /* ZUC-I */\n+\t\t\tpdcp_sdap_insert_cplane_null_op,     /* NULL */\n+\t\t\tpdcp_sdap_insert_cplane_int_only_op, /* SNOW f9 */\n+\t\t\tpdcp_sdap_insert_cplane_int_only_op, /* AES CMAC */\n+\t\t\tpdcp_sdap_insert_cplane_int_only_op  /* ZUC-I */\n \t\t},\n \t\t{\n \t\t\t/* SNOW f8 */\n@@ -796,7 +850,7 @@ static int pdcp_sdap_insert_with_int_op(\n \n \terr = pdcp_cp_fp[cipherdata->algtype]\n \t\t\t[authdata->algtype](p, swap, cipherdata, authdata, dir,\n-\t\t\t\t\t    sn_size, era_2_sw_hfn_ovrd);\n+\t\t\t\t\tsn_size, era_2_sw_hfn_ovrd, pdb_type);\n \tif (err)\n \t\treturn err;\n \n@@ -948,7 +1002,7 @@ cnstr_shdsc_pdcp_sdap_u_plane(uint32_t *descbuf,\n \t\t} else {\n \t\t\terr = pdcp_sdap_insert_no_int_op(p, swap, cipherdata,\n \t\t\t\t\t\t\t caps_mode,\n-\t\t\t\t\t\t\t sn_size);\n+\t\t\t\t\t\t\t sn_size, pdb_type);\n \t\t\tif (err) {\n \t\t\t\tpr_err(\"Fail pdcp_sdap_insert_no_int_op\\n\");\n \t\t\t\treturn err;\n@@ -958,7 +1012,7 @@ cnstr_shdsc_pdcp_sdap_u_plane(uint32_t *descbuf,\n \t\terr = pdcp_sdap_insert_with_int_op(p, swap, cipherdata,\n \t\t\t\t\t\t   authdata, sn_size,\n \t\t\t\t\t\t   era_2_sw_hfn_ovrd,\n-\t\t\t\t\t\t   caps_mode);\n+\t\t\t\t\t\t   caps_mode, pdb_type);\n \t\tif (err) {\n \t\t\tpr_err(\"Fail pdcp_sdap_insert_with_int_op\\n\");\n \t\t\treturn err;\n",
    "prefixes": [
        "v3",
        "05/10"
    ]
}