From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0058.outbound.protection.outlook.com [104.47.0.58]) by dpdk.org (Postfix) with ESMTP id 6023B1B2CA for ; Mon, 29 Jan 2018 10:08:26 +0100 (CET) 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; bh=ZH+Yhhzb9aO8zaFjrdUgvGB2PVe9FIHPXkIpBeoan3w=; b=nSLmhFUiTB2xGSiV9DNH+BeCHPJse/Qag3JFNztm96jXw7iAhJAPG6EbtmZznjPVW2jq0TpB1pIuUyMe1YtEEvjJTIRL+Okz/wG7pFkfmdgeHjwF8eJudkeaSnFBERBtZkIfBmEjiiWrg3XsZ2ZcL8O2QJZebj3k1HCgFj/8DXU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=akhil.goyal@nxp.com; Received: from [10.232.134.49] (192.88.169.1) by AM3PR04MB1380.eurprd04.prod.outlook.com (2a01:111:e400:536a::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Mon, 29 Jan 2018 09:08:20 +0000 To: Anoob Joseph , "Nicolau, Radu" Cc: "Doherty, Declan" , "Gonzalez Monroy, Sergio" , Jerin Jacob , Narayana Prasad , Nelio Laranjeiro , "dev@dpdk.org" References: <1516626668-9031-1-git-send-email-anoob.joseph@caviumnetworks.com> <4ab55855-0649-4d68-7b63-b75a6029dbb2@caviumnetworks.com> <763A2F19A5EFF34F8B7F1657C992EE297B31E1D5@IRSMSX104.ger.corp.intel.com> <763A2F19A5EFF34F8B7F1657C992EE297B3202FA@IRSMSX104.ger.corp.intel.com> <8c1b457a-d6ea-1a56-cd73-385108f8c538@nxp.com> From: Akhil Goyal Message-ID: <5a9fe008-03a6-a7df-6a8c-abab60b8ad27@nxp.com> Date: Mon, 29 Jan 2018 14:38:05 +0530 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [192.88.169.1] X-ClientProxiedBy: HK2PR02CA0190.apcprd02.prod.outlook.com (2603:1096:201:21::26) To AM3PR04MB1380.eurprd04.prod.outlook.com (2a01:111:e400:536a::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: a82670bd-5e90-48c7-e07f-08d566f7da1b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:AM3PR04MB1380; X-Microsoft-Exchange-Diagnostics: 1; AM3PR04MB1380; 3:IUeK3CFk54SSneMf2QqKKNzfDLMbSZ1i9yzAeKVxV7e6C+9MXUxX9e76nhHTD9kYk9CaKekOI22qdF8ZH2F722Nc2/q1hwCTmGNUiREcBZ+BpGMkRQxiN7umqeRDwRVCe1WYQWoALg+t6WLzHnoMFkBOC6xrDmSgxo5VwQylWnzcLoaJQpAhjvnT1hmMvEqUHzNOs/CUzqzcjjpf7UowkWoAQIjevtxsC47ku/qY9wJJbWD8Hk5qTkNdibku0X1Q; 25:lkBvuYuddB+LVoSvQwGaFzSo4di3aO2S3J4V3lkm4ZqI4uMGXcyew8xLnq5pOh7vUAdqFXPUILL0VOXjQ+GaHBdNx6Hg4yOZGk+7tciZYDt3PSA/u7lCwSANBfN9UqiC/kuLzE545rB9HQ/O0nXERBueGnQHJwzxt+rsL3EQSP32I3DVvUIvMmSfPlEYE8T9nRkWPeVNc6fNxIEWNHxN+VcTqJdlkO5VNfuHoximt5zOfQJ6ROm7B1dpHA+/zLWMpt/cHxFd2PeAXEYOOT8HPbnVSTAOxyKP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82Wq08oCgJ8m3OatMlyZDS4HBRk5MU/7BQZ7JOyIAFKvqiNsZsOk3UMm4T3VPyOcTD3IjPq8WFeQlFbYy/mEjU70boRnT7ot2LWOy2RTzFrjaR0ZB6Qdkpxx7qxkD7gqoTSN+OW8OooLTCSeLiYIs43ySFvNxYOEMUXLXdPtJEkR0dIunYJ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192374486261705)(185117386973197)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3002001)(3231101)(944501161)(6055026)(6041288)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:AM3PR04MB1380; BCL:0; PCL:0; RULEID:; SRVR:AM3PR04MB1380; X-Forefront-PRVS: 0567A15835 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(366004)(376002)(39380400002)(346002)(396003)(39860400002)(189003)(199004)(13464003)(2486003)(65826007)(54906003)(305945005)(316002)(2906002)(52116002)(97736004)(58126008)(76176011)(23676004)(65806001)(229853002)(16526019)(6666003)(64126003)(16576012)(65956001)(66066001)(230700001)(2950100002)(77096007)(110136005)(4326008)(5660300001)(8676002)(59450400001)(81166006)(53546011)(26005)(31686004)(386003)(50466002)(53936002)(52146003)(561944003)(6486002)(47776003)(83506002)(31696002)(36756003)(106356001)(478600001)(3846002)(7736002)(86362001)(25786009)(68736007)(93886005)(6246003)(8936002)(6116002)(81156014)(186003)(67846002)(105586002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM3PR04MB1380; H:[10.232.134.49]; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtBTTNQUjA0TUIxMzgwOzIzOm1BQ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aA5FtNm5vOJVwQWp7EnMTaD5KwMLClvGwkpLmXMjJXW7F1NJO16EflcRGodA/75Knv3CJR58aSpGQtgGDVDJIfGVo2ou7QF3qyJDtLMpy6UVj7RGpmGhf4sUwPAEuWLUPmwAAOvGnTIk2G8mdCqCCXVPzPRgFT SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2018 09:08:20.0163 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a82670bd-5e90-48c7-e07f-08d566f7da1b X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM3PR04MB1380 Subject: Re: [dpdk-dev] [RFC 0/3] set protocol specific metadata using set_pkt_metadata API 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, 29 Jan 2018 09:08:26 -0000 On 1/29/2018 1:33 PM, Anoob Joseph wrote: > Hi Akhil, Radu, > > > On 01/29/2018 01:02 PM, Akhil Goyal wrote: >> On 1/26/2018 8:38 PM, Nicolau, Radu wrote: >>> >>> >>>> -----Original Message----- >>>> From: Anoob Joseph [mailto:anoob.joseph@caviumnetworks.com] >>>> Sent: Friday, January 26, 2018 2:38 PM >>>> To: Nicolau, Radu ; Akhil Goyal >>>> >>>> Cc: anoob.joseph@caviumnetworks.com; Doherty, Declan >>>> ; Gonzalez Monroy, Sergio >>>> ; Jerin Jacob >>>> ; Narayana Prasad >>>> ; Nelio Laranjeiro >>>> ; dev@dpdk.org >>>> Subject: Re: [RFC 0/3] set protocol specific metadata using >>>> set_pkt_metadata >>>> API >>>> >>>> Hi Radu, >>>> >>>> On 01/26/2018 04:52 PM, Nicolau, Radu wrote: >>>>> >>>>>> -----Original Message----- >>>>>> From: Anoob Joseph [mailto:anoob.joseph@caviumnetworks.com] >>>>>> Sent: Thursday, January 25, 2018 5:13 PM >>>>>> To: Akhil Goyal ; Nicolau, Radu >>>>>> >>>>>> Cc: Doherty, Declan ; Gonzalez Monroy, >>>>>> Sergio ; >>>>>> anoob.joseph@caviumnetworks.com; Jerin Jacob >>>>>> ; Narayana Prasad >>>>>> ; Nelio Laranjeiro >>>>>> ; dev@dpdk.org >>>>>> Subject: Re: [RFC 0/3] set protocol specific metadata using >>>>>> set_pkt_metadata API >>>>>> >>>>>> Hi Akhil, Radu, >>>>>> >>>>>> Could you review the patch and share your thoughts on the proposed >>>>>> change? >>>>>> >>>>> Hi, >>>>> >>>>> I've had a quick look. From what I can see you can do everything >>>>> you do in >>>> this patch with the current API. For example you can store an >>>> internal struct >>>> pointer in the private section of the security context and you can >>>> increment >>>> the ESP SN with every tx or set metadata call. >>>> With the current API, PMD could store the ESN with the security >>>> session, but >>>> there is no means for the application to read this. Application >>>> should be >>>> aware of the sequence number used per packet. This is required to >>>> monitor >>>> sequence number overflow.In the proposal, the sequence number field is >>>> IN-OUT. So application could either dictate the sequence number, or >>>> read >>>> the value from the PMD. >>>> >>>> Thanks, >>>> Anoob >>> >>> My concern is that we are adding too much and too specific to the >>> security API. >>> Overflow situation can be monitored with a tx callback event or a >>> crypto callback event, depending on the device type. >>> >> Agreed with Radu, this looks too specific information. >> Instead, we can do overflow checking in the driver and add a macro in >> rte_crypto_op_status for overflow. > We could do the callback when sequence number over flow happens, and > IPsec processing fails subsequently. But ideally, application should be > able to detect that the sequence number is about to over flow and > renegotiate the SA while the original SA is still valid. I agree that we > would be better off by handling this in the driver. But application > would need some sort of event which would say, "sequence number is about > to overflow, renegotiate SA", before the current SA becomes invalid. > > Do we have any mechanism to register a callback (acting on mbuf), when a > particular event occurs (without dropping the mbuf)? If yes, we could > move to that approach. > > rte_crypto_op_status could be leveraged for lookaside_protocol, but can > we do something similar for inline protocol? Thoughts? Even in case of inline protocol, what is the issue in doing that? You can write a similar code in the driver(if hardware doesn't support that) instead of application for handling the sequence number overflow as well as anti-replay. Both of these errors are protocol specific and for full protocol offload, application need not bother about this. Application should be as clean as possible in case of protocol offload. - Akhil