From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <users-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id EA86842A11
	for <public@inbox.dpdk.org>; Thu, 27 Apr 2023 15:19:33 +0200 (CEST)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 57CB342D2D;
	Thu, 27 Apr 2023 15:19:33 +0200 (CEST)
Received: from mail-il1-f178.google.com (mail-il1-f178.google.com
 [209.85.166.178])
 by mails.dpdk.org (Postfix) with ESMTP id 25C7B42B8C
 for <users@dpdk.org>; Thu, 27 Apr 2023 15:19:32 +0200 (CEST)
Received: by mail-il1-f178.google.com with SMTP id
 e9e14a558f8ab-32f397b44dcso3159895ab.1
 for <users@dpdk.org>; Thu, 27 Apr 2023 06:19:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1682601571; x=1685193571;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=lXcKVpq8AIuYl4PVsOPGPxzh9lRAmg4SGsS3qqeL9Vw=;
 b=AhPy/Z7nFfiUeEnRjBqKilJhtD+L7H4QasGK8+SlF9ADlJxUY5h3Hkr/buC7F60KMG
 bSJUsJsvyG+k4wDJ23Bze/dn5LG+u2hDh7WdZcoxxmmYCH4CPDS9eDqQNOac6ZfCFgDP
 PSFhE30TPLepLUbO0mZ5ALQyrJZpwVtHl+PVbgNbNFlSzt1amrFPLyBNloOsD5XCnvMs
 xeR6wtg55l6lylNbmJJew5B5niiRqXgp4MVgxRHb2UeTb/Thf/7rPKQNP2KSrkDECSiJ
 RgAI+KJdsL6AVNOFG0bQaG9HA2rsO8UTAQvB4wk6U/j/mcYUp9LxbIoXUesAOLh35n7s
 88Cg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1682601571; x=1685193571;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=lXcKVpq8AIuYl4PVsOPGPxzh9lRAmg4SGsS3qqeL9Vw=;
 b=VnuUCcuzazeXfY0RUB1dVYSepAIWcIeX9EpyyKsbMDc2PM/tWIFHRP46yi035IpC+7
 NfO9ikNtxUQnGPbkvLp15dkyAbRH9tshoq5Ih4A7XYAWF8m8rOszf5mO3L3MtNFOWk0t
 605o5iO3ZA8kpnUO9Eo7Ql0ZbZLt5kXynZDSK1qivKysdq9ohsdUhR6vs/j0PQKWTXmb
 zg26mFoRJkYO3kaHDaga8oUaBmOi8wJiRCPO4DD35rfhBMSmtXSgV8xxTjWjNV/psoum
 AbKDcpYLvtKRIrz/BgBjKeXux0Gqw0H5ZHBCnbndCjDZ4md7A7WzE5rytCjpLvl7R+dm
 EWZQ==
X-Gm-Message-State: AC+VfDwI6wSC4UjZdcpblK26B9uG7kAGYpUOmbmPh7RhNY6techrKGUd
 FYX8r2Mg4UJ3I1PHjcWzX+BoCqr3usZLnm7KbGY=
X-Google-Smtp-Source: ACHHUZ7mAi3w8VJP30LnkOEIOIsgWSfmuRBXP3f5sBg9CX9iUixK9CCy6hQ/kFF6gSd59Du49ESiAHQvoxbrH1HITGI=
X-Received: by 2002:a05:6e02:92e:b0:32b:5dda:1313 with SMTP id
 o14-20020a056e02092e00b0032b5dda1313mr3424333ilt.14.1682601571279; Thu, 27
 Apr 2023 06:19:31 -0700 (PDT)
MIME-Version: 1.0
References: <CA+Gp1na5XK1apYrsrG3KsDyZ3Y4oYyTV+2rN=iVrZct=kEKk-g@mail.gmail.com>
 <CAJFAV8wQP8xQ7xHw2Yg0XyZcY-10o82mWWWMqoX4W+cUHxqTDA@mail.gmail.com>
 <1814734.QZUTf85G27@thomas>
In-Reply-To: <1814734.QZUTf85G27@thomas>
From: Cliff Burdick <shaklee3@gmail.com>
Date: Thu, 27 Apr 2023 06:19:21 -0700
Message-ID: <CA+Gp1nZZmf-U_J0Y=N9OHNK4+1yk=XBcWm7eM3BKW0XBEYEvhA@mail.gmail.com>
Subject: Re: Generic flow string parser
To: Thomas Monjalon <thomas@monjalon.net>
Cc: David Marchand <david.marchand@redhat.com>, users <users@dpdk.org>, 
 Ori Kam <orika@nvidia.com>
