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 62C434243C; Sat, 21 Jan 2023 00:06:11 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 153C840DDB; Sat, 21 Jan 2023 00:06:11 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2060.outbound.protection.outlook.com [40.107.223.60]) by mails.dpdk.org (Postfix) with ESMTP id 6A3C04067E for ; Sat, 21 Jan 2023 00:06:09 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XQo2p12FLi0ouI4OBkhfw/rF8xMlLD70/W+KdUk+QrX5GlrlYxtNeS84h3kPaIk/vFmx07hdWi+iL9TKPqFjx7RVh8InqCjDiVi0ifk0DG9bV+24qHnxy6/Gc6tIEgT/d8Do39Udm041IF2MN/UjM7A95Jw6C/xclr9qiaES2CynqLpP4VT/L2TMaQgVpoKPmkf0dluHfG/ynMBVAIlWh5x9fiE8DwFEIEXVEAclUu/3OuHIH2S1RCS/Sx1qbmN9FZgxZZAKv68MKoi0NhCUBjoTa4jhOR4yDc6Yiz9/kYR4Awf+cYzk0b5eS7c36+bSEutcrkHbE8Uh9RStaP0ucw== 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=NH4ihYiarwxIxxToi/Nj8pT0Fbwb8oUInL7KQBcWbVI=; b=mJunKLRArmtpnsa4vdbBUakalbfLC+lvLppKx/VYRjS0AHiqMc34u/kiHezqHb0ZhmzYUqZchsDIGszCphCYptvCHZChaI47nXo2XdCn3IECcYkmda2/AKMJnKS8vX2f+I5pauvLddUdwKMujphXBf7JDtmLeZq+48qw5oFQbsvlVIYJ8rpvRVKGEzgIQjB+uLs1AB6lbOWpZX60gG0zuouOhZeiW0v4ARdRbkvC4jKJ7w2hiXKEYEcITb+N7tbNnf92+h0kJZZbV4Q8Qa50NNj0DiZDI/6XtJ2oCSZF+brJAthpau0JvOpVTomJrtiXp3xffzfYEu/CT5m9cQtK5g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NH4ihYiarwxIxxToi/Nj8pT0Fbwb8oUInL7KQBcWbVI=; b=KHeauyYsazujGL9hhjq8i7GiY1eu8U3CsLGHfjN0i+ZUKIXjJFv1qCP1kU8pJvPS5wy8NxYtoymp/x1HzJTH9jEmRlmpeH69Hn7yq3xvTpH0ca3FftW/4yBIvOYA9u18F88CgQ/2WOztcF+uU2CLbq+8tMo77IZVULurumarsagk0ZwDNsDFYcRk+JwV+2m8P4P239/Ght31fTPkrt+fQGAldy+TbTYmI4aR0jbCc8IGXGfyEhiRbZPf8m8ywGHpGTYDLuLzNTHQunz0kctaZTazHint6SbQ1J5qdyn3QlD6gH3QZj12THf5x8QtRWvAImySFO7EN+L4Ms3sKz3hXg== Received: from DM5PR12MB2405.namprd12.prod.outlook.com (2603:10b6:4:b2::20) by DM4PR12MB5392.namprd12.prod.outlook.com (2603:10b6:5:39f::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.26; Fri, 20 Jan 2023 23:06:04 +0000 Received: from DM5PR12MB2405.namprd12.prod.outlook.com ([fe80::9fbd:3868:3fd7:a156]) by DM5PR12MB2405.namprd12.prod.outlook.com ([fe80::9fbd:3868:3fd7:a156%7]) with mapi id 15.20.6002.025; Fri, 20 Jan 2023 23:06:04 +0000 From: Alexander Kozyrev To: "NBU-Contact-Thomas Monjalon (EXTERNAL)" CC: "dev@dpdk.org" , "ferruh.yigit@amd.com" , "andrew.rybchenko@oktetlabs.ru" , Ori Kam Subject: RE: [RFC] ethdev: add template table insertion and matching types Thread-Topic: [RFC] ethdev: add template table insertion and matching types Thread-Index: AQHZD2LKWzK3aJ4aeU6F4eD3apQhKa6kFSSAgAQQ6UA= Date: Fri, 20 Jan 2023 23:06:04 +0000 Message-ID: References: <20221214022110.393410-1-akozyrev@nvidia.com> <16865748.Ash8RoxBsO@thomas> In-Reply-To: <16865748.Ash8RoxBsO@thomas> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM5PR12MB2405:EE_|DM4PR12MB5392:EE_ x-ms-office365-filtering-correlation-id: cf7add75-3db1-43d9-761d-08dafb3ae7f6 x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 6u+Hc0h5vud9XSwQgvkulGrufK1TNx7grzHcuvKFWNOtZB1JsCZkL5GJG5zg5m8SYOLYaeG+vaqHYUo7Qbi0Himk7XzkgzB0uCkJpSOXyFMUG2QQC0mY0HFlcUxj1CLrASKJ3iqwiiz8TKaUNWtt9X63XZoIf+pAH03I+Bfk2cYJKFBzTaqSpEh0Fyt/vcOCG8MrwgTl1i96fWCTvz/WXDDRbKYj552MnEhtiNzymGpnol6lSSeOaPmnVSXYQXvwK//kbMYozbwjyXQ2/qY8OoWLM5HOtiYj49ECyuvucvoYwO/LUZVrhtf6vPcwbmXLj3A01VXbRI41CSp+xd2RXhqwgRkeKJqHRYL/XZ5DjjF3NhQEUbSTZbXIzJTg85YRscRf+WuXD8XxBrFG92F4vZ/TsgVhK05towmMyWVp+KgAZjext+1SbKBd1m3FP8lomRjF5xdbp16937m0f9oDEP34RqTNUHRFqNousvM74QtcT1C517UUa5R3IONJIDUe3LpsGuUo1G3xrU7Yg3996DxzzssXavbYrHdSRJ/nsBam2fmcts2PI1MnA7hJmT1hIpxIxnmXP7pmZDLgvp5eLhl25cES9XceQbtb/NmbJlIevHg8LxDkG14gKn2JSKLGqjQ0O/Oa+fKBh1QrpYWoKDoe530yML1fTCzf6Euqe2OLh+cu0ALYzA+eEGBQmfEEM/vosayVw2n3EVxlpHS3xA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR12MB2405.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(346002)(136003)(39860400002)(396003)(366004)(376002)(451199015)(107886003)(86362001)(38070700005)(64756008)(2906002)(7696005)(6506007)(52536014)(5660300002)(33656002)(122000001)(478600001)(316002)(8936002)(66476007)(6916009)(4326008)(66446008)(71200400001)(38100700002)(41300700001)(8676002)(66946007)(186003)(54906003)(9686003)(66556008)(26005)(76116006)(55016003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?qOx+X47Cq21G40Rf4zNirECkJs42H5FMn4b18cbZGSgjQjMNQc27rJdD4Et3?= =?us-ascii?Q?DTtY10YL9mSwtK/fInZnalXsETzYpbR8I16Bmi7fJbhbWEWdxQm/feRnuuip?= =?us-ascii?Q?kOu6N7M02x3ACk3jZ/7Ny1abxx0UhY0MM6C5fCO+Byp6ugwpLZnIHYtc4AUC?= =?us-ascii?Q?Ms9hPX+nXSg0bC8sdV9spfhYSwBaQmBjPnRJHEj9AqKIWC39q77zOPFUAluv?= =?us-ascii?Q?IZeEXclj/xE5WeZ/Onj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F0GbQxdd?= =?us-ascii?Q?OogI+R0kLk/88lWX2Q5XZgBwgPLF3TBF89HMxTvfoXsUwFwLCIWdSzo6g4aH?= =?us-ascii?Q?3lKv1nSrN/7oaO2Us+niCej9nI6VREG6lnSdIs03jEqjpUmyeALh0FnC+3cj?= =?us-ascii?Q?bUL2BEU2vin/fBJBaVtdwWwWXo0Uij6Cb/+6z4Vc2K6IAdyMMPoTNryrtTbn?= =?us-ascii?Q?5JHCbhbK6u+p1K5xd72T9uoFA1AdLIiXr6OHSNjDrHYTt7xOlPaZcbgVGv7j?= =?us-ascii?Q?8x27ItVvE6xoYWyr7sfN02JgKB6woI0/Rq177u/Mf5qGtqdW6xKusBOVg1U6?= =?us-ascii?Q?/zXNwKeRqRLApg3m0QhlBgxQGNOPogFIrRh00mHgvyfTXSs7yI1UJv0Ncsf7?= =?us-ascii?Q?6vWtefgufs7JhGZXr/JyL+d5Ha3rDw7NMMtUy849eRYYNNjGK8RQZpBV7bsK?= =?us-ascii?Q?qK4TY6TYKUoUFsXLh8X4kLF+vlXrg+MbQ9ZgQOw7?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM5PR12MB2405.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: cf7add75-3db1-43d9-761d-08dafb3ae7f6 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jan 2023 23:06:04.4554 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: broq0ESOb0W+sV73hFkRmBmhPP3YyEG6okLmUsT2p5BDWnKjfY5CWJFhK0TVxyCS9+CD91Wq4NKWYunbm9M3dA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5392 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 > 14/12/2022 03:21, Alexander Kozyrev: > > Bring more flexibility and control over both flow rule insertion > > and packet matching mechanisms. Introduce 2 new flow table types: > > > > 1. Allow a user to specify the insertion type used in template tables. > > The insertion type is responsible for choosing the appropriate key > > value used to map inserted flow rules into a template table. > > > > Flow rules can be inserted by calculating the hash value for > > the pattern or inserted by index via the new create_by_index() API. > > The idea of the index-based insertion is to avoid additional matches > > and simply execute predefined actions after jumping to the index. >=20 > I don't understand the idea. > Why is it avoiding additional matches? If you jump directly to an index in a table, you don't need to match anythi= ng. For the regular pattern-based table you must calculate the hash and match o= n it. > > The insertion to an already existing index is undefined and >=20 > Why is it undefined? The behavior is up to a PMD to decide. It is free to replace the rule or th= row an error. > > depends on PMD implementation. An old rule must be destroyed first. > > The index cannot be bigger than the size of the table. > > > > 2. Allow a user to specify the hash calculation function used in templa= te > > tables. The hash calculation type is responsible for the calculation of > > the flow rule index a packet would hit upon arrival at the table. > > > > Control over this is useful for applications with custom RSS algorithms= , > > for example. An application can select various packet fields to serve a= s > > a hash calculation source and jump to the appropriate flow rule locatio= n. > > The RSS hash result will be used as the index in the table. For the lin= ear > > hash function, the mapping is one-to-one and the hash result is the ind= ex. > > For other hash functions, the index is the hash result module table siz= e. > > The RSS hash result can be retrieved via modify_field API: HASH_RESULT. > > > > Signed-off-by: Alexander Kozyrev > > --- > > doc/guides/prog_guide/rte_flow.rst | 20 +++++++ > > lib/ethdev/rte_flow.c | 24 ++++++++ > > lib/ethdev/rte_flow.h | 96 ++++++++++++++++++++++++++++++ > > lib/ethdev/rte_flow_driver.h | 11 ++++ > > lib/ethdev/version.map | 3 + > > 5 files changed, 154 insertions(+) >=20 > Is there a PMD implementation available on the mailing list? > This is required to accept a new API. This is RFC. PMD implementation will follow in a v1 patches shortly.