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 75D2CA0C47; Tue, 12 Oct 2021 16:45:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 148E14111D; Tue, 12 Oct 2021 16:45:58 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id CF002410FC for ; Tue, 12 Oct 2021 16:45:55 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10135"; a="207969910" X-IronPort-AV: E=Sophos;i="5.85,367,1624345200"; d="scan'208";a="207969910" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2021 07:45:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,367,1624345200"; d="scan'208";a="591793550" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by orsmga004.jf.intel.com with ESMTP; 12 Oct 2021 07:45:54 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) 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; Tue, 12 Oct 2021 07:45:53 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 12 Oct 2021 07:45:53 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Tue, 12 Oct 2021 07:45:53 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.175) 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; Tue, 12 Oct 2021 07:45:52 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Wb/Zl7+hIDIaHni+pd2tktLx/GjRR9pUat8xyiMM5+sTGdhifRitDXH6w9R+1vOeUIrukuXWvIdwWYy1A5K0GqpnRZxYf+USivDGMiNKVANXKgH8BVc0fflJb/NWRmdT77eVefmrLiXUm884jDZp/F2ccYtYGcP9Xhs2O2vnSto4U7EP7poP7T9/jMkVSGZpHwoGh3jMXaQ1eALrJMESfedO88CyCrmuoXCCTOLWCrYYjVaLxQaJf6gQ0ibc1bIpOy6AwWu+zUCSqlkbMU9mjLFTsw0f4tcOhjQN+5H3fimkAoLN6UHHFe9YGr6CpLlYv4YAIbwlqyW7mOhudcu7wQ== 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=qujl9Bzg2apk0nxKKDaseuAT+8teAW4eMhoh6INm9hw=; b=dBDBYMGHqVVTrM/SFlXcmDLS5TZ8wwNC99NmndX65sJALU6Ip0Xs69NkxBNUlHGfPn1vCdBox6IgZWbY22+u4REH4nYRPAlJULQYaO5IvNg0YG/pJ5kuH06+FfczlGvEapBXPmTvwYDf8RWSkq5HDnBeOQ2AMG3WQ73+fPv62Qw/xoKR/hwh0JRoACO5TOBCdy0W0N6v/q0hQsMEcovgW6JW09pTqCKS6TuwGS01oRr3LOsmJFr2TqZSYEJ+hw2fdlFLBapu7EJHs7odVVL46Hozt19sOc4wL4NNhOB2DNtqAYNsm2wMWM9hvG48jSeRrLeE+ZzDrZWtFlNi/LZPsw== 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=qujl9Bzg2apk0nxKKDaseuAT+8teAW4eMhoh6INm9hw=; b=ZCPYu8CiP12nWqnn6f4Ntt7elO7FOyL/0gozO5RqDo1QpjpTOF6j4yit4nhV+eIZHUnX/QuyBj27CDzr3nXvVomsqtVEpXSd3oG16L4kcWduh0CXtnKXi+1lakKj8Oh+V9pbFkme8eceLz0ARGfrc4qSDHjT8H9vCo1v3SeLaQk= Authentication-Results: broadcom.com; dkim=none (message not signed) header.d=none;broadcom.com; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB5063.namprd11.prod.outlook.com (2603:10b6:510:3d::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18; Tue, 12 Oct 2021 14:45:51 +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.4587.026; Tue, 12 Oct 2021 14:45:51 +0000 Message-ID: Date: Tue, 12 Oct 2021 15:45:44 +0100 Content-Language: en-US To: Ajit Khaparde , Somnath Kotur , John Daley , Hyong Youb Kim , Matan Azrad , Viacheslav Ovsiienko , Jerin Jacob , Nithin Dabilpuram , Kiran Kumar K CC: Thomas Monjalon , Ori Kam , "Ivan Malov" , , Andrew Rybchenko 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: DB3PR06CA0036.eurprd06.prod.outlook.com (2603:10a6:8:1::49) 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 DB3PR06CA0036.eurprd06.prod.outlook.com (2603:10a6:8:1::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.24 via Frontend Transport; Tue, 12 Oct 2021 14:45:48 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 105cf964-e70d-479d-7c9c-08d98d8efcb6 X-MS-TrafficTypeDiagnostic: PH0PR11MB5063: X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pu42NWbptvjinta8bZkN9mTHh8QQiiHdYKqNbZcsMtm3PdPTVDiLL/Ptj3O5RwRm5+UOu/qJvzdTsNLE9qCCqyBhLuuK5iZERa+EQg1cLdjBiqOxeFSrcJo9Rfq2BzV2nZImlJeuypruyfNKrPx86UwUQUrLfuLh0sL2oiJHNk63viG3D2Y96PHiBGwT+DT9nZmgKWvIi1+DfvKhUPHT38brZmTFmLJNhHfTYJvF54ELh30gV5ArV5dWIXTsZkHAI2Ih7x0y8w9AeB72Tcmp7s9UegkCXyllxwUJOsuutgiLLU3G1+eMVLUz17GSG5yzy4DmXYCFCp5/yyKv2npyxllt0VkKSO2CCuC6Tk8F+2FH7ofcnojXahQ0s+KongOsk03BCaY8om2o8OMsPKkNYbiUdaTarjFgfHbc5I5qBVYidAdBFXqfBv8J46+8RYvwlohZ/TpeYEKB+BQKtYXhmTRdhR4eECQviv0CHPfJ0JacrIcaMqbeyHckIDfau+295WcFjBjFI6IZXfxohko4RO2LqVOnx7MJNNL6s6CbV4pejSRt0/d+hUcn/FaFdDeCELeKIbylABuRRA9RokfJPkQ9bqy9exNYdB82WL9v0dgSKghKzp10ctIEoMHswKJypaOzwIpM85p9Edq8YPBRxZYEMpFHYrOr2Ci2hlExPlJXupbyQY9oTVLPEe8CbeENC1Jq6r3BjHj68SEgCkbUW6pPAwrc7vBHufG41RLH5l/iq6dAFgOmGRzChd7KgDsiFYuAhfNrFktSn49u2MAciPiKec8qgtdIqBJ8jB3FWkMQdhK28aGO7vPD3hpe4DqHPiDpjumi7hoxyMdBDVsm6g== 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)(26005)(8936002)(4326008)(31696002)(2906002)(44832011)(86362001)(186003)(5660300002)(7416002)(66476007)(8676002)(66556008)(966005)(6486002)(36756003)(66946007)(54906003)(31686004)(6666004)(38100700002)(16576012)(83380400001)(110136005)(508600001)(316002)(2616005)(956004)(53546011)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RHYyc0NmQnpQYWk4cjZjbnBqVlRrVi8zVjZJTi91SG5BNGNueWNKVmFScjN0?= =?utf-8?B?SmhnUk9sRXAzdlFDRzcvdGNiZFZoT2Y4eVRSSi92bnJRMHBKN1A3QUl2cFFs?= =?utf-8?B?VC9Ea2krSE5KNkt4ZlpreVZEY04rMmhRZjVDZFgwUlN6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2FjNlNxZFRUOExlUzVuMTlxSmpu?= =?utf-8?B?dFEwZ25rOG1TalRCSHlMUHdoM3RyYmdCSGN3d05wWDlMWlFwaUNuOWsxeklu?= =?utf-8?B?Rm85S1RuaGo2L1F4cXdrU1YybktFQW02RmREY0xxeHFKLzlQNXVaOHBPSk1O?= =?utf-8?B?T1J4aDVFT2owaElrcFh4am9YbnNGY2I0UStGM0FJMnp2bFFBRTJFR3VYSFcv?= =?utf-8?B?SnEwNE4xWFF1bHhFc2ltV1FsMzZ6aU5IbFRKaUpLT21wSHNtaGpPU3RTd3dm?= =?utf-8?B?blNtbWVzdjkyVXN5d1JhYkFuUjFHMlh3eGNpSDAxTWJOQjdPRGZqSGtLdjhz?= =?utf-8?B?RXpyekQ1MSs5ZzlMem9ZUXVzTHdZSnYzcyt2Ynk1NWNDNmpsQUs5U2pmdHNW?= =?utf-8?B?TmRZQS9sdFc4VmQrU3l6VWZUamJZaWNOeVRYS0NQMUpSdDlXVDNIS2xjRHRR?= =?utf-8?B?ZVBObTRoRnFtcEpLRDlhTW1ldklBcWRsZWIvTzF6clJBTnJNeGpEbVlMT1ZJ?= =?utf-8?B?dFRrUGhETzcrQTNuLzZqZUhiQkplZndoU2sxbFpRbnlKQWx6bmpwa3R3R0JX?= =?utf-8?B?bkdoZml1TlU3Z1F1QmlOaU9XcXVuVW5KWkJ0dHJDbXRYTS82djNDZm92NTRK?= =?utf-8?B?Vk1naFNFZWJiaXV4R2xIamlTdWlTb2did0V3TTFCTHU0c29YQi9wUUc3dHFT?= =?utf-8?Q?Esg7rBX6E19tHHGANNebJIbYol09V/MXgA8Ca0v?= X-MS-Exchange-Transport-Forked: True X-MS-Exchange-CrossTenant-Network-Message-Id: 105cf964-e70d-479d-7c9c-08d98d8efcb6 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2021 14:45:51.7303 (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: EkdYcP12GKaiSfbC3lap4AbS8+AreySit1D6sR9kFZnWhAAKkROiQbcOkuJ3ZQlSZmiMxlfLHNk2Tab2a231/Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5063 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 > This set also updates the drivers, 'bnxt', 'enic', 'mlx5' & 'octeontx2', PMD maintainers please review/ack the patches. If there is no review from PMDs, patch will go in as it is, FYI.