get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 98264,
    "url": "http://patches.dpdk.org/api/patches/98264/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210908065953.28349-5-hemant.agrawal@nxp.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<20210908065953.28349-5-hemant.agrawal@nxp.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210908065953.28349-5-hemant.agrawal@nxp.com",
    "date": "2021-09-08T06:59:48",
    "name": "[v4,05/10] common/dpaax: caamflib load correct HFN from DESCBUF",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "1ec170815f5c8dbfe6bbc3859e47a708c3540da7",
    "submitter": {
        "id": 477,
        "url": "http://patches.dpdk.org/api/people/477/?format=api",
        "name": "Hemant Agrawal",
        "email": "hemant.agrawal@nxp.com"
    },
    "delegate": {
        "id": 6690,
        "url": "http://patches.dpdk.org/api/users/6690/?format=api",
        "username": "akhil",
        "first_name": "akhil",
        "last_name": "goyal",
        "email": "gakhil@marvell.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20210908065953.28349-5-hemant.agrawal@nxp.com/mbox/",
    "series": [
        {
            "id": 18754,
            "url": "http://patches.dpdk.org/api/series/18754/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=18754",
            "date": "2021-09-08T06:59:44",
            "name": "[v4,01/10] crypto/dpaa_sec: support DES-CBC",
            "version": 4,
            "mbox": "http://patches.dpdk.org/series/18754/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/98264/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/98264/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 A6DC4A0C56;\n\tWed,  8 Sep 2021 09:04:26 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 6422E4114C;\n\tWed,  8 Sep 2021 09:04:10 +0200 (CEST)",
            "from EUR04-DB3-obe.outbound.protection.outlook.com\n (mail-eopbgr60052.outbound.protection.outlook.com [40.107.6.52])\n by mails.dpdk.org (Postfix) with ESMTP id 099C341147\n for <dev@dpdk.org>; Wed,  8 Sep 2021 09:04:09 +0200 (CEST)",
            "from DU2PR04MB8630.eurprd04.prod.outlook.com (2603:10a6:10:2dd::15)\n by DU2PR04MB8903.eurprd04.prod.outlook.com (2603:10a6:10:2e2::9) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.22; Wed, 8 Sep\n 2021 07:04:08 +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; Wed, 8 Sep 2021\n 07:04:08 +0000",
            "from dpdk-xeon.ap.freescale.net (92.120.0.67) by\n SG2PR01CA0087.apcprd01.prod.exchangelabs.com (2603:1096:3:15::13) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend\n Transport; Wed, 8 Sep 2021 07:04:06 +0000"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=I75pvpaZ0jUeL4Rl3Umo/nynXMfFbMjAVCYZc2esHOBfZxNVAQeBZCFN46MrsIYpvWwtRcEAujAU5uDR7h8x4BhbGlrg0KV2rtkITstxLJFqx6iQFb2X0V1exjZDK5Hn9UCSAkqm64NfGm31f3X/i9LgU2TdHXf3QMHhE/em6kIRRcpjPVYqMpBrAlNvjv6piY/ndaQuznpsNLokxVnjhoT6dRHwk7Eb0fW2l5NwuwcUgnYo5PDaRthzK4Nj5W/LMQLnGtKM+23nHGblBSOmshZHMkxoayizP5Gx+fRRu9QEdUlaRYOLckIJgiblDcK8T+zkxKiFP3NS90NmJFASzw==",
        "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=ksIoaVxDJvGp6oZ8wiXV7UdLeHo5WJq0TMeS3iIPXRpfv/s7UKVS/X3s27/3QZBLim8pyVLf1gWRr9jO4LN+dlmAPPDKAyDmcYMvEWhXQmbxY2tW0bg892ZW40HiABQ4CxTAOBbZsIqlAU/hIRaBaABu5yEiDdDnTmjXWJLTU13/Y50CdwW5fHxB/0vd0scBAcHBnCIpNK5bJP6ok4PxuPuhKzxjq2Yxj4zdFLJrtdTkFTpnSBt0b7LG+3pOSuHrDB7+jJ25SNzxqWLvJHARL7m1cFbsCbXXwgaNWvLiuWXt5G1kckOHLyrF7RjEDKbeZW+feqJpCqYZh4OGUDbnQA==",
        "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=bcCJq19JKwLpB0kpIjArz/XOL7OKlxEUGA/SBtp7W1wi0/irhl/s8fs3ulawM9rPUv56IDNszNX1XDBwGCzF3bC944EK+WhgfCNWumCDmOlrDf8APvrZd8NJ8qYyYW3mJ7oXuMxyaerZW+/rZ3y7qpeTOWV0qwGUjzIF35OVF0k=",
        "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": "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>\n <20210908065953.28349-1-hemant.agrawal@nxp.com>",
        "Content-Type": "text/plain",
        "X-ClientProxiedBy": "SG2PR01CA0087.apcprd01.prod.exchangelabs.com\n (2603:1096:3:15::13) 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": "49eb26fa-b185-4e47-5b5b-08d97296da2d",
        "X-MS-TrafficTypeDiagnostic": "DU2PR04MB8903:",
        "X-MS-Exchange-Transport-Forked": "True",
        "X-Microsoft-Antispam-PRVS": "\n <DU2PR04MB890347B54BB150B7CC2697C889D49@DU2PR04MB8903.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 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:;\n IPV:NLI; SFV:NSPM; H:DU2PR04MB8630.eurprd04.prod.outlook.com; PTR:; CAT:NONE;\n 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);\n DIR:OUT; SFP:1101;",
        "X-MS-Exchange-AntiSpam-MessageData-ChunkCount": "1",
        "X-MS-Exchange-AntiSpam-MessageData-0": "\n 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": "\n 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": "\n 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\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": [
        "v4",
        "05/10"
    ]
}