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 DB4FE422D3 for ; Sun, 19 Mar 2023 19:35:00 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5CA5A410ED; Sun, 19 Mar 2023 19:35:00 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2066.outbound.protection.outlook.com [40.107.244.66]) by mails.dpdk.org (Postfix) with ESMTP id 6E4FF410EC for ; Sun, 19 Mar 2023 19:34:58 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gWy+8zcJimU1cZSLLbIBM3E8bRNCW8Eqq+oAelw//F89F0vsxCiTs+pV7XnVBnYZZl6XiRqiCuvCLAhMCcdh9mTfnulbeLZGiOiwhylRICH0VMPMThdXknIisTyJeJJGLMRvvnsyQqflTkwpmQyvdecEaugmuDcp9ug/DTiesojnJ7EbtejIcsf+nQ+PTuIlXTBmRbHacNnSpjYVzTIc2GTDba4/yLJTiS0t7M41NYemK/QzJggJtfXQCRDFN8d7H4cMTHjaYEar9QMwtDh+ZTRCF8/fOi6WzeZk/wDTaihUSggDc6N6HB8yEmE3NgkFPgt3edqck+Ej3zqHwPhwaw== 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=gp9Xsbv/KXXTCCN8GHUsXPQ1MsIGzViYDkK/t1pxA2o=; b=ekPIuLaPgj7eKkbzFgJuTLaNn9U4fhdzG8iTCl3iHy3JogPFjmpb0f+R0aW6bn/oU0jrw1aTzIi4x/EJFwow3O6kF1ZtB3OowpvhVg2tWvqUWdtbqmalzACtU/smxjXDlIhMHteI4u7mDmOeU5Srty1RDh/d+Zln/s9n+5HlkljbnRJfzUsR34GwQS68K6vNSCI0yrfXCpa0/Hk4RvtCATxwEyToSqnz0IQCD+eNcTAqscUkn51ffduxQwus1aiynHHb/rmQQmenv5zPbqCi7PDezFYgxfV24+gbOByOLL9DXE4jBI7URVZ2MqBYRin7EKxv5NDP4kHAFCsXt79j5A== 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=gp9Xsbv/KXXTCCN8GHUsXPQ1MsIGzViYDkK/t1pxA2o=; b=IN3yt2cUSfzi/Nvk4ELdAH5KyVIYrSQ+c+ab7K7bRPcxVsY3m7k8kpHbnhtNC6WGX0PHvTY6XITaQMPGJIcPl84sV4hi3FV8PR/1roztA7JYLAjQMpM9S1JRlMmobC5Pc7vyHwq3/c7uVJvXvFcmsjtkApDNThxZ94Kin9OzexBbyNmeS4K0LvTpgrgWdI8u1V+ooinN9UtJQG9XnW/+9qcewdylKs3izQa6Y6C97T8Y3y6CRenp2AonmUx4MsyTJ84YjK9fovbYTt70olyaQKFjJfplgWPENwfuwC5u7MG45DZq19a+/6YTbMZpr3b2a0A0YRhYlix7bEeQY0wNug== Received: from DM4PR12MB8474.namprd12.prod.outlook.com (2603:10b6:8:181::13) by SA0PR12MB7462.namprd12.prod.outlook.com (2603:10b6:806:24b::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.37; Sun, 19 Mar 2023 18:34:56 +0000 Received: from DM4PR12MB8474.namprd12.prod.outlook.com ([fe80::e293:548a:dddd:3969]) by DM4PR12MB8474.namprd12.prod.outlook.com ([fe80::e293:548a:dddd:3969%4]) with mapi id 15.20.6178.037; Sun, 19 Mar 2023 18:34:56 +0000 From: Asaf Penso To: Tony Hart , Stephen Hemminger CC: "users@dpdk.org" Subject: Re: [External] rte_flow: no ability to match on packet length? Thread-Topic: [External] rte_flow: no ability to match on packet length? Thread-Index: AQHZS4cOKT5bMa+EYkW0ePcJa1gq4q7ssA8AgAD8f4CAFN180g== Date: Sun, 19 Mar 2023 18:34:55 +0000 Message-ID: References: <5644d4d8-d47b-4a0c-84ec-17ce8d68d922.8b1a23e8-b9b9-4aca-a31a-0d4e4655acbd.eee7240b-6962-4037-97c6-178856ab054b@emailsignatures365.codetwo.com> <20230305124628.503423b4@hermes.local> In-Reply-To: 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: DM4PR12MB8474:EE_|SA0PR12MB7462:EE_ x-ms-office365-filtering-correlation-id: 7acb9d22-7228-4d19-8f08-08db28a8a30b x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ZwVJMKzjgLnwzqidtcgEmokECBKzOFAfNUKWUkkaU0GG4ghsACSDJngUN0hhEHcyOH9OGN4YgB484oPNcK1qUQvo/1YIw2+p1A3QhKnww4Br3V9MZC8MCcoHOVoW5PKXa0MqTVBVpBVaxKngeUiPq/53HRFeMlfIRZpkDCiWX2j/iBWECeYnpYRGa62COZ/JPMB7av1KS4s5izLFSPmMW3CFXouHL1I7OSg0anMhEEOff58YPjpeo0fY0xICfKFpvoJ3vshWu3BJPsL3W1wzZMrKKHTUWgfHzjH1QnAbvdfVdQ9qlyF2F+cLyw/HGDn59r3GrP5Ft7xB3ubY64uO9P/KLNTJsAgLmodzhbeViYtOYqs0XaLxdZadwfQsxEYRq+R2bLSL8J8trHuTeOqBzn7dxMOFZ3pNCkxfVzae4paqzyZ/vb4oRNOZZotogdPw275HN+M6dPoapwbkXonEssicEyU17+C++fpFxkZtOiXbW6mfuGS/mVB1jrEZK3mXASrHZlU6Qv2SeOeAiSaU6QG7j2NYcNIy2CduuEL+ZR6dwJYHhSJMvcMHza+aRGPvNeY4cday8iCIFUkf144ySs2RqbLFydx5+0GhAnRdhfk4hqmTZHQ733xcOhWCyN/Gmyc7h/fj8VtxLjJnrUIKlYKUfQkQGJy5i43CsjEiQcJyYcbwMUKn/ZyhMUKMX56RU6Q5IuNIjDatGxG7aAJ5H1k44nRS4nLmIBjzAvNXvqwykf3HpN7f5hztpuGlPf9Z x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR12MB8474.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(4636009)(39860400002)(366004)(376002)(136003)(346002)(396003)(451199018)(8936002)(5660300002)(52536014)(41300700001)(55016003)(33656002)(86362001)(38070700005)(122000001)(38100700002)(2906002)(166002)(4326008)(83380400001)(478600001)(7696005)(71200400001)(186003)(26005)(9686003)(6506007)(53546011)(8676002)(66899018)(110136005)(316002)(91956017)(66946007)(76116006)(66556008)(66476007)(64756008)(66446008); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?Windows-1252?Q?wZpQjh+HLpIsNeZIjuU4vuLC770cA3wqW53/BM1/VcjY4szh8V2y1hAO?= =?Windows-1252?Q?nab4n+GbXqO4TYJMkwQRU7VUm10XsQNO0X3Y8+2zD/NtdI052jloQW9t?= =?Windows-1252?Q?cE6KefvbDd5Tq0gc5NvuqBRYpJ9vId592/mMfKMJNOlErznevT68K1u9?= =?Windows-1252?Q?F4Go/qtCKDvW8YUDinUM/NMGHVmtgF8dTDjQjFjmKdkFYDoj9T2DEa5e?= =?Windows-1252?Q?2BDbRiR68sFTFheL9XU9jFDiOilBgBIFxtv4QFxAIeNcIr6Fct5lAmq4?= =?Windows-1252?Q?aJtTaLRO1fNS+Yaqd1laKkDVvKDILlH4KZWzGXIcvd9MrseeXBGuN029?= =?Windows-1252?Q?wXx46AiBU4aSQfQcGnLsri0BiizYM5gmVJoRTttqoHSARe2W6v2QbAoM?= =?Windows-1252?Q?BmS3Uo30wS3z1f61Gu01nnyY94Ntilgn8DTJ7j+dWKmeSU4dovRUJgqu?= =?Windows-1252?Q?hBWdf0CJfRih0oXDlQzM14YBZdE4GtUuDONO4bP0JvYcfScNzNijRKOe?= =?Windows-1252?Q?BC/K+eDF4voOVrIkKB7EnGYBf/VX8rpjvid+2QOCjyx62S4a2qwEwdBf?= =?Windows-1252?Q?GjlCsrGGDA0HYcJc58YQOuyhecPRV3bC71y1YBILRm91bIlqfsjSRAlI?= =?Windows-1252?Q?pCV1SY0FMFHN062SDVmBi0a1QVS5MHFRGdNCXGXQRxOQH68u6WWXcB8I?= =?Windows-1252?Q?snqcU2Ulw5RofUk5zFm8GhA2EhI9Hf7A9Cp3LcajkUL4WkETd4sG7CND?= =?Windows-1252?Q?lhhFP8L7fgLCufTRfCv5q44BbpsKoYOPo7n1BJ4Pwpgp3nftYGkBn/Pv?= =?Windows-1252?Q?IE60N9YsvTBPzJl2bTrxorRpsj//ed7Vb+yqBCoqhO5gQVva16rql5aG?= =?Windows-1252?Q?9PAa2lxoxPStPAOaaNmVxcevDFdg4v8OvnGC7OjUMdSS5up/5CLU+pCf?= =?Windows-1252?Q?E/l7L3uaOOtz8CQX3PtHeV5fr5BePdnfVVKVbBRYPKZfkwu1TQEYGvYw?= =?Windows-1252?Q?Rv/6B+I+TepQaL8Lk/1KKHMWxydyDnEh1BlE/HENYFa1Kji9DJEXQ+IO?= =?Windows-1252?Q?tX9H9spwy5T/31kzHz+LE22bU+kD+c+yykndu3h183Gf2BlmGWzIZMnX?= =?Windows-1252?Q?+0AaySJSQkfIRiHefpU+NTy0YZL2Yp7RB//zmK9Z7O1F69e0Nszcbxkz?= =?Windows-1252?Q?Oc2RA13xWzpfnwO2Rja1mgRwe1WTaMcYo7USjT7d9D3JEYG/6XU8XLSG?= =?Windows-1252?Q?bXg8ttRSifByBvs3WZHSbKgyJvOll1rfuR3sSyQyH9kQX3Z4mBEfoZE/?= =?Windows-1252?Q?2cLcgXd6yW3FCSogBeHd3Ix9fuZd34xIo9cuU2oVCRV/uiPpIe8C6GAP?= =?Windows-1252?Q?qScteqG1AU1CX2KaMh8Ki43Gbxbs5kqOrCsj3YYp3M6rbbMU8R2hy2YF?= =?Windows-1252?Q?bJdn1/iIRoowyVY23t/25DwlXc6PVa8rtm0n6BkVRjN3lCV+hX5YJeCk?= =?Windows-1252?Q?kyMcEC4gHTCnjAa35tH3f0mztgJWFLvvkdZ8OWnc50NeU4I7lohH4egN?= =?Windows-1252?Q?pXchazrDl6NJgRS2cWHm03ZtE0KTygkEJ8rNppCSiYDgti4nAN0d7+I0?= =?Windows-1252?Q?0ThWmz2bsV5ncsWaqs1bcu44HiaXYIAFuUkiJi1sjQFjahQoXQpXwFaG?= =?Windows-1252?Q?Un6FjO/xqgRHUopsfZF0elyaaHqfTgHR+5iVv6hIeIc0BWj5zb7VEA?= =?Windows-1252?Q?=3D=3D?= Content-Type: multipart/alternative; boundary="_000_DM4PR12MB8474F83E5E828167BECC8AA6CD839DM4PR12MB8474namp_" MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB8474.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7acb9d22-7228-4d19-8f08-08db28a8a30b X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Mar 2023 18:34:55.7492 (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: FuC7tc9qI41syOA61Yr8SwhplMkO96T2kfqMM0xsdrH4sPiVwR/XLFNb8eKa6IbAmIaatHEA8zmgmptxhzlRkA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB7462 X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org --_000_DM4PR12MB8474F83E5E828167BECC8AA6CD839DM4PR12MB8474namp_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Hello Tony, Starting ConnectX-6 Dx NIC, the HW can match on range of values for differe= nt fields. In general, it will be implemented as part of the rte_flow template API. We plan implementing range match on ip.total_length field as part of 23.07. Regards, Asaf Penso ________________________________ From: Tony Hart Sent: Monday, March 6, 2023 1:50:11 PM To: Stephen Hemminger Cc: users@dpdk.org Subject: Re: [External] rte_flow: no ability to match on packet length? Hi Stephen, Thanks for the confirmation. As you say, maybe any MLX5 experts have some s= uggestions? --tony Tony Hart | Chief Architect Tony.Hart@corero.com 293 Boston Post Road West Suite 310, Marlborough, MA 01752 Access Corero Network Security=92s Privacy Policy here >. We are Corero Network Security plc (=93Corero=94), registered in England an= d Wales, with registered company number 02662978, registered office address= Regus House Highbridge, Oxford Road, Uxbridge, Middlesex, UB8 1HR. Corero = is the parent company for Corero Network Security, Inc. and Corero Network = Security (UK) Ltd (a company registered in England and Wales with registere= d number 04047090, with the same registered office address as above) For in= formation about how we process your data, or to manage your data preference= s, click here . > On Mar 5, 2023, at 3:46 PM, Stephen Hemminger wrote: > > On Tue, 28 Feb 2023 15:12:31 +0000 > Tony Hart wrote: > >> I=92m trying to use the Generic Flow API (rte_flow) to match IP packets = based on their length (either L2, L3 or L4 lengths). >> >> There doesn=92t seem to be an item type that explicitly matches based on= length (RTE_FLOW_ITEM_TYPE_x). So I=92ve tried using a mask with RTE_FLOW= _ITEM_TYPE_IPV4 to match on the total_length field (and similar attempt to = match on the UDP header dgram_len field) but the NIC I=92m using (mlx5) ret= urns an error (mask enables non supported bits). >> >> Am I out of luck, or maybe missing something? >> >> Thanks for any insights! >> >> I=92ve tried, DPDK: 20.11.7 and 22.11.1 >> >> Tony Hart | Chief Architect >> Tony.Hart@corero.com > > Short answer: yes, you are right there is no generic length match. > > Longer answer: rte_flow is an API which is meant to provide access to the= underlying > match features of NIC hardware. Supporting something requires that the HW= /FW can do the > match, and that the driver writer has added (and tested) that match. > > Hopefully the MLX5 experts can help answer what is possible. > --_000_DM4PR12MB8474F83E5E828167BECC8AA6CD839DM4PR12MB8474namp_ Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable
Hello Tony,

