From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0057.outbound.protection.outlook.com [104.47.42.57]) by dpdk.org (Postfix) with ESMTP id 5AE561B00F for ; Wed, 10 Jan 2018 07:21:57 +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=YHlmbg+Ysn3art7IWrQUb29TVB/h62Y18e7VkX1fTjQ=; b=npiIa8FSjjKgpbz0E2OgTEAxnxoafS8QuU6ijHb0yVAFQsioSdxTYzn4FhfwabZseqBn3Y+Pqb89kAa6c2ipt6ViWuFxRNBRKbmfW1tzK8LEDfwQSiXBaD7b8miGJopEqz8dyqUF14KXAD1b7HQ7FEtnr37jub+YSYMGFeT+qNc= 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.386.5; Wed, 10 Jan 2018 06:21:49 +0000 Cc: anoob.joseph@caviumnetworks.com, Adrien Mazarguil , Boris Pismenny , Sergio Gonzalez Monroy , Radu Nicolau , Aviad Yehezkel , Liran Liss , "dev@dpdk.org" , Jerin Jacob , Narayana Prasad To: Nelio Laranjeiro References: <20171213100237.uvpbg2qewhxqgaln@laranjeiro-vm.dev.6wind.com> <817bec1f-4bff-ebdc-07b4-f8f24ec2084a@caviumnetworks.com> <20171213125353.2zyllxk7pwkncm76@laranjeiro-vm.dev.6wind.com> <577d100a-d021-1219-89e3-721e02b77b90@caviumnetworks.com> <20171213144710.tyqvcvpkrymzqriv@laranjeiro-vm.dev.6wind.com> <3a91e865-ca96-09d4-b842-7e5d0a5ad6e1@mellanox.com> <20171221142235.GL5377@6wind.com> <6de0bb26-11dc-f7b3-cc87-dd1f3a00723c@caviumnetworks.com> <20180109124820.6t2cawqb5ot7difc@laranjeiro-vm.dev.6wind.com> From: Anoob Joseph Message-ID: Date: Wed, 10 Jan 2018 11:51:43 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20180109124820.6t2cawqb5ot7difc@laranjeiro-vm.dev.6wind.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: MWHPR1201CA0024.namprd12.prod.outlook.com (2603:10b6:301:4a::34) To DM2PR0701MB1065.namprd07.prod.outlook.com (2a01:111:e400:2472::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3f6c5440-e70a-4cfa-5b99-08d557f27149 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(7168020)(4627115)(201703031133081)(201702281549075)(2017052603307)(7153060)(7193020); SRVR:DM2PR0701MB1065; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0701MB1065; 3:zO4lB0G9yV1Dqe/4GNENLYEUy010K4FflyAzUE5BgYDwQ40aLTG9es1lK5+8rMyk799PvhroCBkz/4OFriM3i0qHi9FBYfMF5Tzni04f00rwu6oP8zPzY5uXjoCcBMa43YFzLiJ8O1kIdklIYf+DBSN4eRm5cwJr1kxSY5uESprgOSZMBTCL5dP2cBfyoNQzf2YReHL39KjmL9Usk0YC9JQQJfX0LE7RYYNzwEXaXa/oO0A9A/lsoR+HTF/p8ueP; 25:x+Fg4/0ilnK1aFfEoiOlENfC7lyoFUd6XFfUYbP1Ds0K27KhtWE4FkfR0vt8KSntaPZHxhl30zjqCHnXXqr9VcXA20WqjplyQW4gOPAv5njJ0EcCTzB2fEFlEpz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DjvZNd8BNrlbO5pk9yL7f6KxyRy4uBDtGsj0tZ2Ns+WsRvw9zrdKDCL9RUxqOlEiR2+YahL0Kc76FJ0= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192374486261705)(788757137089); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(5005006)(8121501046)(3002001)(10201501046)(3231023)(944501075)(93006095)(6041268)(20161123558120)(20161123562045)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:DM2PR0701MB1065; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:DM2PR0701MB1065; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0701MB1065; 4:Q2DmQ11WdQiejY5/AQTFOBaVbHA/VBwhvSRHysXz8YfHbgYaFEZAVSIj8JNT6lEkGjE1R6HrhO0vYr1ExanF9w0BKt9wRyGlbaQZ61skyh8Ke7AnRKvuWs6+a/X7cmK0jp63bSDpx537SfWTHbLSmICvYRbuAdGRArz+42Y2q4iosJAU6mAY/SHh6eJ+K82LwpryqztTxLgD31S0hEgOhhf9h75ITC/jylxRQvpklfD84TXqWpaMqA3M17Mi3V6GnESTmL3a8c92WsYWAj8RarV5zu2ymYK2RSbeVX/xIB6wRFQTVixxjWGJLuzlba8BuDki0h0BCZRfFcUA4DUy/Q== X-Forefront-PRVS: 0548586081 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(366004)(346002)(39860400002)(396003)(39380400002)(199004)(189003)(24454002)(51444003)(478600001)(8676002)(106356001)(2906002)(81166006)(81156014)(4326008)(68736007)(93886005)(67846002)(105586002)(6486002)(66066001)(65956001)(966005)(65806001)(64126003)(65826007)(50466002)(47776003)(230700001)(72206003)(8936002)(25786009)(16526018)(7736002)(5660300001)(229853002)(83506002)(6666003)(31696002)(305945005)(6916009)(42882006)(2950100002)(69596002)(316002)(31686004)(36756003)(6246003)(76176011)(53416004)(6116002)(3846002)(53936002)(54906003)(52146003)(23676004)(52116002)(53546011)(107886003)(6506007)(97736004)(386003)(55236004)(6512007)(58126008)(6306002)(59450400001)(2486003); 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?MTtETTJQUjA3MDFNQjEwNjU7MjM6dG5IK3A4Zmc2MXZrV0VVc3ZHdVBzQ1pm?= =?utf-8?B?SUtmRjVXYk1XQlhwUVpKcGxuZFpYRGhxc3RJSkg4STBPRGVZTWVJRG03OUV3?= =?utf-8?B?cDFhK01QUGJXbnNCNUExbGJNQjUxaHZVMldsZU1SQzBpSmdxNnQ1QVlFYWNo?= =?utf-8?B?YlNoUURWdXF0YzhGUkNRbmpTMmRyMTkvZzJWV0h1K2dzdDRsQ3dmeWdUcGkv?= =?utf-8?B?U2JMWnRYTTRWN0ZEcUI4Nkl5T0JObm5neTRieXV5eFNXb3dwRHZCaWhJYW1J?= =?utf-8?B?UHNsMDZDRklSVGI0cFA3VEhDSWtkUjNaSWdDVDBMQVRTYTJiOGxVSnpKWmc0?= =?utf-8?B?a2tTRktJTzdoSnEzTjhDNE1WbjFpM1p5LzRQTEZvZXIrYnM0RTFDMVE3OVVh?= =?utf-8?B?YW5uSWhMSHhJZ2t3SytmdEFvMVdZQnBVVzdPOEg2RjZra0hLcDBBTjlFU09J?= =?utf-8?B?aS91TjdLcnZQRGlhWWtBRGlFSVFQaC9oMUpvYkR4L2tYZEVZNDIvVjZCUlNH?= =?utf-8?B?bFRBS1ZpZys2bGhuczVGemQvek5ENENMRjV0eno5RXlPcmtEWm9mbE9TR0hS?= =?utf-8?B?RFowMXU4eWFuOWRSVjVTR1FFQ2hURHl2cEZmSDl3SzJtakhqNEFkd0phR0lK?= =?ut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xLEKY7NqRPvz/gH4BTmMPmcIJBRiyJ5clf3/N6FdsGxgYuPkwqZw=; 5:Wt8cbcI5HkcsGWjG+rzBnN2USHaZEKOCHtKPahZTfYaOekTEgdLP9Jp7UUFCndKe7KMLryuNXJTsP+oCLBAzrRjD4y++A2haGoPnwmy3xIZN3ok5BnZpnnMiVYzYYgtAB5Y4CxfbqlYkkVsZfhKFLZvnQzY1CVDsn61KxcWe4Oo=; 24:0BU4WtdVPyKz6V5ahlya7iACWk5mhJvUvlHvK+kjCDlcLT+RCX3D1a85W52Q14C9w4FMdcprHU/xPuFtfD1s75W2rYb/qYsXRhhV/M03vic=; 7:JtDnHhqtBnfWoVHgIh0PNaIQbXlr3Ka9c+9QIkV8y25uRrxaeyVEn39trPnNsX8gp/NIDeMPae2C3OMq8dDZLUs+Kxc7GC5xbMr0b0zDFS77KmeTFByJalMOTucT/PUtYJt1mIBvWVsf1IMDEzwVOg8jtm13qP4xKKOFALPllANMWfY4rEHGuLIRY5AcRB12sHBqNhtjKXo4KxJQP6GvcVCgSTaScZybJJq/DhSkVyWnUKg3IUGgRRS8LNcmCFaZ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jan 2018 06:21:49.2285 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3f6c5440-e70a-4cfa-5b99-08d557f27149 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 v3 2/2] examples/ipsec-secgw: add target queues in flow actions 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: Wed, 10 Jan 2018 06:21:58 -0000 Hi Nelio, On 01/09/2018 06:18 PM, Nelio Laranjeiro wrote: > Hi Anoob, > > On Fri, Jan 05, 2018 at 11:48:50AM +0530, Anoob Joseph wrote: >> Hi Adrien, >> >> >> On 12/21/2017 07:52 PM, Adrien Mazarguil wrote: >>> On Thu, Dec 21, 2017 at 12:12:29PM +0200, Boris Pismenny wrote: >>> >>>> On 12/21/2017 10:06 AM, Anoob Joseph wrote: >>> >>>>> I can see the benefits of using rte_flow in both rx & tx, but this >>>>> unnecessarily introduces hardware requirements for supporting inline. >>>>> Rte_flow would do two operations: >>>>> 1) Pattern matching >>>>> 2) Perform some operation with the above matched packets >>>>> >>>>> Issue is with pattern matching, not about performing the operations >>>>> specified. If we need rte_flow in the tx, the PMD should support pattern >>>>> matching in software or hardware. Since the application will have to do >>>>> a lookup in it's space to determine the SA, the secondary lookup in the >>>>> PMD may not be necessary. But making rte_flow mandatory would make tx >>>>> side pattern matching mandatory, which may not be supported on all >>>>> hardware (with inline crypto/protocol). Also the pattern matching >>>>> hardware module should be able to submit to inline performing module for >>>>> this to work. >>>>> >>>>> May be the right approach is to decouple pattern matching from actions >>>>> to be performed for the flow. In other words, add a new API to allow >>>>> application to submit a packet to a flow. In such case, application >>>>> could do the lookup and submit packet to a flow. The packet submitted >>>>> could be validated to see if it is matching the flow properties. If it >>>>> is matching, then the actions specified for the flow would be performed. >>>>> Adding such an API will allow rte_flow to be used with hardware which >>>>> doesn't have packet filtering features. >>>>> >>>>> The flow could have a "pattern item" which would say whether application >>>>> can submit packets to the flow. Submit would be allowed only for those >>>>> flows. flow_validate would give PMD the option to accept or reject such >>>>> a model. This may need some thought before we can start implementing, >>>>> like, whether we should support "submit" for flows which doesn't have >>>>> terminating action. >>>>> >>>>> Any thoughts? >>>> I think that your suggested API is more or less the intended use of rte_flow >>>> egress actions with rte_security. >>>> >>>> Would it be wrong to say that you could use rte_flow without doing pattern >>>> matching in HW or in the PMD in the data-path? >>>> Suppose that your HW doesn't support pattern matching on tx. But, you do >>>> support IPsec inline crypto on tx according to user provided pointers that >>>> you set in the set_pkt_metadata callback. The user will call rte_create_flow >>>> with some pattern, in response you check that the driver's set_pkt_metadata >>>> could handle such patterns and actions on tx. If yes, then return success, >>>> otherwise return false. The successful creation of the flow will indicate to >>>> the user that packets with this format will be offloaded. Packets with other >>>> formats will not get offload and set_pkt_metadata for such packets shouldn't >>>> be called! >>>> >>>> When using rte_flow with IPsec, it is used not to indicate that HW must do >>>> this pattern matching. But rather to indicate that software will send >>>> packets that match a pattern with proper metadata and expect an action to be >>>> applied. Software cannot expect this action to be applied unless the packet >>>> matches the pattern and the proper metadata is provided. For example, >>>> packets with IPv6 extension headers should not go through IPsec inline >>>> crypto offload if the pattern is IPv6/ESP because the next IP protocol must >>>> be ESP. >>> I think there's already a way to satisfy everyone regarding context >>> requirements on TX without the huge penalty of SW parsing in case HW doesn't >>> support matching on egress. >>> >>> While seldom used at the moment, rte_flow patterns can match packet >>> meta-data (see meta pattern items); for instance RTE_FLOW_ITEM_TYPE_PORT >>> matches a physical port of the underlying device. This works both with >>> ingress and egress. >>> >>> For ingress, RTE_FLOW_ACTION_TYPE_MARK can be used to add meta data to >>> selected packets. While for egress such an action doesn't make much sense at >>> the moment, the converse meta pattern item (RTE_FLOW_ITEM_TYPE_MARK) could >>> be useful to let PMD know what needs to be done with packets submitted by >>> the application and containing a given mark. >> Good suggestion. For ingress this would help. The only problem with this is >> the size of ID. Since it is 32 bit, this particular mark cannot be used to >> save and retrieve application pointers. If it was 64 bit, this could've >> solved all the metadata problems. >> >> For egress, PMD would still need to do a lookup as, the mark ID would be 32 >> bit and has to be matched with the same in various flows. Though this is >> better than what we have right now(with flows), this may still be more >> costlier than "set_pkt_metadata" method. > It depends on how you implement it, it can be a simple table using it as > an index, it can be a simple hash based on the tunnel informations, > etc... Yeah. I see your point. It can be an index that is set per packet. This index will be obtained from the driver as the flow is created, and will be saved along with SA. This can be used to uniquely associate a packet with a flow. > > set_pkt_metada() has two issues: > > 1. it is device specific [1] as described in the API. For an > application it is unusable. > > 2. it is a function called per packet which is costly and don't give > any benefit for an application which can directly store the pointer > in the mbuf without calling such function. For inline crypto mode, the only thing that set_pkt_metadata does is associate a packet with a particular security session. The above discussed model could replace that. But for inline protocol, that may not be the case. In fact I'm in the middle of drafting a patch which will enable the application to set & retrieve sequence number & IV used while protocol offload. For such cases, there will be more use cases for set_pkt_metadata than just storing a pointer. The idea is, in such cases application would need to send per packet information. In inline crypto, it wasn't necessarily per packet (setting security session pointer, which was per SA), but for inline protocol, there will be per packet variables that the application would need to communicate. For inline crypto, the "MARK" idea should be fine, but for inline protocol that may not suffice the requirement. >>> That way, PMDs that do not support egress packet matching wouldn't need to >>> lie and would reject rules such as: >>> >>> flow create X egress pattern ip / udp / end actions whatever / end >>> >>> But would accept: >>> >>> flow create X egress pattern mark is 42 / end actions whatever / end >>> >>> PMDs could also support combinations (remember the position of meta items >>> within a pattern is not significant) to only perform whatever for UDPv4 >>> packets marked with 42. Non-marked packets would go through unmodified: >>> >>> flow create X egress pattern ip / udp / mark is 42 / end actions whatever / end >>> >>> This is just to point out how leveraging meta pattern items on egress is one >>> possibility using MARK as an example. >>> > Regards, > > [1] https://dpdk.org/browse/next/dpdk-next-crypto/tree/lib/librte_security/rte_security.h#n331 >