From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0897342F93; Wed, 2 Aug 2023 13:01:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8F28A40DDB; Wed, 2 Aug 2023 13:01:10 +0200 (CEST) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 95EC24021D; Wed, 2 Aug 2023 13:01:08 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id 5C1BE20634; Wed, 2 Aug 2023 13:01:07 +0200 (CEST) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [PATCH] ethdev: introduce generic flow item and action Date: Wed, 2 Aug 2023 13:01:05 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D87AB9@smartserver.smartshare.dk> In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35D87AB8@smartserver.smartshare.dk> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH] ethdev: introduce generic flow item and action Thread-Index: AdnFIdkpM2GpYjexRNKzjoB4hBOiOAABxMkgAAFQ+LA= References: <20230802173451.3151646-1-qi.z.zhang@intel.com> <98CBD80474FA8B44BF855DF32C47DC35D87AB8@smartserver.smartshare.dk> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Qi Zhang" , , , , , , Cc: , , , , "Cristian Dumitrescu" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > From: Morten Br=F8rup [mailto:mb@smartsharesystems.com] > Sent: Wednesday, 2 August 2023 12.25 >=20 > > From: Qi Zhang [mailto:qi.z.zhang@intel.com] > > Sent: Wednesday, 2 August 2023 19.35 > > > > From: Cristian Dumitrescu > > > > For network devices that are programmable through languages such as > > the P4 language, there are no pre-defined flow items and actions. > > > > The format of the protocol header and metadata fields that are used = to > > specify the flow items that make up the flow pattern, as well as the > > flow actions, are all defined by the program, with an infinity of > > possible combinations, as opposed to being selected from a finite > > pre-defined list. > > > > It is virtually impossible to pre-define all the flow items and the > > flow actions that programs might ever use, as these are only limited > > by the set of HW resources and the program developer's imagination. > > > > To support the programmable network devices, we are introducing: > > > > * A generic flow item: The flow item is expressed as an array of = bytes > > of a given length, whose meaning is defined by the program loaded by > > the network device. >=20 > The flow item is not "generic", it is "opaque": Only the application = knows > what this flow item does. >=20 > I hate the concept for two reasons: > 1. The inability for applications to detect which flow items the = underlying > hardware supports. > 2. The risk that vendors will use this instead of introducing new flow = item > types, available for anyone to implement. After further consideration, there might be a middle ground. Consider Vendor-Specific attributes for DHCP and RADIUS, or SNMP MIBs... Any vendor is free to add his own, proprietary special-purpose = attributes, without going through the standardization process. (This is = the key challenge this patch seems to be aiming at.) The vendor might publish these attributes, and other vendors may = implement them too. And in order to prevent collisions, the Vendor-Specific attributes = contain a globally unique vendor ID, such as the Private Enterprise = Number [1] managed by IANA. If similar principles can be worked into the patch, I can support it. Preferably, there should also be a means for applications to query if = specific Vendor-Specific flow items and actions are supported or not. [1]: https://www.iana.org/assignments/enterprise-numbers/