From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0043.outbound.protection.outlook.com [104.47.41.43]) by dpdk.org (Postfix) with ESMTP id 4C2DA4C8C for ; Tue, 27 Feb 2018 12:32:38 +0100 (CET) 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; bh=6ZEZiBDT5j7+TKjq36/+CpI7Zvi5XE7ZMnn+nAcVvlU=; b=Jfb60qMfn/MOOR9cBL+dO+yqcBs4ivSEABRG61S308t2EjhVfuFzRWkNvH7A/V0dZpavvXD+RxSF9ujSunfpGTPyzklp/9BIL7z517HM/cRDxtpoc/E9qJBPpgF1Yjq7qWrZ6LMQsSJV0Fsi1cif6CmztaezHRgLSEBPYYTvuLw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Anoob.Joseph@cavium.com; Received: from hyd1ajoseph-dt.caveonetworks.com (115.113.156.2) by DM2PR0701MB1065.namprd07.prod.outlook.com (2a01:111:e400:2472::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.527.15; Tue, 27 Feb 2018 11:32:33 +0000 To: "Nicolau, Radu" , Akhil Goyal , "Doherty, Declan" Cc: Jerin Jacob , Narayana Prasad , Nelio Laranjeiro , "dev@dpdk.org" References: <1516626668-9031-0-git-send-email-anoob.joseph@caviumnetworks.com> <1519191430-19201-1-git-send-email-anoob.joseph@caviumnetworks.com> <1519191430-19201-2-git-send-email-anoob.joseph@caviumnetworks.com> <763A2F19A5EFF34F8B7F1657C992EE297B32AFD8@IRSMSX104.ger.corp.intel.com> <609b5c35-4f5e-b6c5-6522-63b73504e711@caviumnetworks.com> <763A2F19A5EFF34F8B7F1657C992EE297B32B3F6@IRSMSX104.ger.corp.intel.com> From: Anoob Joseph Message-ID: <0840bf62-cc79-4af7-74f9-9e4271a572d1@caviumnetworks.com> Date: Tue, 27 Feb 2018 17:02:28 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <763A2F19A5EFF34F8B7F1657C992EE297B32B3F6@IRSMSX104.ger.corp.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [115.113.156.2] X-ClientProxiedBy: DM5PR20CA0024.namprd20.prod.outlook.com (2603:10b6:3:93::34) To DM2PR0701MB1065.namprd07.prod.outlook.com (2a01:111:e400:2472::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3544144a-9b3f-4223-0edd-08d57dd5ccb0 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:DM2PR0701MB1065; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0701MB1065; 3:29tgp6/tbrOdGApDugzdrAPWJi4TLQKo6CdGdJWPbZdstJwmozG2WYh8y8+EtLLQAgVgj8rdkXrnoByGhxrxayOMbZU7/SE/g57FsPmJ75BLdIaWKdc2MRNHWVIk9ryxbRB6nQZMjYwhcU7aq56eLWzrOXuVRXtPkidJ5SJrUHVsjADreqc/ZlnkNV7o/U61gKs8ovDUAjT36oWtLe/W3OHw5A7W3oCoHDRDHVl6X9eUhVX3bJ7xzhvxfCDEN2n4; 25:TK2P6qLttbJH24eRTWimMrkerjkvoTrqCjk6ecBqIhhu9Z1MnoDm2VQUwqzY6g9Ozoz9DaAivWA1+/UYEzhroI3dpId+f2Ax7qhUKL4INqSGpVFgMmzxupTbhuQMC+0Dh1wnDP19U4bcy8lY5gqN3zuNd04EpIsd+HZy//vuQlvxmcfVk9mquHRBiJQgDQlHqU+N2faY0NKPvR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u0ziuaJKOl0Rso= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192374486261705)(185117386973197)(211171220733660)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040501)(2401047)(5005006)(8121501046)(10201501046)(93006095)(3231220)(944501161)(52105095)(3002001)(6041288)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011); SRVR:DM2PR0701MB1065; BCL:0; PCL:0; RULEID:; SRVR:DM2PR0701MB1065; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0701MB1065; 4:Jn9QaavCTLevpGsWuq2nPQnyIJVicJjrFG4J0eBruPvfKn/woax3+kIG5i+tZLqMZDJC0WxnsIHZP+XkP1NuF28Y+Un2YoBfCL+eFHtNuTjdzgbXb2S5mkTCkIEpKi+IFfY1+2zVRALhipav8A75dPJ5+SCejickpLYBUAmudLIKynr3XcYY7h0eZGJ1PUlDbEzFsbqmoIFYYsB4qXdvfy6yInKC7JasQQU9SioDHJJR5ia/tOlpslI9QBT+cWxOcKm4Moups0Po0WCm4qGi/FYlRK0dm+vIZHEq1nLMFJDUCzG3yBfZaBpCL20pXkAJWUJhKjuUnxQ9wlHZTKT4qzWXvUrNYna8ccIps3zS3wO1xdOSe4BkwV/F/1eX49UIOPdS0rDWCSMvrV+YkzZBMPAzKogg0lv6HZmqORZ2NRw= X-Forefront-PRVS: 05961EBAFC X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39850400004)(346002)(39380400002)(376002)(366004)(396003)(57704003)(13464003)(199004)(189003)(6486002)(65806001)(53546011)(6506007)(52116002)(2906002)(230700001)(4326008)(6246003)(229853002)(36756003)(386003)(106356001)(54906003)(23676004)(52146003)(186003)(2486003)(69596002)(59450400001)(66066001)(55236004)(65956001)(47776003)(76176011)(97736004)(105586002)(31696002)(58126008)(25786009)(53416004)(6666003)(7736002)(31686004)(6116002)(68736007)(3846002)(42882006)(110136005)(50466002)(65826007)(64126003)(93886005)(26005)(8676002)(72206003)(6306002)(2950100002)(8936002)(8656006)(67846002)(5660300001)(81156014)(81166006)(966005)(16526019)(305945005)(478600001)(316002)(6512007)(53936002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0701MB1065; H:hyd1ajoseph-dt.caveonetworks.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTJQUjA3MDFNQjEwNjU7MjM6WFI5WWVHMXhKMkcxUHJjSGlOMmZsbUdm?= =?utf-8?B?OTdXTk5qR1JUak13L1piTnhKS29kVndpNGptQnlQV0RSNlZ1eWdXc0llQmQ3?= =?utf-8?B?a1UwUkkwTEVJZ0kvNFJkdWhvZ2NuaitVL0ZxNE4rUVRZK29QRkpHbkIxbzZP?= =?utf-8?B?NjFudlVTeEdRT1JiVnUxWjYvaEZrZ3lsUHkvbmRvNEpxdUZtR1BTc0svckQx?= =?utf-8?B?MmdQY1QwdmVEMnVFZW50cGtlOTdzdEp0citWZnBYQnhHdG8yMFZ3ZDhoNStK?= =?utf-8?B?alpkRk1KQ3dJSkRISUMyUzllc29HTm55NGh6V1g3YkRyajhrSjNvVGhpbjRV?= =?utf-8?B?NHQ2eCttS3JYbFBjN2JubUI3M1RxK1hZNUFWcFJFTlVIWWR5STd0TmNmMDVn?= =?utf-8?B?TWt0c3F5YmhTSC9ib2lJaUkrNDE2aDQwbmgyMERoSkxlT0hneDdoSzlrQmxF?= =?utf-8?B?elBJYmtydzZKUHBmVjU1dGdEUjR5UEtQQWp6SkVGeWNKNmJEV25FbzkyZW54?= =?utf-8?B?eHg4Q0U4MlpLOEVPTlVMdnNtaXliUEZJYzB5S2xkU01ZTTVVU2pMcEZhaVpY?= =?utf-8?B?WTdTNHN3SHFYNnNDWkpubUJKcFEzYmRwZllianB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dIQjNcuB8nJRgj31+vflhhLs17+QTfpf3Bye+5h0G98WEwU3eLTERd6BRs=; 5:Xh9pYS7mrpPHjH8Or7sgfQeIuz18uqWHgD/odqZdRJq6yuhdOgWE1BGvEPenkU0K0H3dCUEXqYRffQhMxmy6ULCQBOnVdfaup00rFSpZgEMNK27lCRG5J4GCX9JPdZ3b/fnGdxoD8Slj3ca9loVzj+BFCp5NtcBKqdHbQt3CLPk=; 24:oiEaXdONvX2WpDFB/pPBZmqPsTLalpkYUtJ5euXz2aao89qNwmcD+RM38QkcS+qnQ3eJz2oZlaSfbb64zqrfDbGseUolLbqYHmvy1tBFkUs=; 7:/JjBQQfMrHYGuM/mEeakE81tBLYpUXj5MZlRGmq6m1Ydr6bduwV8XnpbvO/5waCegigjTmmSWG33bLT/6MoaLhTMOYipoFjZj8pCbh8zou/2Eq02UKUOpOY02uwDf0qLAYP00hBeFxlXOIWGJ0Mfv95j++iqOOlNxfe3W0SUjWsCr+SFCTcW8jqwHnCC3Lfg5Qss0u5OINbcPW435NMdcXevror+pF7XLn/UmWOBDfWx3nfIC4u9RMIFSeviAtoO SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2018 11:32:33.4326 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3544144a-9b3f-4223-0edd-08d57dd5ccb0 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0701MB1065 Subject: Re: [dpdk-dev] [PATCH 1/5] lib/ethdev: support for inline IPsec events 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: Tue, 27 Feb 2018 11:32:38 -0000 Hi Radu, Please see inline. Thanks, Anoob On 27/02/18 15:49, Nicolau, Radu wrote: >> -----Original Message----- >> From: Anoob Joseph [mailto:Anoob.Joseph@caviumnetworks.com] >> Sent: Tuesday, February 27, 2018 6:57 AM >> To: Nicolau, Radu ; Akhil Goyal >> ; Doherty, Declan >> Cc: Jerin Jacob ; Narayana Prasad >> ; Nelio Laranjeiro >> ; dev@dpdk.org >> Subject: Re: [PATCH 1/5] lib/ethdev: support for inline IPsec events >> >> Hi Radu, >> >> Please see inline. >> >> Thanks, >> Anoob >> >> On 26/02/18 15:05, Nicolau, Radu wrote: >>>> -----Original Message----- >>>> From: Anoob Joseph [mailto:anoob.joseph@caviumnetworks.com] >>>> Sent: Wednesday, February 21, 2018 5:37 AM >>>> To: Akhil Goyal ; Doherty, Declan >>>> ; Nicolau, Radu >>>> Cc: Anoob Joseph ; Jerin Jacob >>>> ; Narayana Prasad >>>> ; Nelio Laranjeiro >>>> ; dev@dpdk.org >>>> Subject: [PATCH 1/5] lib/ethdev: support for inline IPsec events >>>> >>>> Adding support for IPsec events in rte_eth_event framework. In inline >>>> IPsec offload, the per packet protocol defined variables, like ESN, >>>> would be managed by PMD. In such cases, PMD would need IPsec events >>>> to notify application about various conditions like, ESN overflow. >>>> >>>> Signed-off-by: Anoob Joseph >>>> --- >>>> lib/librte_ether/rte_ethdev.h | 22 ++++++++++++++++++++++ >>>> 1 file changed, 22 insertions(+) >>>> >>>> diff --git a/lib/librte_ether/rte_ethdev.h >>>> b/lib/librte_ether/rte_ethdev.h index 0361533..4e4e18d 100644 >>>> --- a/lib/librte_ether/rte_ethdev.h >>>> +++ b/lib/librte_ether/rte_ethdev.h >>>> @@ -2438,6 +2438,27 @@ int >>>> rte_eth_tx_done_cleanup(uint16_t port_id, uint16_t queue_id, >>>> uint32_t free_cnt); >>>> >>>> /** >>>> + * Subtypes for IPsec offload events raised by eth device. >>>> + */ >>>> +enum rte_eth_event_ipsec_subtype { >>>> + RTE_ETH_EVENT_IPSEC_ESN_OVERFLOW, >>>> + /** Sequence number overflow in security offload */ >>>> + RTE_ETH_EVENT_IPSEC_MAX >>>> + /** Max value of this enum */ >>>> +}; >>> I would add some more events to the list (to make it look less like a very >> specific case implementation): crypto/auth failed and undefined/unspecified >> being the most obvious. >>> Apart from this, the patchset looks fine. >> Understood your point. But crypto/auth failed would be per packet, right? >> How are we handling such error cases presently? Just want to make sure we >> are not adding two error reporting mechanisms. > The only reason for my suggestion was to keep the API as flexible and generic as possible. I agree to your suggestion. > For the inline crypto on ixgbe we only flag the mbuf with the security error flag, but no extra info is added. I guess we can have a ipsec crypto error event with a list of failed mbufs or similar. In any case, it's just a suggestion. Do you think having a crypto error with failed mbufs would be useful? If yes, I can add that. While considering other SA specific events, there could be two other such events that we may need to consider. 1) Byte expiry of SA [1] 2) Time expiry of SA [1] Shall I add these events? Or do we need to make that a separate patch? Considering that it would need an entry in conf for actually of any use. [1] https://tools.ietf.org/html/rfc4301#page-37 > >>>> + >>>> +/** >>>> + * Descriptor for IPsec event. Used by eth dev to send extra >>>> +information of the >>>> + * event. >>>> + */ >>>> +struct rte_eth_event_ipsec_desc { >>>> + enum rte_eth_event_ipsec_subtype stype; >>>> + /** Type of IPsec event */ >>>> + uint64_t md; >>>> + /** Event specific metadata */ >>>> +}; >>>> + >>>> +/** >>>> * The eth device event type for interrupt, and maybe others in the >> future. >>>> */ >>>> enum rte_eth_event_type { >>>> @@ -2448,6 +2469,7 @@ enum rte_eth_event_type { >>>> RTE_ETH_EVENT_INTR_RESET, >>>> /**< reset interrupt event, sent to VF on PF reset */ >>>> RTE_ETH_EVENT_VF_MBOX, /**< message from the VF received by >> PF */ >>>> + RTE_ETH_EVENT_IPSEC, /**< IPsec offload related event */ >>>> RTE_ETH_EVENT_MACSEC, /**< MACsec offload related event */ >>>> RTE_ETH_EVENT_INTR_RMV, /**< device removal event */ >>>> RTE_ETH_EVENT_NEW, /**< port is probed */ >>>> -- >>>> 2.7.4