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 v2 5/9] net: openvswitch: add emit_sample action
Date: Wed, 5 Jun 2024 20:51:17 +0100 [thread overview]
Message-ID: <20240605195117.GY791188@kernel.org> (raw)
In-Reply-To: <20240603185647.2310748-6-amorenoz@redhat.com>
On Mon, Jun 03, 2024 at 08:56:39PM +0200, Adrian Moreno wrote:
> Add support for a new action: emit_sample.
>
> 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>
Hi Adrian,
Some minor nits from my side.
...
> diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h
> index efc82c318fa2..a0e9dde0584a 100644
> --- a/include/uapi/linux/openvswitch.h
> +++ b/include/uapi/linux/openvswitch.h
> @@ -914,6 +914,30 @@ struct check_pkt_len_arg {
> };
> #endif
>
> +#define OVS_EMIT_SAMPLE_COOKIE_MAX_SIZE 16
> +/**
> + * enum ovs_emit_sample_attr - Attributes for %OVS_ACTION_ATTR_EMIT_SAMPLE
> + * action.
> + *
> + * @OVS_EMIT_SAMPLE_ATTR_GROUP: 32-bit number to identify the source of the
> + * sample.
> + * @OVS_EMIT_SAMPLE_ATTR_COOKIE: A variable-length binary cookie that contains
> + * user-defined metadata. The maximum length is 16 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 packet being emitted.
> + */
> +enum ovs_emit_sample_attr {
> + OVS_EMIT_SAMPLE_ATTR_UNPSEC,
> + OVS_EMIT_SAMPLE_ATTR_GROUP, /* u32 number. */
> + OVS_EMIT_SAMPLE_ATTR_COOKIE, /* Optional, user specified cookie. */
> + __OVS_EMIT_SAMPLE_ATTR_MAX
> +};
> +
> +#define OVS_EMIT_SAMPLE_ATTR_MAX (__OVS_EMIT_SAMPLE_ATTR_MAX - 1)
> +
> +
nit: One blank line is enough.
Flagged by checkpatch.pl
> /**
> * enum ovs_action_attr - Action types.
> *
> @@ -1004,6 +1028,7 @@ enum ovs_action_attr {
> OVS_ACTION_ATTR_ADD_MPLS, /* struct ovs_action_add_mpls. */
> OVS_ACTION_ATTR_DEC_TTL, /* Nested OVS_DEC_TTL_ATTR_*. */
> OVS_ACTION_ATTR_DROP, /* u32 error code. */
> + OVS_ACTION_ATTR_EMIT_SAMPLE, /* Nested OVS_EMIT_SAMPLE_ATTR_*. */
nit: Please add OVS_ACTION_ATTR_EMIT_SAMPLE to the Kenrel doc
for this structure.
>
> __OVS_ACTION_ATTR_MAX, /* Nothing past this will be accepted
> * from userspace. */
...
next prev parent reply other threads:[~2024-06-05 19:51 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-03 18:56 [PATCH net-next v2 0/9] net: openvswitch: Add sample multicasting Adrian Moreno
2024-06-03 18:56 ` [PATCH net-next v2 1/9] net: psample: add user cookie Adrian Moreno
2024-06-14 16:13 ` Simon Horman
2024-06-03 18:56 ` [PATCH net-next v2 2/9] net: sched: act_sample: add action cookie to sample Adrian Moreno
2024-06-14 16:14 ` Simon Horman
2024-06-17 10:00 ` Ilya Maximets
2024-06-18 7:38 ` Adrián Moreno
2024-06-18 9:42 ` Ilya Maximets
2024-06-03 18:56 ` [PATCH net-next v2 3/9] net: psample: skip packet copy if no listeners Adrian Moreno
2024-06-14 16:15 ` Simon Horman
2024-06-03 18:56 ` [PATCH net-next v2 4/9] net: psample: allow using rate as probability Adrian Moreno
2024-06-14 16:11 ` Simon Horman
2024-06-17 6:32 ` Adrián Moreno
2024-06-17 10:30 ` Simon Horman
2024-06-03 18:56 ` [PATCH net-next v2 5/9] net: openvswitch: add emit_sample action Adrian Moreno
2024-06-05 0:29 ` kernel test robot
2024-06-05 19:31 ` Adrián Moreno
2024-06-05 20:06 ` Simon Horman
2024-06-05 19:51 ` Simon Horman [this message]
2024-06-06 8:42 ` Adrián Moreno
2024-06-10 15:46 ` [ovs-dev] " Aaron Conole
2024-06-11 8:39 ` Adrián Moreno
2024-06-11 13:54 ` Aaron Conole
2024-06-11 15:42 ` Adrián Moreno
2024-06-14 16:13 ` Simon Horman
2024-06-17 10:44 ` Ilya Maximets
2024-06-18 7:33 ` Adrián Moreno
2024-06-18 9:47 ` Ilya Maximets
2024-06-18 10:08 ` Ilya Maximets
2024-06-03 18:56 ` [PATCH net-next v2 6/9] net: openvswitch: store sampling probability in cb Adrian Moreno
2024-06-04 6:09 ` kernel test robot
2024-06-04 8:49 ` kernel test robot
2024-06-05 19:34 ` Adrián Moreno
2024-06-14 16:55 ` Aaron Conole
2024-06-17 7:08 ` Adrián Moreno
2024-06-17 11:26 ` Ilya Maximets
2024-06-18 7:36 ` Adrián Moreno
2024-06-03 18:56 ` [PATCH net-next v2 7/9] net: openvswitch: do not notify drops inside sample Adrian Moreno
2024-06-14 16:17 ` Simon Horman
2024-06-17 11:55 ` Ilya Maximets
2024-06-17 12:10 ` Ilya Maximets
2024-06-18 7:00 ` Adrián Moreno
2024-06-18 10:22 ` Ilya Maximets
2024-06-18 10:50 ` Adrián Moreno
2024-06-18 15:44 ` Ilya Maximets
2024-06-19 6:35 ` Adrián Moreno
2024-06-19 18:21 ` Ilya Maximets
2024-06-19 20:40 ` Adrián Moreno
2024-06-19 20:56 ` Ilya Maximets
2024-06-03 18:56 ` [PATCH net-next v2 8/9] selftests: openvswitch: add emit_sample action Adrian Moreno
2024-06-03 18:56 ` [PATCH net-next v2 9/9] selftests: openvswitch: add emit_sample test Adrian Moreno
2024-06-05 19:43 ` Simon Horman
2024-06-10 9:20 ` Adrián Moreno
2024-06-14 17:07 ` Aaron Conole
2024-06-17 7:18 ` Adrián Moreno
2024-06-18 9:08 ` Adrián Moreno
2024-06-18 13:27 ` Aaron Conole
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=20240605195117.GY791188@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.