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 EA86842A11 for ; 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 ; Thu, 27 Apr 2023 15:19:32 +0200 (CEST) Received: by mail-il1-f178.google.com with SMTP id e9e14a558f8ab-32f397b44dcso3159895ab.1 for ; 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: <1814734.QZUTf85G27@thomas> In-Reply-To: <1814734.QZUTf85G27@thomas> From: Cliff Burdick Date: Thu, 27 Apr 2023 06:19:21 -0700 Message-ID: Subject: Re: Generic flow string parser To: Thomas Monjalon Cc: David Marchand , users , Ori Kam Content-Type: multipart/alternative; boundary="000000000000f4692605fa51343a" 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 --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 wrote: > 26/04/2023 07:47, David Marchand: > > On Wed, Apr 26, 2023 at 6:47=E2=80=AFAM Cliff Burdick > 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
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'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. Th= is is reinventing almost all of what testpmd already does, and it'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.



=
On Thu, Ap= r 27, 2023, 01:37 Thomas Monjalon <thomas@monjalon.net> wrote:
shaklee3@gma= il.com> wrote:
> >
> > Does anyone know if a generic parser for flow strings exists anyw= here? The one inside of testpmd is ideal, but unfortunately it'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.
>
> I heard this same question in the past, but I don't remember the a= nswer.
> 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--