From: Simon Horman <horms@kernel.org>
To: Adrian Moreno <amorenoz@redhat.com>
Cc: netdev@vger.kernel.org, aconole@redhat.com, echaudro@redhat.com,
i.maximets@ovn.org, dev@openvswitch.org,
Donald Hunter <donald.hunter@gmail.com>,
Jakub Kicinski <kuba@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Pravin B Shelar <pshelar@ovn.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v6 05/10] net: openvswitch: add psample action
Date: Fri, 28 Jun 2024 20:45:51 +0100 [thread overview]
Message-ID: <20240628194551.GH837606@kernel.org> (raw)
In-Reply-To: <20240628110559.3893562-6-amorenoz@redhat.com>
On Fri, Jun 28, 2024 at 01:05:41PM +0200, Adrian Moreno wrote:
> Add support for a new action: psample.
>
> This action accepts a u32 group id and a variable-length cookie and uses
> the psample multicast group to make the packet available for
> observability.
>
> The maximum length of the user-defined cookie is set to 16, same as
> tc_cookie, to discourage using cookies that will not be offloadable.
>
> Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
...
> diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h
> index efc82c318fa2..07086759556b 100644
> --- a/include/uapi/linux/openvswitch.h
> +++ b/include/uapi/linux/openvswitch.h
> @@ -914,6 +914,31 @@ struct check_pkt_len_arg {
> };
> #endif
>
> +#define OVS_PSAMPLE_COOKIE_MAX_SIZE 16
> +/**
> + * enum ovs_pample_attr - Attributes for %OVS_ACTION_ATTR_PSAMPLE
nit: s/ovs_pample_attr/ovs_psample_attr/
> + * action.
> + *
> + * @OVS_PSAMPLE_ATTR_GROUP: 32-bit number to identify the source of the
> + * sample.
> + * @OVS_PSAMPLE_ATTR_COOKIE: An optional variable-length binary cookie that
> + * contains user-defined metadata. The maximum length is
> + * OVS_PSAMPLE_COOKIE_MAX_SIZE bytes.
> + *
> + * Sends the packet to the psample multicast group with the specified group and
> + * cookie. It is possible to combine this action with the
> + * %OVS_ACTION_ATTR_TRUNC action to limit the size of the sample.
> + */
> +enum ovs_psample_attr {
> + OVS_PSAMPLE_ATTR_GROUP = 1, /* u32 number. */
> + OVS_PSAMPLE_ATTR_COOKIE, /* Optional, user specified cookie. */
> +
> + /* private: */
> + __OVS_PSAMPLE_ATTR_MAX
> +};
...
next prev parent reply other threads:[~2024-06-28 19:45 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-28 11:05 [PATCH net-next v6 00/10] net: openvswitch: Add sample multicasting Adrian Moreno
2024-06-28 11:05 ` [PATCH net-next v6 01/10] net: psample: add user cookie Adrian Moreno
2024-06-28 11:05 ` [PATCH net-next v6 02/10] net: sched: act_sample: add action cookie to sample Adrian Moreno
2024-06-28 11:05 ` [PATCH net-next v6 03/10] net: psample: skip packet copy if no listeners Adrian Moreno
2024-06-28 11:05 ` [PATCH net-next v6 04/10] net: psample: allow using rate as probability Adrian Moreno
2024-06-28 11:05 ` [PATCH net-next v6 05/10] net: openvswitch: add psample action Adrian Moreno
2024-06-28 18:09 ` Aaron Conole
2024-06-28 18:15 ` Eelco Chaudron
2024-06-28 19:45 ` Simon Horman [this message]
2024-06-28 11:05 ` [PATCH net-next v6 06/10] net: openvswitch: store sampling probability in cb Adrian Moreno
2024-06-28 11:05 ` [PATCH net-next v6 07/10] selftests: openvswitch: add psample action Adrian Moreno
2024-06-28 11:05 ` [PATCH net-next v6 08/10] selftests: openvswitch: add userspace parsing Adrian Moreno
2024-06-28 11:05 ` [PATCH net-next v6 09/10] selftests: openvswitch: parse trunc action Adrian Moreno
2024-06-28 11:05 ` [PATCH net-next v6 10/10] selftests: openvswitch: add psample test Adrian Moreno
2024-06-28 17:38 ` [PATCH net-next v6 00/10] net: openvswitch: Add sample multicasting Adrián Moreno
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=20240628194551.GH837606@kernel.org \
--to=horms@kernel.org \
--cc=aconole@redhat.com \
--cc=amorenoz@redhat.com \
--cc=davem@davemloft.net \
--cc=dev@openvswitch.org \
--cc=donald.hunter@gmail.com \
--cc=echaudro@redhat.com \
--cc=edumazet@google.com \
--cc=i.maximets@ovn.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pshelar@ovn.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).