From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10046.outbound.protection.outlook.com [40.107.1.46]) by dpdk.org (Postfix) with ESMTP id 99DC8B62 for ; Mon, 15 Oct 2018 15:04:25 +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=e8rUk4sDEfhpNaB1xkZxcLkQ/jx1WHrN3hDhfgyVz/0=; b=w4jWQgCYJjCFawGoBZ/hWiBzM4SFSvurJItcB3EN1EChjqmrZfH988yIJ4QY7MuBokDRcEjaVUUJRuOwo0z8VKGoHKsSw1qb6KyYeyuudZUJaMbh1FpPggznsY382rG5fpG7Ubxxu5KVSHBd3sQkjibTZ+oChC8CB/yAPwp4oss= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=akhil.goyal@nxp.com; Received: from [10.232.134.144] (14.143.30.134) by AM0PR04MB4884.eurprd04.prod.outlook.com (2603:10a6:208:c5::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1228.25; Mon, 15 Oct 2018 13:04:21 +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> <0b682c3f-bb01-8970-f271-7ffa61cbface@nxp.com> <26ac4ab0-bb36-918a-23fe-41833eba9e7e@caviumnetworks.com> <08b3f2b9-260f-bea0-4cc1-61a40982190e@nxp.com> <764461fa-3083-ff10-ab47-748b27e9d439@caviumnetworks.com> From: Akhil Goyal Message-ID: Date: Mon, 15 Oct 2018 18:33:56 +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: <764461fa-3083-ff10-ab47-748b27e9d439@caviumnetworks.com> 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: BM1PR0101CA0071.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:19::33) To AM0PR04MB4884.eurprd04.prod.outlook.com (2603:10a6:208:c5::13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: edb20c35-f2cd-4bdf-4b92-08d6329ebb01 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:AM0PR04MB4884; X-Microsoft-Exchange-Diagnostics: 1; AM0PR04MB4884; 3:6RVgSSAHkzn7pyzPvm9IZ714/6pqGMRowUOLpfk9HO0wUNTrbKFHqxKtAP/1/bqfDx6LaXMlj6URO11YpbaBDVGB0zR1j39pQHsQLnOWw4tAR/nSzRnu2hKrMwpuCeJ6XowNxBvtrEMAwhJKg2RMun5Cf86B3atdz6gkbakRNicKbQDr6UFEGhHGiVTYhjtQN+CmTiHA66/Lyk1HjUnQ0chwoTCICcpgaRSdOTzJOsZZ5ZZbs9ZK9KPSNgub5caK; 25:SHpH0KbZ3AwSH9aF+gRFM4/tz8LovbjSnk3yXf1d93Il3iqM7YRkUl2d7FJCAvAxKw92UoZDypi3c/pQBDxhvJIHlTsU4iwlcsdJbZzyagPfREMdORihTuQCMtL8EKh/h2qxz/+ZsofazRzp0HXFoNr6QSWo8RX0BPpO/Byeb3PDGI0wphSUeq6woim4DPEjihJTKttUzmlW+Lya82CGOVIV+zcpyb4Eo2MNfOo1dp2tjWCQsc5Vne/8r0MtNWR0iLSQ8pQPQdniG5V9DmP3vsdsk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1jOYi8ZuySyBrdP2QkkGyMx83FaK+4ymkl9+GqUc7k7/YeMsDZzRZtp6RwUSdhzjE5+nKKA7NRYJi5xs1ptmwps/hnFKBeeKuTQ2nZVdkWspbDcgo64rgq7DtAHHOj9ngI0ZaSFqcpFetdIa8LQYS1hTPAu06lZ9bPf9BSpXli8xX3JUC5Pc= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192374486261705)(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)(10201501046)(93006095)(93001095)(6055026)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201708071742011)(7699051); SRVR:AM0PR04MB4884; BCL:0; PCL:0; RULEID:; SRVR:AM0PR04MB4884; X-Forefront-PRVS: 0826B2F01B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(376002)(396003)(346002)(39860400002)(366004)(136003)(199004)(189003)(478600001)(6916009)(86362001)(15650500001)(2906002)(31696002)(446003)(11346002)(3260700006)(25786009)(229853002)(2870700001)(6116002)(3846002)(97736004)(53936002)(16576012)(106356001)(54906003)(31686004)(58126008)(105586002)(186003)(16526019)(93886005)(316002)(77096007)(76176011)(52116002)(2486003)(52146003)(23676004)(53546011)(386003)(6246003)(64126003)(50466002)(66066001)(65956001)(65806001)(14444005)(47776003)(8676002)(81156014)(486006)(305945005)(81166006)(6666004)(26005)(7736002)(956004)(65826007)(44832011)(67846002)(2616005)(8936002)(55236004)(6486002)(1006002)(36756003)(476003)(5660300001)(68736007)(4326008)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR04MB4884; 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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aGkcbrGAMC0q4Mw5kix4RrQALZDTohJetlj5rRljnR/PHJK+yUJzFAJjFAnn3qDdaRQBuhaVucEJB4wrDrmdA7/C5k0VQ3D1l+/0fUMJ3iyDPreglUMTn1gTQ5ajFyH+nPVuEY7SRQN351u2v7y3daRteE6T5kGpzfu2uhdWQAiUYkyWYU1PpiTvhtljAk/4r3sqKnCJphCaZfvgTU95TIh/b/kWrE3qPjT2EGDM5jFbE2DAoU8sUUkP7jsgLx2+JVMHITPLc5blP+lqwHTCAb3tVsvOYNgykm8FNm1s+tq+r5qCyMttL7HsAYOPTV8PrKrgct/6eeAGpd5Q0YjCX56fwSZ7e4ajUSsBZLXQIFRVNQ==; 5:SS7zh2QwVc73ltdpCYkhJ0MKvRxAmDh1y+dcb/RXdzNl38clTRl2VqmeD7q7uHrKGOeqieDjqaoaTrkcz5nOtcmhI5YJZZV7Y26HbXrl/QRx0WhLpuqo5YLdYGzcMTFVmzdhS7LaMNOHBp/V6wavNdHJpJvIdS1xg2MByrx9Xmo=; 7:3F9+GypSKrCE7YSNzAHygocciE8FKCThpZ5+suejtrNEl6jsXPwnZP9K2hXARJJ80i301VNTIRxspnNAh9Z/HulH5lBwPRpYSyEegBWT/dqmZj9iXzh74BBuIGGZCOFQ7lklSOb6UtibTfPlzU9qdNNDZxDZNHmlpree8qwWxQ/90I6eMfGjsvQpr7RZNymuf1NyiZV/8xA7MjW9G047e2d314b0iHKuZInuw5tG35K+d2QcNySkHHa586Dmm15S SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2018 13:04:21.1747 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: edb20c35-f2cd-4bdf-4b92-08d6329ebb01 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4884 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: Mon, 15 Oct 2018 13:04:25 -0000 On 10/9/2018 5:08 PM, Joseph, Anoob wrote: > Hi Akhil, > > Please see inline. > > Thanks, > Anoob > On 08-10-2018 15:19, Akhil Goyal wrote: >> External Email >> >> Hi Anoob, >>>>>> @@ -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. >> This patchset is basically talking about full protocol offload with look >> aside accelerators. >> And when we are talking about full protocol offload, all protocol >> related stuff like ordering, headers etc. >> needs to be handled by the HW/driver. >> So the expectation is driver/HW should be able to perform in order >> delivery and detect duplicates. > How will errors in these situations be reported to the application - > if packets are not in order or if a duplicate is detected - how should > driver report it? > Is the driver/HW expected to correct the order OR is the behaviour > limited to detection of out-of-order? In order to correct the order, > the driver/HW will need to accumulate packets. Is that really the > expectation of this specification I have added a setting in xform and capability for in-order and duplicate packet detection. So if the capability is there in hardware to do such processing then it will do that and report error in crypto status and if the capability is not there then application will be responsible for handling such cases. I hope this would answer your query. >> If somebody have support for PDCP in the hardware, we can add >> capabilities as per the specific requirements. >> In v2/v3 I have removed the hfn_override. Will add it later when it will >> be supported. >> >> >> Thanks, >> Akhil >