DPDK usage discussions
 help / color / mirror / Atom feed
From: Cliff Burdick <shaklee3@gmail.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: Tom Barbette <tom.barbette@uclouvain.be>,
	 Stephen Hemminger <stephen@networkplumber.org>,
	David Marchand <david.marchand@redhat.com>,
	 users <users@dpdk.org>, Ori Kam <orika@nvidia.com>,
	dev@dpdk.org
Subject: Re: Generic flow string parser
Date: Fri, 26 May 2023 15:35:32 -0700	[thread overview]
Message-ID: <CA+Gp1nZc9UpwejtFvWA6U+Ko-YS7=fOXYn5LiKvqizCWgornqQ@mail.gmail.com> (raw)
In-Reply-To: <CA+Gp1naQPrWofrEohB9=35f7v1bBggaEO6A7p5u9-Q+LiQcELA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2032 bytes --]

On Sat, Apr 29, 2023 at 2:49 PM Cliff Burdick <shaklee3@gmail.com> wrote:

> > So the only things we need are 2 functions, if I understand well:
> >
> > int rte_flow_to_text(const struct rte_flow*);
> > struct rte_flow *rte_flow_from_text(const char *);
> >
> > Here I assume the output of rte_flow_from_text() would be a created flow,
> > meaning it calls rte_flow_create() under the hood.
> > Is it what you wish?
> > Or should it fill port ID, attributes, patterns and actions?
> >
> > I think it should follow closely with what "flow_parse" already does:
> https://github.com/DPDK/dpdk/blob/d03446724972d2a1bb645ce7f3e64f5ef0203d61/app/test-pmd/cmdline_flow.c#L11304
> >
> > Namely, just do the part of populating attributes, patterns, and actions
> from a string. It's then up to the user if they want to create, validate,
> or do something else with it (like see how it populate> d the structures).
> The flow_parse function appears to take an opaque pointer that's specific
> to a structure inside of cmdline_flow.c and assign the attributes, actions,
> and patterns to members of that result struct. I don't know the reason for
> this, but when >calling the function the user doesn't know how many
> patterns or actions their string will generate. They would either need to
> pass in structures that are allocated larger than needed, or have a
> separate API that returns how many actions and patterns are needed for a
> string, then they need to allocate the correct size themselves. I'm
> assuming it's not ideal to have the library itself do dynamic memory
> allocations for the correct size.
>
>>
>> Tom, for what it's worth I'm on a quest to get this to work since I think
it's necessary. I'm just hacking through it like you did and I ran into the
same "template" keyword error. It's probably worthwhile to fix that
anyways. I'm maintaining a set of patches as I go. The general strategy has
been to remove testpmd's main function, compile it as a library, and link
against that.

[-- Attachment #2: Type: text/html, Size: 2769 bytes --]

  reply	other threads:[~2023-05-26 22:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-26  4:46 Cliff Burdick
2023-04-26  5:47 ` David Marchand
2023-04-27  8:37   ` Thomas Monjalon
2023-04-27 13:19     ` Cliff Burdick
2023-04-28 17:36       ` Tom Barbette
2023-04-28 18:09         ` Stephen Hemminger
2023-04-28 19:13           ` Cliff Burdick
2023-04-29  0:04             ` Stephen Hemminger
2023-04-29  0:08               ` Stephen Hemminger
2023-04-29 14:23               ` Cliff Burdick
2023-04-29 21:39                 ` Thomas Monjalon
2023-04-29 21:49                   ` Cliff Burdick
2023-05-26 22:35                     ` Cliff Burdick [this message]
2023-06-05 16:36                   ` kumaraparameshwaran rathinavel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+Gp1nZc9UpwejtFvWA6U+Ko-YS7=fOXYn5LiKvqizCWgornqQ@mail.gmail.com' \
    --to=shaklee3@gmail.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=orika@nvidia.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    --cc=tom.barbette@uclouvain.be \
    --cc=users@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).