[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAG=2xmMgEUVwhqSFV5uXe_HuXeMaN7kDPW5TpmcihHYe0seo+Q@mail.gmail.com>
Date: Mon, 10 Jun 2024 05:20:47 -0400
From: Adrián Moreno <amorenoz@...hat.com>
To: Simon Horman <horms@...nel.org>
Cc: netdev@...r.kernel.org, aconole@...hat.com, echaudro@...hat.com,
i.maximets@....org, dev@...nvswitch.org, Pravin B Shelar <pshelar@....org>,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Shuah Khan <shuah@...nel.org>,
linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v2 9/9] selftests: openvswitch: add emit_sample test
On Wed, Jun 05, 2024 at 08:43:14PM GMT, Simon Horman wrote:
> On Mon, Jun 03, 2024 at 08:56:43PM +0200, Adrian Moreno wrote:
> > Add a test to verify sampling packets via psample works.
> >
> > In order to do that, create a subcommand in ovs-dpctl.py to listen to
> > on the psample multicast group and print samples.
> >
> > In order to also test simultaneous sFlow and psample actions and
> > packet truncation, add missing parsing support for "userspace" and
> > "trunc" actions.
> >
> > Signed-off-by: Adrian Moreno <amorenoz@...hat.com>
>
> ...
>
> > @@ -803,6 +819,25 @@ class ovsactions(nla):
> > self["attrs"].append(["OVS_ACTION_ATTR_EMIT_SAMPLE", emitact])
> > parsed = True
> >
> > + elif parse_starts_block(actstr, "userspace(", False):
> > + uact = self.userspace()
> > + actstr = uact.parse(actstr[len("userpsace(") : ])
>
> nit: userspace
>
> Flagged by checkpatch.pl --codespell
>
Thanks. Will fix it.
> > + self["attrs"].append(["OVS_ACTION_ATTR_USERSPACE", uact])
> > + parsed = True
> > +
> > + elif parse_starts_block(actstr, "trunc", False):
> > + parencount += 1
> > + actstr, val = parse_extract_field(
> > + actstr,
> > + "trunc(",
> > + r"([0-9]+)",
> > + int,
> > + False,
> > + None,
> > + )
> > + self["attrs"].append(["OVS_ACTION_ATTR_TRUNC", val])
> > + parsed = True
> > +
> > actstr = actstr[strspn(actstr, ", ") :]
> > while parencount > 0:
> > parencount -= 1
>
Powered by blists - more mailing lists