Starting ConnectX-6 Dx NIC, the HW can match on range of = values for different fields.
In general, it will be implemented as part of the rte_flo= w template API.
We plan implementing range match on ip.total_length field= as part of 23.07.

Regards,
Asaf Penso

From: Tony Hart <Tony.Ha= rt@corero.com>
Sent: Monday, March 6, 2023 1:50:11 PM
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: users@dpdk.org <users@dpdk.org>
Subject: Re: [External] rte_flow: no ability to match on packet leng= th?
 
Hi Stephen,
Thanks for the confirmation. As you say, maybe any MLX5 experts have some s= uggestions?

--tony


Tony Hart | Chief Architect
Tony.Hart@corero.com <mailto:Ton= y.Hart@corero.com>
 
 293 Boston Post Road West Suite 310, Marlborough, MA 01752


Access Corero Network Security=92s Privacy Policy here <www.corero.com/privacy>.



We are Corero Network Security plc (=93Corero=94), registered in England an= d Wales, with registered company number 02662978, registered office address= Regus House Highbridge, Oxford Road, Uxbridge, Middlesex, UB8 1HR. Corero = is the parent company for Corero Network Security, Inc. and Corero Network Security (UK) Ltd (a company registered = in England and Wales with registered number 04047090, with the same registe= red office address as above) For information about how we process your data= , or to manage your data preferences, click here <info.corero.com/data-preferences.html>.



