From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80089.outbound.protection.outlook.com [40.107.8.89]) by dpdk.org (Postfix) with ESMTP id ED9F31B206 for ; Wed, 10 Oct 2018 07:35:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eDSdMy5BDnWfG8cYxW9kPbjzLhLDVPvQ8BXXE3jqKpE=; b=Fc5HMqcI2shAbqqBJjSFmPHoESmz0FcLnMLK/NfsKjZMhh/X9gZtBvNmw6DjZ9TBku75XWmn+ulZvKfyi1jTZJzs7umN3KdnSOMs6oERw38PEq1AB/xggqTqjzyZKMwC9v9kWuyxGDhX1d1HJLxD4Dbtjyiu9KMAPCr8Nl0WpAo= Received: from DB7PR05MB4426.eurprd05.prod.outlook.com (52.134.109.15) by DB7PR05MB5084.eurprd05.prod.outlook.com (20.176.236.220) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1207.27; Wed, 10 Oct 2018 05:35:36 +0000 Received: from DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::80e:e6b:baf2:d973]) by DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::80e:e6b:baf2:d973%3]) with mapi id 15.20.1228.020; Wed, 10 Oct 2018 05:35:36 +0000 From: Shahaf Shuler To: Yongseok Koh CC: "dev@dpdk.org" Thread-Topic: [PATCH v2] net/mlx5: support multiple groups and jump action Thread-Index: AQHUXzGjUMhvSmRTa0+Z+g4dqR1qcKUW21vggADte4CAACxDYA== Date: Wed, 10 Oct 2018 05:35:35 +0000 Message-ID: References: <20181003015640.36306-1-yskoh@mellanox.com> <20181008180552.39671-1-yskoh@mellanox.com> <20181010024731.GI9031@mtidpdk.mti.labs.mlnx> In-Reply-To: <20181010024731.GI9031@mtidpdk.mti.labs.mlnx> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB7PR05MB5084; 6:+eUGgzW729LpnHpd4GhBOuWkuWpkNma5OifvVuEYjR/ar0TeB9s8NYU8A4aAXuC4kQrbHm0kARIwkV7i8Si8aqvhpaAdKf35shNpIz6tkNTUsySfgB3NF4WPfQr6atCZyLKS83kiG0BgY977yAuHZNSTaH/4RpWe6GW7Uy3d730Nq5xgUTTDyshKkvNFiuSPiZDuGbiJiwObByb6HOzmpEPvAEdAw9gzEYmgDjnCwmHCGSsANJgUDG6O9HWjjY/dn+E8WCB49xRAh7zdspqBHtR4DpE+GpKxavvClWhc/Q5MHAho+pzRRWOQNItIupgp9XyaXf4UvAH/mhsKbnwFKUDdzFEZjYEMd/W1cwMX/LC41NkbjqObFqwAoTdmTmCIaVp2e6yxWBv5jD7QZvIYWZIBVa8T5kUZwILWwZJi2fPDyZUpqsQN2PJG3Ifg1KOG5MooZ5u7OTtCysPT7mZ6lA==; 5:x02wyR/abcD7q0MzwQItufGK/NCsdMa9UvzL8wmyT73k/BOvOahG6tdZ1OZIRKwB7Ma7vW4NBRpstLaMAnTpgGA8BZpJDh2B+fm9QP1tuBdEYAAmbUTstN7gUODHSJY645WZpIPD5zHncU7vy3DWfd/1SXRQljfvcI1FqfBpFj0=; 7:IH7Bzwl6BZt3lve6J9MH3zJKyDeGG0o1M7QSgkh/UsSR6bglz35UomZgg7JXpqby2wjKRvI+WFBg6rukW7cpVy5u/ZGnKX00BsAe2v5mIkxIetq/9naLtgBxtx2Ypn62q94OJ7IOXQcNjJThdkrH4Og6h4mj6Pghu6fyWXPYw134UszkrpL78vlyuJVeJc55EtpXKAXOtCsM+xQA/s+ATnH+kj3n6nFqqtCiPc2MjcBL4+5nOop7cTP+GJIDa2wX x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 9012dc4a-c5e0-446b-daa1-08d62e723492 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:DB7PR05MB5084; x-ms-traffictypediagnostic: DB7PR05MB5084: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231355)(944501410)(52105095)(3002001)(10201501046)(93006095)(93001095)(6055026)(149066)(150057)(6041310)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123560045)(201708071742011)(7699051); SRVR:DB7PR05MB5084; BCL:0; PCL:0; RULEID:; SRVR:DB7PR05MB5084; x-forefront-prvs: 08213D42D3 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(396003)(346002)(376002)(136003)(39860400002)(189003)(199004)(8676002)(81166006)(106356001)(81156014)(105586002)(102836004)(2900100001)(256004)(26005)(6116002)(3846002)(2906002)(25786009)(68736007)(33656002)(478600001)(8936002)(6862004)(14454004)(5250100002)(6246003)(4326008)(6636002)(71190400001)(97736004)(71200400001)(66066001)(74316002)(5660300001)(6436002)(446003)(11346002)(53936002)(7696005)(76176011)(55016002)(316002)(7736002)(99286004)(9686003)(305945005)(229853002)(486006)(86362001)(186003)(93886005)(6506007)(476003); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR05MB5084; H:DB7PR05MB4426.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: wIPCSseI0CrvPKZ9fQMDssc/vlDR6kMQ4HRBnQYReeiPV2Nw2yi03+nckyq05wd0TgmErwBnX6BNIgqRYZPwr4dDU60LqJc9dSamK2+MCwl5pXOsi8bOqS5AkyvPP26c8Ogi4SokokopO0eMrnkyIdx6c/uoi427Bnu+zhBC5HIhcUtJ3ycyxdxr1/iNJAC8YexD5r2n3md4PKIbOVxp5nJ7xjBvJKZC9yg5nLadwAMSAsqhan/vuaJ/KBx3DExoKcm09pU+xxBk1EakDVXrnCDvxD11zcmB8JNFgqcCCmDt8qXoTEDqGRqbVFFrZ5tzl2R/5xNqhZt2aWlkfosMf+PYsNI3cGR5tpdUQFiFJoE= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9012dc4a-c5e0-446b-daa1-08d62e723492 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Oct 2018 05:35:36.1130 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR05MB5084 Subject: Re: [dpdk-dev] [PATCH v2] net/mlx5: support multiple groups and jump action 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 Oct 2018 05:35:38 -0000 Wednesday, October 10, 2018 5:48 AM, Yongseok Koh: > Subject: Re: [PATCH v2] net/mlx5: support multiple groups and jump action > On Tue, Oct 09, 2018 at 05:50:30AM -0700, Shahaf Shuler wrote: > > Hi Koh, > > Few comments. > > > > Monday, October 8, 2018 9:06 PM=B8 Yongseok Koh: > > > Subject: [PATCH v2] net/mlx5: support multiple groups and jump > > > action > > > [...] > > > -#define MLX5_TCF_FATE_ACTIONS (MLX5_FLOW_ACTION_DROP | > > > MLX5_FLOW_ACTION_PORT_ID) > > > +/* Due to a limitation on driver/FW. */ #define > > > MLX5_TCF_GROUP_ID_MAX 3 > > > +#define MLX5_TCF_GROUP_PRIORITY_MAX 14 > > > > I guess there is no way to query those and trial and error is overkill = for this > first implementation. >=20 > Well, not a huge task. If you (or FW/drv team) think this max value is li= kely > increased in the near future (before the next LTS version), then it isn't= a bad > idea to add such code now. Let me know. I don't think it is needed now. Even if it is increased we can stay with 3 = tables till we will have a use case for more.=20 >=20 > > > + > > > +#define MLX5_TCF_FATE_ACTIONS \ [...] > > > > > > We also spoke about that for group > 0 the flow items can start from th= e > middle. E.g. on table 0 we have flow rule that redirect all eth/ip to gro= up 1, > and on group 1 the rules can start with udp or tcp. > > Is this possible today w/o any code change? >=20 > Not possible. It needs more changes. Complexity of the additional code > depends on a set of limitations we make. In the simplest way, we can > unconditionally allow such flows if TCF allows it. But if we need smarter= way, > we would have to add much more validation code. For example, in a case > where grp 0 has "item eth/ip proto is udp / aciton goto grp 1" and grp 1 = has > "item tcp ...", we should decide whether this is a violation or not.=20 This is an application error. Obviously the TCP rule will never hit. =20 IIRC, that's > why we decided to not allow such flows during the design review. Users > have to specify full items starting from 'eth' with the current implement= ation. >=20 > Will submit v3 with the change in Makefile and meson.build. But if you th= ink > there's need to add additional features like I answered above, let me kno= w > so that I can submit v4. I think we need to allow items in the groups to start from arbitrary header= and not always eth. It can be in the most simple way like you mentioned.=20 It is needed because: 1. to save the user the overhead of creating the same pattern prefix for th= e rules in the groups 2. it fits better with OVS and openflow model. For example you will have on= e table for the outer header and one table for the inner header each contai= ns only the outer/inner headers.=20 3. not sure how kernel inserts the rule but it is an overhead to create the= full steering entry from the outer eth in case it was already being matche= d by previous rules. It is bigger steering entries with more cache misses a= nd comparators.=20 >=20 >=20 > Thanks, > Yongseok