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 28833A0C55; Wed, 13 Oct 2021 13:51:13 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B3CEC410DA; Wed, 13 Oct 2021 13:51:12 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id C4D1840E64 for ; Wed, 13 Oct 2021 13:51:10 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10135"; a="288279503" X-IronPort-AV: E=Sophos;i="5.85,370,1624345200"; d="scan'208";a="288279503" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Oct 2021 04:51:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,370,1624345200"; d="scan'208";a="480758706" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by orsmga007.jf.intel.com with ESMTP; 13 Oct 2021 04:51:09 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 13 Oct 2021 04:51:09 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Wed, 13 Oct 2021 04:51:09 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.102) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Wed, 13 Oct 2021 04:51:09 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MP5oMR+1Beo1Q+nMdiXqlajBXf7bBYJUsaQq47Dm23JXJ6y91ysXJ0rjr5jQZDeN2XhoNozpsmUrHrv556lIut3EtrlNezmifbSW5RBxBwKKjTrhJb2KvyiAyXMCjo8jldeHqZifaf5b919DE7WHWdJNweP3pN8i5rYJzdauXdY0bV3LdMvmJx8HzxgZ2pGB+hn5O/R2YV5k09k4QQ+IdDIJeFxX8xmrLCkgNA/McTA+71rzuvQoaGRocdqw1fIBTnky0DW7pjf7pY0jHfxc/7qpX3U+4mToD3JiEtkEhQj0sAg+YBF5zG72RHgAlIDqMZgHlHySV4HfQjm0n0m+ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/+LaMkNV60c/1Xbdd6zKkKbc3XThdaKUgWs2a6cBAFc=; b=hVll3bXlhphK/F4SixeEirjYM9JGbqKz21QXa2fhtVezjozIjZtH14q5B5WYN7JQzHmS1XtAfuVvbup6VxpZNxCfJmpUxDk0vNrcv1mJzAwXRwHf47oSgesoqSiOibPBazt1HggxMAoBY13NylbLiPuQ0U6WKdfHMEoAqfrQOLe/8Txlk61K8VR8pPSMx/kVGO4zzW+GAodmC5Y0ELkerjWrEA3W6jWCOHbtN/vY8hwCGXSKfdZ8nnFcYPVBQWhwGpSNMzAO5xWFLqzYFp1ScYYn6S3mm2Odu0klqUyfWMNHzwBl/0U25y/EWR/iyvznr+e9LbIdRw0pXrjkMKuAPw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/+LaMkNV60c/1Xbdd6zKkKbc3XThdaKUgWs2a6cBAFc=; b=wdsjyr5ml0FzcizFGuab4W/ktFw+e+B7nAqhDDczwPir7cNbDjk5jNVyXhN5xGaXyUkBhZ+4fQOtzXkVSmAJIdl83acLmspTji4cGc86h6PIL32u2PXpXApNk/0aLSpalLyLa2DvFHjwCsfgeY5C2ABtt+uEJynWK8x1+SxA3MI= Authentication-Results: oktetlabs.ru; dkim=none (message not signed) header.d=none;oktetlabs.ru; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB4808.namprd11.prod.outlook.com (2603:10b6:510:39::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.15; Wed, 13 Oct 2021 11:51:08 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bd7d:29be:3342:632c]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bd7d:29be:3342:632c%5]) with mapi id 15.20.4608.016; Wed, 13 Oct 2021 11:51:07 +0000 Message-ID: <92b90a3e-6530-54c8-11d0-ea69fb31a85b@intel.com> Date: Wed, 13 Oct 2021 12:51:01 +0100 Content-Language: en-US To: Ivan Malov , Thomas Monjalon CC: Ori Kam , References: <20211001134716.1608857-1-andrew.rybchenko@oktetlabs.ru> <20211010143930.4985-1-ivan.malov@oktetlabs.ru> From: Ferruh Yigit X-User: ferruhy In-Reply-To: <20211010143930.4985-1-ivan.malov@oktetlabs.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DB3PR08CA0034.eurprd08.prod.outlook.com (2603:10a6:8::47) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 Received: from [192.168.0.206] (37.228.236.146) by DB3PR08CA0034.eurprd08.prod.outlook.com (2603:10a6:8::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.25 via Frontend Transport; Wed, 13 Oct 2021 11:51:06 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 88770b20-ada1-4f49-2634-08d98e3fbe3d X-MS-TrafficTypeDiagnostic: PH0PR11MB4808: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pEYukgybYGzKWyx5SFLtnIf8L4xpYAsBm8VaATitaY3F3LDPb4w6TdZY4gBXQZ/aNJ3JQNUd7NIwOZZk1V4ahrgmMGuYrWS/5Kxvx4mrkdVMeMQ8sla3rYWwSW7R99dmqgzGE97enuNIOsubse2KTOsXs21dUxZJKprzW417ZZsuSa1iLx4zf4S5HCRYUZKcDXTmT2C5XOLNuYlhhzXmraubrQVVXxEcjyi3FPKFIlv2csPNH6aymqngLYDQqKDEYuF8qHylTsv7tAv46W9CKzNMP5FJFof4tsjaZuSaojVFrgUDK0VBDjEL6maWwXt/I7VtWt7vUI/ChwLgmbTd2lq3kQThxfdmmF5Z8VxkKM2tSwydROx2B7XFvS8kUpolDlH92xqLoGws+Byu0FOvtAzjaJxLMzygogm1gzeasoiChB+zJUZAN8vbNQ+N33+E8Bf86sDLAyYQUjfqeARmnkHoUA8yrP2Yy7zc/wn02gpqTd1iW/IJvz3qAl0wWpya3icWU1a8xbsxPvKTemqPug0tm2TD7NpPGaUAZeC7cSswahP/OooYMUdgXUEnXpjEVkY6sxXaPTgkmtbxatecTvps5y7LMeKE4IA260yuAvy4KUwGMuYqjfvOj9poRHiQh4GzfG3jAejGFgAqAiK3VNcUoH2HI/55WNIf1Oe5wsym+kd4z7gd6mBxiOkEDuq9jEAocREnyytKbhgqq+HMHsDZodzCIvsK8kwdfNXk+NWmpu8SLtFLXS0Y0K4hyX1glIPXNPtB0stuKPwt3oUIGnRGrOmEGVT64XSqFVJuBgVoA3prbJ8eEq3Gkrp2oFGOk9GDpSunV83IH4w8MZUFPg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(4326008)(66476007)(82960400001)(2906002)(66946007)(5660300002)(31686004)(53546011)(966005)(44832011)(8936002)(66556008)(6666004)(26005)(956004)(186003)(8676002)(16576012)(86362001)(110136005)(316002)(38100700002)(2616005)(36756003)(508600001)(31696002)(83380400001)(6486002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?d3RPWjhtTVpwYWJrQVMrcVRoREMwN0pySFN6eFh2bXZxZnpWOERpUlNCazN0?= =?utf-8?B?eGZDK1U4WnhnWjlveGVJZWI2d3ZjM1hJMHJua1BQVmx2MlBNUlZkcEdWbzdI?= =?utf-8?B?cXRFcjBaV2FJNmM4cWRid1Q3dm9XUnZ1Q1M2K0hsTTZKVkdDMDhESUZGWXVS?= =?utf-8?B?WU5ZKzZqRWNUMGxNL1EwU0tJMXk3cmZlcE1rNlBMZ0Z6TVBNcDhwMjFhRW5w?= =?utf-8?B?b2VZMVpXSTNrdjI0ZEhPb2V5OEtFVitkdXRNakIzTDZxdUhFQUxvbXFpdlp6?= =?utf-8?B?WnAxZDFjMUR6UWNia2ZRclFaRmV5Z3ZmTDE3SThBVlZSTDFHK0NBUnVzMHY0?= =?utf-8?B?bVBEb0tTZnVNek9pcy9YeXJIZ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?VURLb25HNzluV3BkTzRQdjZUNmhKTm5sS05YSTIwRXpxWWN1Nk0zQjR4YVN6?= =?utf-8?B?UmRMRWpkUWFHc2QzcW0zRkwrREN0d3Q5bW1jTDVueFlHanBoR0RFUzdRVGtN?= =?utf-8?B?UDAycTVMT0JweEszcm1Rb3NnaTFDV3o2WmpTQ0dJTHJMQTdFOEc1VCtVOWlU?= =?utf-8?B?V1JvUi83V2k3Ymw0MDI3RTJSWE5BUHFaSGFDODZSeHladHpjUU9ZdmVTSmcv?= =?utf-8?B?a245N2dOQXBmZ1FtbjBqN2RQNU9nL0tHcWhDdjJLK29MNXdVUEcyNy9abElp?= =?utf-8?B?ZjdPY0VDNExLYlVPZXhJZlYzdVhzT3N4MENVUUlpQXZSU0twaHFnOVlSQmg1?= =?utf-8?B?VnpjYW9jemNEdlJKcnprNHpUTk16cnlFQlVHWDVaOFI2T1Z1ZXJUVmMxazhj?= =?utf-8?B?WWJoSU1aUkJWNllUcDNDc3IrcjJLOCtoU3JadjlvR1Y3bTBVMTc0b3dRSkFE?= =?utf-8?Q?H6I71wAgkOBJvLsq05YB5xNZRnsO9oR3K64xfIU?= X-MS-Exchange-CrossTenant-Network-Message-Id: 88770b20-ada1-4f49-2634-08d98e3fbe3d X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2021 11:51:07.8982 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: BtvXTeYN5d7WHdHvk2Z7DnBW+bY5nivXCn8T8OLLq1W0zqBeIDuUy/eBMrZtNIFJQUWrGUxbvjuOmFjUQkh65Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4808 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 00/12] ethdev: rework transfer flow API 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 Sender: "dev" On 10/10/2021 3:39 PM, Ivan Malov wrote: > As per RFC [1], action PORT_ID appears to be ambiguous. Its name suggests > that matching traffic be sent to the ethdev with the specified ID, that > is, to the application. However, in Open vSwitch, the action is used to > send traffic to a remote entity represented by the given port, that is, > in the opposite direction. Its interpretation across PMDs also varies. > > RFC [2] attempted to define action PORT_ID semantics in vSwitch sense. > However, this solution would completely abandon the opposite meaning. > > One more effort, RFC [3], was meant to declare that the use of direction > attributes in "transfer" flows assumed implicit filtering by the port ID > appearing as the first argument in rte_flow_create(). However, not all > PMDs require such filtering, so the RFC turned out rather disputable. > > > Since then, all of that has been given more thought: > > 1. One should not attempt to fix action PORT_ID. Instead, two new actions > should be introduced. The first one should send traffic to the given > ethdev. The second one should send it to the represented entity. > > 2. Similar to (1), two new items should be defined. The first one should > match traffic going down from the given ethdev. The second one should > match traffic going up from the entity represented by that ethdev. > > 3. The application always knows which packets come through which ethdevs. > So, as per (2), the application can use the new item to match traffic > arriving from precise entities represented by the relevant ethdev IDs. > > 4. New items suggested in (2) do not require the use of direction > attributes. These items define precise directions on their own. > > 5. As a consequence of (3) and (4), the problem of implicit filtering > by rte_flow_create() port ID argument and direction attributes is > no longer a blocker. The new items allow to dispose of it. > > > The new items appear to be symmetrical to each other. So do the new > actions. This requires that their names reflect the symmetry. Also, > the names should respect the existing concept of port representors. > By the looks of it, terms "PORT_REPRESENTOR" and "REPRESENTED_PORT" > satisfy these requirements. However, currently, ethdevs associated > with network ports are not considered as their representors. Such > understanding is mentioned in the documentation, but it's not > expressed in the code (see enum rte_eth_representor_type). > > > The short of it, this patch series follows points (1-5) to rework > support for "transfer" flows accordingly. On the way, a string of > ambiguous pattern items (PF, VF, PHY_PORT) is deprecated. > > The patch series also updates PMDs which support item and action PORT_ID > to add support for replacements (1-2). However, there're some exceptions: > > - Support for traffic source items in the case of net/mlx5 is really > complicated. This series does not rework it. The PMD maintainer > can do the job much better and test the new code accordingly; > > - Support for action REPRESENTED_PORT is not added to net/sfc. > This will be done when support for VF representors has been > upstreamed, just for the new code to apply cleanly. > > > Changes in v2: > * New naming and reworked comments > * New diagrams > > Changes in v3: > * Diagram improvements > * Spelling fixes > > [1] https://patches.dpdk.org/project/dpdk/patch/20210907125157.3843-1-ivan.malov@oktetlabs.ru/ > [2] https://patches.dpdk.org/project/dpdk/patch/20210903074610.313622-1-andrew.rybchenko@oktetlabs.ru/ > [3] https://patches.dpdk.org/project/dpdk/patch/20210901151104.3923889-1-andrew.rybchenko@oktetlabs.ru/ > > Andrew Rybchenko (6): > net/bnxt: support meta flow items to match on traffic source > net/bnxt: support meta flow actions to overrule destinations > net/enic: support meta flow actions to overrule destinations > net/mlx5: support represented port flow action > net/octeontx2: support port representor flow action > net/sfc: support port representor flow item > > Ivan Malov (6): > ethdev: add port representor item to flow API > ethdev: add represented port item to flow API > ethdev: add port representor action to flow API > ethdev: add represented port action to flow API > ethdev: deprecate hard-to-use or ambiguous items and actions > ethdev: deprecate direction attributes in transfer flows > The rte flow documentation script is failing [1], should new actions added to the documentation? [1] ./devtools/check-doc-vs-code.sh rte_flow doc out of sync for bnxt item port_representor item represented_port action port_representor action represented_port rte_flow doc out of sync for enic action port_representor action represented_port rte_flow doc out of sync for mlx5 action represented_port rte_flow doc out of sync for octeontx2 action port_representor rte_flow doc out of sync for sfc item port_representor