> On Mar 5, 2023, at 3:46 PM, Stephen Hemminger <stephen@networkplumb= er.org> wrote:
>
> On Tue, 28 Feb 2023 15:12:31 +0000
> Tony Hart <Tony.Hart@corero.com> wrote:
>
>> I=92m trying to use the Generic Flow API (rte_flow) to match IP pa= ckets based on their length (either L2, L3 or L4 lengths).
>> 
>> There doesn=92t seem to be an item type that explicitly matches ba= sed on length (RTE_FLOW_ITEM_TYPE_x).  So I=92ve tried using a mask wi= th RTE_FLOW_ITEM_TYPE_IPV4 to match on the total_length field (and similar = attempt to match on the UDP header dgram_len field) but the NIC I=92m using (mlx5) returns an error (mask enables non supporte= d bits).
>> 
>> Am I out of luck, or maybe missing something?
>> 
>> Thanks for any insights!
>> 
>> I=92ve tried, DPDK: 20.11.7 and 22.11.1
>>
>> Tony Hart | Chief Architect
>> Tony.Hart@corero.com <m= ailto:Tony.Hart@corero.com>
>
> Short answer: yes, you are right there is no generic length match.
>
> Longer answer: rte_flow is an API which is meant to provide access to = the underlying
> match features of NIC hardware. Supporting something requires that the= HW/FW can do the
> match, and that the driver writer has added (and tested) that match. >
> Hopefully the MLX5 experts can help answer what is possible.
>

--_000_DM4PR12MB8474F83E5E828167BECC8AA6CD839DM4PR12MB8474namp_--