Content-Type: multipart/alternative; boundary="000000000000f4692605fa51343a"
X-BeenThere: users@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK usage discussions <users.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/users>,
 <mailto:users-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/users/>
List-Post: <mailto:users@dpdk.org>
List-Help: <mailto:users-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/users>,
 <mailto:users-request@dpdk.org?subject=subscribe>
Errors-To: users-bounces@dpdk.org

--000000000000f4692605fa51343a
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi Thomas, testpmd has a 12,000 line parser just for taking in strings and
converting it to flow rules. This is obviously useful for testing flows,
but it also is an interface for any type of flow imaginable since this is
where they're tested.

Now imagine you're developing an application that allows the user to
specify custom flows in a config. Your only option is to make your own flow
string input (json, etc) and convert that to to the flow spec. This is
reinventing almost all of what testpmd already does, and it's extremely
error-prone. I think it would be very useful to have this as an API call
rather than a user constructing each flow by hand so that all these other
applications can benefit and not be worries about bugs during conversions.



On Thu, Apr 27, 2023, 01:37 Thomas Monjalon <thomas@monjalon.net> wrote:

> 26/04/2023 07:47, David Marchand:
> > On Wed, Apr 26, 2023 at 6:47=E2=80=AFAM Cliff Burdick <shaklee3@gmail.c=
om>
> wrote:
> > >
> > > Does anyone know if a generic parser for flow strings exists anywhere=
?
> The one inside of testpmd is ideal, but unfortunately it's self-contained
> and not distributed as part of a normal DPDK install. This seems like
> something that is likely reinvented over and over and it would be useful =
if
> there was a single API to take in strings and generate flows.
> >
> > I heard this same question in the past, but I don't remember the answer=
.
> > Copying Thomas and Ori who might know.
>
> I'm not sure how the testpmd code could help another application.
> And in general, if your application has a CLI,
> you need to integrate the flow commands in a broader context.
>
>
>

--000000000000f4692605fa51343a
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto">Hi Thomas, testpmd has a 12,000 line parser just for taki=
ng in strings and converting it to flow rules. This is obviously useful for=
 testing flows, but it also is an interface for any type of flow imaginable=
 since this is where they&#39;re tested.<div dir=3D"auto"><br></div><div di=
r=3D"auto">Now imagine you&#39;re developing an application that allows the=
 user to specify custom flows in a config. Your only option is to make your=
 own flow string input (json, etc) and convert that to to the flow spec. Th=
is is reinventing almost all of what testpmd already does, and it&#39;s ext=
remely error-prone. I think it would be very useful to have this as an API =
call rather than a user constructing each flow by hand so that all these ot=
her applications can benefit and not be worries about bugs during conversio=
ns.</div><div dir=3D"auto"><br></div><div dir=3D"auto"><br></div></div><br>=
<div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Thu, Ap=
r 27, 2023, 01:37 Thomas Monjalon &lt;<a href=3D"mailto:thomas@monjalon.net=
">thomas@monjalon.net</a>&gt; wrote:<br></div><blockquote class=3D"gmail_qu=
ote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex=
">26/04/2023 07:47, David Marchand:<br>
&gt; On Wed, Apr 26, 2023 at 6:47=E2=80=AFAM Cliff Burdick &lt;<a href=3D"m=
ailto:shaklee3@gmail.com" target=3D"_blank" rel=3D"noreferrer">shaklee3@gma=
il.com</a>&gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt; Does anyone know if a generic parser for flow strings exists anyw=
here? The one inside of testpmd is ideal, but unfortunately it&#39;s self-c=
ontained and not distributed as part of a normal DPDK install. This seems l=
ike something that is likely reinvented over and over and it would be usefu=
l if there was a single API to take in strings and generate flows.<br>
&gt; <br>
&gt; I heard this same question in the past, but I don&#39;t remember the a=
nswer.<br>
&gt; Copying Thomas and Ori who might know.<br>
<br>
I&#39;m not sure how the testpmd code could help another application.<br>
And in general, if your application has a CLI,<br>
you need to integrate the flow commands in a broader context.<br>
<br>
<br>
</blockquote></div>

--000000000000f4692605fa51343a--