From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM04-SN1-obe.outbound.protection.outlook.com (mail-eopbgr700065.outbound.protection.outlook.com [40.107.70.65]) by dpdk.org (Postfix) with ESMTP id 5D3E423D for ; Sun, 7 Oct 2018 11:01:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zBtQcY3cIzOt+jB3hRFt+6smCk7zOqp1UBS7loe3H8U=; b=TyWoofzvE6TdB918rjLaFUxn/b80a2JCo08OO2t6fSiWP/1/nMxLus6d/zgGoXesykefZAU/oylD1oAEzYqbNOcQ3iWGCpiMnGqksWLaUkKau/bZbSIyJj4jlxFC1UZSJywyPC2oo0lvl7wttfhV3PLI88cmdDcImeoUBICzp04= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Anoob.Joseph@cavium.com; Received: from [192.168.1.9] (122.175.25.46) by DM6PR07MB4908.namprd07.prod.outlook.com (2603:10b6:5:a3::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1207.27; Sun, 7 Oct 2018 09:01:51 +0000 To: Akhil Goyal Cc: dev@dpdk.org, Declan Doherty , Pablo de Lara , Radu Nicolau , Jerin Jacob , Narayana Prasad , "Verma, Shally" , Vidya Sagar Velumuri References: <20180828130105.30779-1-akhil.goyal@nxp.com> <20180828130105.30779-2-akhil.goyal@nxp.com> <0b682c3f-bb01-8970-f271-7ffa61cbface@nxp.com> From: "Joseph, Anoob" Message-ID: <26ac4ab0-bb36-918a-23fe-41833eba9e7e@caviumnetworks.com> Date: Sun, 7 Oct 2018 14:32:59 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <0b682c3f-bb01-8970-f271-7ffa61cbface@nxp.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Originating-IP: [122.175.25.46] X-ClientProxiedBy: MAXPR0101CA0057.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:e::19) To DM6PR07MB4908.namprd07.prod.outlook.com (2603:10b6:5:a3::13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a3ace666-f6ff-4134-32d0-08d62c3388d8 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:DM6PR07MB4908; X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB4908; 3:G6VHpEkiJW8xeEtOBDbQi/mvdqTBqhiHKTJ6v7DO0foZwg5PZDcf80mBhkN+xuNq7eZq3qSSprVLju87oS9n7dWztcPHxBUSsHSUMQwILJtbLYtkuEealVgTGBGlFdWnzVe9iDzR/WL9opqWgApEVoq9CTFYXOYTxPSuBwzkmIlXZgAElzM/FaqTk0E5RVoz05/W/JjxLWNT3NBXJsEVrQSUNW2/GTsCXIxGIKry8w+C3VgULmZsCDVryJ3QbSaK; 25:webbHk27gITvE56ESmQXp9J8zgKWd08s0l7urvmsPwntjUknf6j/t37v3zEZvKt9foR7g3zRt7QLPRWQ8SS91h8owSmfbk4E/Hoihlna04W2eJgIfcdA1FuDt/KdsUgaF/GdyfJchrOK8Gm234XhIxwQAqg7fYAzh5+MdvONR8X4CV3suQ38TzeESyzxh3+mnwJhC8xfP/7ssy/jCn0gcQgnhEjHFvEI9c0dy/N8m2yASBVhCriFMztjt0b2QzR5FkdgipWO6dWYbvQtK0ADWoxc4D7IYPV0B8Dh9KP26cgWo2WJPcI6SKHe5U1WEJXmmi2iymKbdIb53lehiRH12w==; 31:Z1TfPHZYTe6ykvIuTy6jL3fgCSz8aSqGy38DSxmBgY1idpF5QVRhf3+V6QRr4huY7Qknxc3JbHTG6COaV1D++8SfRcWeJvF1Xvx4XsJm4UfSr4Fcfm/gV8pDZYTOGWLspYJANTrWxNznseBliZTm+w6rx4x2ZyQXpIY4QP4m+NCOzjh9PCUn/rqzW8TJXjVUG9CBAwMTmwxlgZ5cl/s+WxjWP5TqQZn67saLfSEFWOs= X-MS-TrafficTypeDiagnostic: DM6PR07MB4908: X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB4908; 20:VhpqH6BCdNI2NYOKPKlbHH+GawnpTfXV2vg6yDhtDvQavSsL+S8FIYiK8rlCXBJYQB/+h4TZpMhvDQT0ezvQHBsZ9Q/jc2dFgLf1hACYrPUd38QMTlwp2/owRybTANdWlN5TXO3E1RJ3Pd+zAQkEk2FPP93azHWz/D/iRimMnPzeBkblgXvuDeofivoEEKV9RIzgR6ue5q1jd6xSgzOhKmyxOh5ia0oY5E/VG0s5nvXbjVTJ1wLLRJNKDX2H/bGkMPO4Ux2FB/XZGLE9uTX1rDmplbUZNMO20jxzlw6CJQ2VyTsgXVTP1WY1W4TAFO7Dbh8jMnNvGtRW3sKVj/KANEitAUz+Z2kPNjY0ZeV6p47E1poUUp+8itt6yivoX2CvQjNm9aD2sBW55cDL33UogzrXqMqERAwt4dW63w7W/WUIy0WUWG4QtdwwSiIe7Bk07yxKO6jMTpDoZlzvN/6v5o5W67YmBjyR8B6ttwnxjyw1LHFtuBcwSfQ8rsAG/HYTeff2hS7jDrDD5F7xg68jWQApnWrLJiT9ThVvdcLfgCTqVESD19zCUthgdGcB9dJYEKLti/2OTnfuiKKj8ws/MvrHbv+2q+6wEBB54tG3GZo= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192374486261705)(185117386973197)(269456686620040); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231355)(944501410)(52105095)(3002001)(10201501046)(93006095)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123560045)(20161123564045)(201708071742011)(7699051); SRVR:DM6PR07MB4908; BCL:0; PCL:0; RULEID:; SRVR:DM6PR07MB4908; X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB4908; 4:0MiZXS/wMKLVSWFB1vaQEx8aIC9Io9daKE3NzktklD/fLbbT+MpNHoyl7bJOf3RcJ2N4uPjxjeQyVrkK4VJPe0K6uPSqSGt20xXn6Byow5S+IBrgiKvRGI3k2hjEpp8plTZlTjFDlXLvDHHxJ8JFpSNO/8qvvRBVBJ29+jRyMC3+LoeYAahUva1c0oFwYsz3EEJNiCuWS4lj4RJzcalmBLnhS0i4RTgAaHAEI/2pJ6eKMMglZdMhYlIG3jCnacmTAgPXshKXAci4RKyi6LxD2eUOc6NXLQ5SKBqCn75vuiDSGCNp6J+X6QO5ozAp+F9RmjqfZ+b+Dpe+aEc3NL9g2OZoWPjJcvLGbVjmNgn0xwkhwBtcQ3NQKQOuB3zMSgGZ X-Forefront-PRVS: 0818724663 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(39860400002)(396003)(376002)(346002)(366004)(136003)(199004)(189003)(51914003)(3260700006)(25786009)(6916009)(93886005)(6116002)(446003)(81156014)(53936002)(8676002)(117156002)(107886003)(6246003)(36756003)(50466002)(3846002)(8936002)(15650500001)(11346002)(16526019)(77096007)(2616005)(65826007)(4326008)(5660300001)(186003)(26005)(54906003)(956004)(81166006)(76176011)(97736004)(67846002)(229853002)(486006)(31686004)(478600001)(52116002)(42882007)(476003)(2486003)(58126008)(52146003)(23676004)(386003)(2870700001)(105586002)(106356001)(72206003)(31696002)(53546011)(2906002)(4744004)(14444005)(16576012)(305945005)(316002)(64126003)(47776003)(66066001)(65956001)(7736002)(65806001)(575784001)(68736007)(6486002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR07MB4908; H:[192.168.1.9]; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTZQUjA3TUI0OTA4OzIzOjlqMmpvaFhSMHUwdjV3a3VqY1RvK3hBdW5L?= =?utf-8?B?SGJVNnI3TmFha1pHcmJkU0VsdmpxdGdIQVVtVDFjVTlUZ3BNaVBIR1V2cmZQ?= =?utf-8?B?bzZqWE1vNi8yZW9XbThxSHNzdVprK0tRTDZHS0lkNnVpZG5NSDg4ODdrQjkw?= =?utf-8?B?Tmk5V0VNdDFyV240WmtzaXBHcXhROTltbkp2RUxQdDdXY3hqRVVHTWgxTjVV?= =?utf-8?B?MGRTZmFQVGdhMTFXWDNNOUM4REV2V2thMmE2UVU3ZS9ZcGJtdERYNkR4eFJL?= =?utf-8?B?emtmYzl2ZnkzR1laZW0yQUJYUFp1L0VKVXU0MGFpOHlaOHBlQlczS09wZWtr?= =?utf-8?B?TmN4bE5WM1ZmTTJlbURCa3BiQVNzVjlqMzluUmNhcEVlYWVOOE9FcUFoQ1VU?= =?utf-8?B?SUgrUVEyK0JnK2ZyZi81NWxFVHZkK2w3dnhseXpWN0RiR1pOTUpBbENIOWda?= =?utf-8?B?TVVkNUlWZXloYWcyWnlrOVdvdmI3eXFTUDZCYUp2TTJXM3BrSlpBT1FCZVdI?= =?utf-8?B?dHlTaUJpZ0NWUkRiQ2tTWkRFd0xtci9jUzNVZDBpb201dFljRXY3WXVWdzlK?= =?utf-8?B?RE9nYlhNK1JibWs5b0xxdkxYbDdEaFRtcnFUM0JiNDBVRVZCMGpML05LaElr?= =?utf-8?B?OGwxUmR6eUZ6NTM1b3VPdERRM0UwRWtWWGQzcFd0K0Z0SEFOSWY4VjNpejNx?= =?utf-8?B?Mk5pcUVLb3B4czdhcnlBNHlQcEZKMGdETFdORFh4RHVzV0YzR1dlMjFjVnVk?= =?utf-8?B?dlZqckM5NEJnOXNEK1px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-Exchange-Diagnostics: 1; DM6PR07MB4908; 6:vk5JIJOk5tL6Gj84GQOsFQ60qVkzFANo2eFFbeweyxJtuzxbl8SF5RSrNRTX3F4qz/F7S+3mlgTzt0WlXQG5fbOSQHEzzQxItIoQ3nvW2HnJZ345V7KSP+P+Txdt74wS0qixOIJzOLGdfaOpaRMgzSMJkrP+tuMdmCKg+zI4IG6I+9kZ82sx4rnPvzolYCW/eRdoq/rIfeP/D8awIV0GLJBHmthir/rFLGzcra+GEYBWuIW6aup8RdUZcwLjb++ryW4Lw+AVjMbwUjmtin/dKi0Rx2Ot46JKtRRNYrtm5CLl/7JLp606VnD9rocYbm5ytIN/IBR6VAKiYkXtUcfFCWEg/2gGnEUmP439oyRObqnnpjuzrfNqdsOir+dEUfuFHTXcF+dXHxDqOdXQYfCm/4jJWgKyzQRn6yOAngk5vUzudHvsWYQQN48AFTmF4UqB7jkAgFj53gj8tJIzphBRfg==; 5:NeVTuiXSt5kr0UkfCRX2qva2iHFM9thVnrnAyAzNXivQ7GLxOHK2brnL15B7BsJt28QRWzXslHHom5qAUILFFNzV5iBcV5vsUiPdVUUpkMxeAjvmbk9cOOYQWOUka7Aer26qPuc7cm5raiR814CQMOkGpDgLAlSjJv8g1GspOfQ=; 7:3galWzWH4AL1ogtgxNt1ndUNKithFRWM0Y3oaImhePBCjy4sODgot/mDKwL3Nf9RQOsSearTiVOgU9dpcAI1BQbvrw4s4mKDkzevzyJfg/ElW59BuLHaMzBuGSPHiOo75hSVp89NvA4K8buiofbZMz7YxzRJTkO5tWyrds7d85P6IBsXZamoalB3UQ1/t7mazMuYKwH5ycwZt2Zfa/nSggvQW3dt3FkjsDR3JC8EkRHynuOgtJtCypf9Z/Ktt/7y SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2018 09:01:51.8700 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a3ace666-f6ff-4134-32d0-08d62c3388d8 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR07MB4908 Subject: Re: [dpdk-dev] [PATCH 1/3] security: support pdcp protocol X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2018 09:02:00 -0000 Hi Akhil, Please see inline. Thanks, Anoob On 05-10-2018 17:35, Akhil Goyal wrote: > External Email > > On 9/6/2018 9:45 AM, Joseph, Anoob wrote: > >> Hi Akhil, > > Hi Anoob, > > Thanks for the comments. > >> Please see inline. >> Thanks, >> Anoob >> On 28-08-2018 18:31, akhil.goyal@nxp.com wrote: >>> External Email >>> From: Akhil Goyal >>> Signed-off-by: Hemant Agrawal >>> Signed-off-by: Akhil Goyal >>> --- >>>    doc/guides/prog_guide/rte_security.rst | 90 >>> ++++++++++++++++++++++++-- >>>    lib/librte_security/rte_security.c     |  4 ++ >>>    lib/librte_security/rte_security.h     | 62 ++++++++++++++++++ >>>    3 files changed, 149 insertions(+), 7 deletions(-) >>> diff --git a/doc/guides/prog_guide/rte_security.rst >>> b/doc/guides/prog_guide/rte_security.rst >>> index 0812abe77..412fff016 100644 >>> --- a/doc/guides/prog_guide/rte_security.rst >>> +++ b/doc/guides/prog_guide/rte_security.rst >>> @@ -10,8 +10,8 @@ The security library provides a framework for >>> management and provisioning >>>    of security protocol operations offloaded to hardware based >>> devices. The >>>    library defines generic APIs to create and free security sessions >>> which can >>>    support full protocol offload as well as inline crypto operation >>> with >>> -NIC or crypto devices. The framework currently only supports the >>> IPSec protocol >>> -and associated operations, other protocols will be added in future. >>> +NIC or crypto devices. The framework currently only supports the >>> IPSec and PDCP >>> +protocol and associated operations, other protocols will be added >>> in future. >>>    Design Principles >>>    ----------------- >>> @@ -253,6 +253,46 @@ for any protocol header addition. >>>            +--------|--------+ >>>                     V >>> +PDCP Flow Diagram >>> +~~~~~~~~~~~~~~~~~ >>> + >>> +.. code-block:: c >>> + >>> +        Transmitting PDCP Entity          Receiving PDCP Entity >>> +                  |                                   ^ >>> +                  | +-----------|-----------+ >>> +                  V                       | In order delivery and | >>> +        +---------|----------+            | Duplicate detection   | >>> +        | Sequence Numbering |            |  (Data Plane only)    | >>> +        +---------|----------+ +-----------|-----------+ >>> +                  |                                   | >>> +        +---------|----------+ +-----------|----------+ >>> +        | Header Compression*|            | Header Decompression*| >>> +        | (Data-Plane only)  |            |   (Data Plane only)  | >>> +        +---------|----------+ +-----------|----------+ >>> +                  |                                   | >>> +        +---------|-----------+ +-----------|----------+ >>> +        | Integrity Protection|           |Integrity Verification| >>> +        | (Control Plane only)|           | (Control Plane only) | >>> +        +---------|-----------+ +-----------|----------+ >>> +        +---------|-----------+ +----------|----------+ >>> +        |     Ciphering       |            | Deciphering     | >>> +        +---------|-----------+ +----------|----------+ >>> +        +---------|-----------+ +----------|----------+ >>> +        |   Add PDCP header   |            | Remove PDCP Header  | >>> +        +---------|-----------+ +----------|----------+ >>> +                  |                                   | >>> +                  +----------------->>----------------+ >>> + >> [Anoob] Which PDCP specification revision is this based on? In the 5G >> specification, even data-plane may undergo integrity protection. > > This patchset is based on LTE-PDCP - 3GPP TS 36.323 v15.1.0 (2018-09). > 5G changes are not added in this patchset. It will be added in future. > >>> +.. note:: >>> + >>> +    * Header Compression and decompression are not supported >>> currently. >>> + >>> +Just like IPSec, in case of PDCP also header addition/deletion, >>> cipher/ >>> +de-cipher, integrity protection/verification is done based on the >>> action >>> +type chosen. >>> + >>>    Device Features and Capabilities >>>    --------------------------------- >>> @@ -271,7 +311,7 @@ structure in the *DPDK API Reference*. >>>    Each driver (crypto or ethernet) defines its own private array of >>> capabilities >>>    for the operations it supports. Below is an example of the >>> capabilities for a >>> -PMD which supports the IPSec protocol. >>> +PMD which supports the IPSec and PDCP protocol. >>>    .. code-block:: c >>> @@ -298,6 +338,22 @@ PMD which supports the IPSec protocol. >>>                    }, >>>                    .crypto_capabilities = pmd_capabilities >>>            }, >>> +        { /* PDCP Lookaside Protocol offload Data Plane */ >>> +                .action = RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL, >>> +                .protocol = RTE_SECURITY_PROTOCOL_PDCP, >>> +                .pdcp = { >>> +                        .domain = RTE_SECURITY_PDCP_MODE_DATA, >>> +                }, >>> +                .crypto_capabilities = pmd_capabilities >>> +        }, >>> +        { /* PDCP Lookaside Protocol offload Control */ >>> +                .action = RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL, >>> +                .protocol = RTE_SECURITY_PROTOCOL_PDCP, >>> +                .pdcp = { >>> +                        .domain = RTE_SECURITY_PDCP_MODE_CONTROL, >>> +                }, >>> +                .crypto_capabilities = pmd_capabilities >>> +        }, >>>            { >>>                    .action = RTE_SECURITY_ACTION_TYPE_NONE >>>            } >>> @@ -429,6 +485,7 @@ Security Session configuration structure is >>> defined as ``rte_security_session_co >>>            union { >>>                    struct rte_security_ipsec_xform ipsec; >>>                    struct rte_security_macsec_xform macsec; >>> +                struct rte_security_pdcp_xform pdcp; >>>            }; >>>            /**< Configuration parameters for security session */ >>>            struct rte_crypto_sym_xform *crypto_xform; >>> @@ -463,15 +520,17 @@ The ``rte_security_session_protocol`` is >>> defined as >>>    .. code-block:: c >>>        enum rte_security_session_protocol { >>> -        RTE_SECURITY_PROTOCOL_IPSEC, >>> +        RTE_SECURITY_PROTOCOL_IPSEC = 1, >>>            /**< IPsec Protocol */ >>>            RTE_SECURITY_PROTOCOL_MACSEC, >>>            /**< MACSec Protocol */ >>> +        RTE_SECURITY_PROTOCOL_PDCP, >>> +        /**< PDCP Protocol */ >>>        }; >>> -Currently the library defines configuration parameters for IPSec >>> only. For other >>> -protocols like MACSec, structures and enums are defined as place >>> holders which >>> -will be updated in the future. >>> +Currently the library defines configuration parameters for IPSec >>> and PDCP only. >>> +For other protocols like MACSec, structures and enums are defined >>> as place holders >>> +which will be updated in the future. >>>    IPsec related configuration parameters are defined in >>> ``rte_security_ipsec_xform`` >>> @@ -494,6 +553,23 @@ IPsec related configuration parameters are >>> defined in ``rte_security_ipsec_xform >>>            /**< Tunnel parameters, NULL for transport mode */ >>>        }; >>> +PDCP related configuration parameters are defined in >>> ``rte_security_pdcp_xform`` >>> + >>> +.. code-block:: c >>> + >>> +    struct rte_security_pdcp_xform { >>> +        int8_t bearer; /**< PDCP bearer ID */ >>> +        enum rte_security_pdcp_domain domain; >>> +        /** < PDCP mode of operation: Control or data */ >>> +        enum rte_security_pdcp_direction pkt_dir; >>> +        /**< PDCP Frame Direction 0:UL 1:DL */ >>> +        enum rte_security_pdcp_sn_size sn_size; >>> +        /**< Sequence number size, 5/7/12/15 */ >>> +        int8_t hfn_ovd; /**< Overwrite HFN per operation */ >>> +        uint32_t hfn;  /**< Hyper Frame Number */ >>> +        uint32_t hfn_threshold;        /**< HFN Threashold for key >>> renegotiation */ >>> +    }; >>> + >> [Anoob] PDCP packet ordering should be both a capability and a setting. >> HFN will be incremented overtime and starts at 0. So why is it part of >> the xform? > > The Security accelerators may assume packet in order. Latest PDCP TS > suggest to do de-Ciphering before re-Ordering the Rx PDCP PDUs. In this > situation, the accelerator may use wrong HFN value. The PDCP application > can provide the appropriate HFN value along with PDU to the security > accelerator. > So what is the expectation with regards to ordering? Would PDCP know the order or is it unaware of the order? If implementation of this Spec knows the order of packets(which is implied by the "In order delivery and Duplicate detection Sequence Numbering" statement in the PDCP flow diagram), then there should be no need to override the HFN. If the implementation does not know the order of packets, then the flow diagram should be corrected. Also, is implementation expected to support ordered delivery and duplicate detection. Perhaps it should be a capability or 2. >> Also the hfn_ovd is per operation. So why is it part of xform? Is it a >> boolean value? If so, where does the HFN for each operation come from? > > The HFN Override is a boolean. If this is set, the Accelerator shall use > the HFN value provided by the PDCP Application to construct the IV for > deciphering instead of deriving it from the state variables. I will > remove this from the patch as of now, we need to define an appropriate > way to pass the per operation HFN for each packet. > >>>    Security API >>>    ~~~~~~~~~~~~ >>> diff --git a/lib/librte_security/rte_security.c >>> b/lib/librte_security/rte_security.c >>> index 1954960a5..c6355de95 100644 >>> --- a/lib/librte_security/rte_security.c >>> +++ b/lib/librte_security/rte_security.c >>> @@ -131,6 +131,10 @@ rte_security_capability_get(struct >>> rte_security_ctx *instance, >>> capability->ipsec.direction == >>> idx->ipsec.direction) >>>                                           return capability; >>> +                       } else if (idx->protocol == >>> RTE_SECURITY_PROTOCOL_PDCP) { >>> +                               if (capability->pdcp.domain == >>> + idx->pdcp.domain) >>> +                                       return capability; >>>                           } >>>                   } >>>           } >>> diff --git a/lib/librte_security/rte_security.h >>> b/lib/librte_security/rte_security.h >>> index b0d1b97ee..e625bc656 100644 >>> --- a/lib/librte_security/rte_security.h >>> +++ b/lib/librte_security/rte_security.h >>> @@ -206,6 +206,52 @@ struct rte_security_macsec_xform { >>>           int dummy; >>>    }; >>> +/** >>> + * PDCP Mode of session >>> + */ >>> +enum rte_security_pdcp_domain { >>> +       RTE_SECURITY_PDCP_MODE_CONTROL, /**< PDCP control plane */ >>> +       RTE_SECURITY_PDCP_MODE_DATA,    /**< PDCP data plane */ >>> +}; >>> + >>> +/** PDCP Frame direction */ >>> +enum rte_security_pdcp_direction { >>> +       RTE_SECURITY_PDCP_UPLINK,       /**< Uplink */ >>> +       RTE_SECURITY_PDCP_DOWNLINK,     /**< Downlink */ >>> +}; >>> + >>> +/** >>> + * PDCP Sequence Number Size selectors >>> + * @PDCP_SN_SIZE_5: 5bit sequence number >>> + * @PDCP_SN_SIZE_7: 7bit sequence number >>> + * @PDCP_SN_SIZE_12: 12bit sequence number >>> + * @PDCP_SN_SIZE_15: 15bit sequence number >>> + */ >>> +enum rte_security_pdcp_sn_size { >>> +       RTE_SECURITY_PDCP_SN_SIZE_5 = 5, >>> +       RTE_SECURITY_PDCP_SN_SIZE_7 = 7, >>> +       RTE_SECURITY_PDCP_SN_SIZE_12 = 12, >>> +       RTE_SECURITY_PDCP_SN_SIZE_15 = 15 >>> +}; >> [Anoob] SN size 18 is also possible > Will add this. > > > -Akhil