From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30055.outbound.protection.outlook.com [40.107.3.55]) by dpdk.org (Postfix) with ESMTP id 2894F11D4 for ; Fri, 5 Oct 2018 14:05:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DyDNA1rmhxxxA/dY1YSG35rvCw29aFz+I9VYvlC/DHE=; b=s4otoqOpqMYS3JLyCgVhFaYTBKYL/diiwy+kFuvU0is0nUrsVLI4Trtyi650HRAedliNHdVolWe+R0q9zL9aBcdS6/AXlHRzKJVtcDcGlbmc3PL6mv9ec2lR1c1qxUouUVamkwnswW+lSJwwRVxTLpH1+Y2IwPt8dAfmI6BD76Q= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=akhil.goyal@nxp.com; Received: from [10.232.134.144] (14.143.30.134) by AM0PR04MB4883.eurprd04.prod.outlook.com (2603:10a6:208:c5::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1185.25; Fri, 5 Oct 2018 12:05:18 +0000 To: "Joseph, Anoob" 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> From: Akhil Goyal Message-ID: <0b682c3f-bb01-8970-f271-7ffa61cbface@nxp.com> Date: Fri, 5 Oct 2018 17:35:05 +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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Originating-IP: [14.143.30.134] X-ClientProxiedBy: BM1PR0101CA0059.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:19::21) To AM0PR04MB4883.eurprd04.prod.outlook.com (2603:10a6:208:c5::12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b34fa178-ce16-4e1a-f831-08d62abad270 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM0PR04MB4883; X-Microsoft-Exchange-Diagnostics: 1; AM0PR04MB4883; 3:SEXReoOJcCA7CdNBLSZ5sdb5D61S5rC6GLmt13TWbtwTogVoPP1KVECtXRBIn7Car/hX+9UF/SSx4FWPHzXLZb04Pmd9JThilebYiJqv+UzXTF5jr/Op8wZKn04QmVElB3jd74I1HRjBCvWs2TB7Waw/w6ypJTrj6tiuexSQJG85m0VXG6ch7MuLSzaU4R/DXY1XWF3dW9+39RibFhuc5Tv09xexJL/4xnnHQHsXQaPyBFi0iHUNIX7RORT8yuh4; 25:tsc1P6Nl2V0XVHlSYwR7p6KajWhiRd3ObWvnOQIIcTO/QQXTtMJ1AKFpwvhZqDWaQvrMcP3CqJ4tRJGOIiwItAvefwXVcrzWHtfTRJ2dBaL85ot0K5nmA4zZc8UuUI/rMQz29kbKVCx88ebDzE4GQ28dvD04wHoeVXdBuAuyvmTEb7P5vZJ5Cwu4F3jrRPq6e3QN5+EF/m3p0WeJKlwlTsqq4ZU4VJo9mlqj6kBHzr2bD4NjrTaQtiX1QflkFHweR0Y6q3Uzj07tWc/jIqz9wzjH2AjGF85as2zxe7ID7O3hC7IUNGRsQlsKth64Z82efBnj5fpB2TduvXJ2+43b+Q==; 31:5dMwM+IBqIOer6gGQ/8bHGxa0yJZw7NLEM+DXf3rlDr0FJzTX72CuIF+gIAW9VAKigFi9mwZ5cCu1l6R1sNc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cj1pVab8W8jilN1cMnMhvNBZolPzKEdhpFpkVckk 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)(8121501046)(5005006)(3002001)(3231355)(944501410)(52105095)(93006095)(93001095)(10201501046)(6055026)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(20161123562045)(20161123560045)(201708071742011)(7699051); SRVR:AM0PR04MB4883; BCL:0; PCL:0; RULEID:; SRVR:AM0PR04MB4883; X-Forefront-PRVS: 0816F1D86E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(346002)(136003)(366004)(376002)(39860400002)(396003)(51914003)(199004)(189003)(2486003)(5009440100003)(97736004)(86362001)(8676002)(81166006)(81156014)(55236004)(23676004)(52116002)(52146003)(2906002)(47776003)(16526019)(65956001)(7736002)(6116002)(3846002)(305945005)(66066001)(65806001)(31696002)(68736007)(316002)(478600001)(2870700001)(53936002)(575784001)(14444005)(53546011)(386003)(6246003)(76176011)(16576012)(8936002)(476003)(106356001)(26005)(2616005)(15650500001)(77096007)(446003)(65826007)(54906003)(58126008)(36756003)(31686004)(4326008)(229853002)(50466002)(5660300001)(11346002)(956004)(44832011)(64126003)(67846002)(486006)(25786009)(3260700006)(6666003)(105586002)(6916009)(186003)(6486002)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR04MB4883; H:[10.232.134.144]; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtBTTBQUjA0TUI0ODgzOzIzOmZqZW5DL1BOZWREVHFLZkp5SzdjdTVFd2U3?= =?utf-8?B?RDlMc21mWlUwUFpOakZ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CuQfQznY890lfnfyn/so/C/BZ5FTbCFmKYRYB8StjES0DwqoSfgFKysK4TsKXfW7wcsTk0+Xr7M22pR0pK15omriMKcV2tQ0so9HQ/YV5HeXVM8Hwq8XgHUFnFpcoBR4MKH5QV/hZ86khVs5R+YmOOqfTz2S3EBP4lN1m5dIhOjfZTMlJpTG/s+RhmsL+xzyfeOlYN1eD38ndTEjjh8Z/NlRKUJ09imSoKYQ2bT98H6YIyRL6xZw8MOtyiAuIHL21Cg9I8pWE5UgX4Gg2rea2qg5370hHdbtT8RQ==; 5:4BMtlbJ1UTXknDYKo8EpYCpdEI3tmZLJku3jfAX8kvmqA9885T9R2CabjxRbg46xkAFESU0G2Udy+2hRJcPDzXIeayIRHHBPvn178hUZW8QX/N+EcbcVyKzjPaYu+smF0B8Xahdat0WRysY/lr20cBVlpAgQFJyIIM+vp0Mw9K4=; 7:CQX2EdiCCwb5LrHb142jsBDPZ5zH86zFL5YrLcJSYY9iSmHYU+DxekEodpMfTGC1Sh9auUU1WE8ZqwphkWJAAM9/aY3x6yZFvtXsHgOPdutG03HTppmYRJYQzg/+blfwKWyLGAZEqf0ZgNuG1ctywr06J2zUGjFIBTUk8xjmAyTKDvaLleFtOjxCTScukS+tl/XfkC5tim5uofPX2afcMyIXSW4+XhEPzfqWLuYT+e215dOdQTuRKWdfghmqppEj SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Oct 2018 12:05:18.4281 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b34fa178-ce16-4e1a-f831-08d62abad270 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4883 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: Fri, 05 Oct 2018 12:05:21 -0000 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. > 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