All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Matthieu Baerts <matttbe@kernel.org>
Cc: mptcp@lists.linux.dev, "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Mat Martineau <martineau@kernel.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Davide Caratti <dcaratti@redhat.com>
Subject: Re: [PATCH net-next 4/6] uapi: mptcp: use header file generated from YAML spec
Date: Fri, 13 Oct 2023 19:28:23 +0200	[thread overview]
Message-ID: <20231013172823.GR29570@kernel.org> (raw)
In-Reply-To: <20231010-upstream-net-next-20231006-mptcp-ynl-v1-4-18dd117e8f50@kernel.org>

On Tue, Oct 10, 2023 at 09:21:45PM +0200, Matthieu Baerts wrote:
> From: Davide Caratti <dcaratti@redhat.com>
> 
> generated with:
> 
>  $ ./tools/net/ynl/ynl-gen-c.py --mode uapi \
>  > --spec Documentation/netlink/specs/mptcp.yaml \
>  > --header -o include/uapi/linux/mptcp_pm.h
> 
> Link: https://github.com/multipath-tcp/mptcp_net-next/issues/340
> Acked-by: Paolo Abeni <pabeni@redhat.com>
> Signed-off-by: Davide Caratti <dcaratti@redhat.com>
> Signed-off-by: Matthieu Baerts <matttbe@kernel.org>

...

> diff --git a/include/uapi/linux/mptcp_pm.h b/include/uapi/linux/mptcp_pm.h
> new file mode 100644
> index 000000000000..0c7206531eb1
> --- /dev/null
> +++ b/include/uapi/linux/mptcp_pm.h
> @@ -0,0 +1,149 @@
> +/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
> +/* Do not edit directly, auto-generated from: */
> +/*	Documentation/netlink/specs/mptcp.yaml */
> +/* YNL-GEN uapi header */
> +
> +#ifndef _UAPI_LINUX_MPTCP_PM_H
> +#define _UAPI_LINUX_MPTCP_PM_H
> +
> +#define MPTCP_PM_NAME	"mptcp_pm"
> +#define MPTCP_PM_VER	1
> +
> +/**
> + * enum mptcp_event_type

Hi Davide and Matthieu,

I understand that is autogenerated.
But it is missing an entry here for @MPTCP_EVENT_UNSPEC.
Can that be addressed somehow?

> + * @MPTCP_EVENT_CREATED: token, family, saddr4 | saddr6, daddr4 | daddr6,
> + *   sport, dport A new MPTCP connection has been created. It is the good time
> + *   to allocate memory and send ADD_ADDR if needed. Depending on the
> + *   traffic-patterns it can take a long time until the MPTCP_EVENT_ESTABLISHED
> + *   is sent.
> + * @MPTCP_EVENT_ESTABLISHED: token, family, saddr4 | saddr6, daddr4 | daddr6,
> + *   sport, dport A MPTCP connection is established (can start new subflows).
> + * @MPTCP_EVENT_CLOSED: token A MPTCP connection has stopped.
> + * @MPTCP_EVENT_ANNOUNCED: token, rem_id, family, daddr4 | daddr6 [, dport] A
> + *   new address has been announced by the peer.
> + * @MPTCP_EVENT_REMOVED: token, rem_id An address has been lost by the peer.
> + * @MPTCP_EVENT_SUB_ESTABLISHED: token, family, loc_id, rem_id, saddr4 |
> + *   saddr6, daddr4 | daddr6, sport, dport, backup, if_idx [, error] A new
> + *   subflow has been established. 'error' should not be set.
> + * @MPTCP_EVENT_SUB_CLOSED: token, family, loc_id, rem_id, saddr4 | saddr6,
> + *   daddr4 | daddr6, sport, dport, backup, if_idx [, error] A subflow has been
> + *   closed. An error (copy of sk_err) could be set if an error has been
> + *   detected for this subflow.
> + * @MPTCP_EVENT_SUB_PRIORITY: token, family, loc_id, rem_id, saddr4 | saddr6,
> + *   daddr4 | daddr6, sport, dport, backup, if_idx [, error] The priority of a
> + *   subflow has changed. 'error' should not be set.
> + * @MPTCP_EVENT_LISTENER_CREATED: family, sport, saddr4 | saddr6 A new PM
> + *   listener is created.
> + * @MPTCP_EVENT_LISTENER_CLOSED: family, sport, saddr4 | saddr6 A PM listener
> + *   is closed.
> + */
> +enum mptcp_event_type {
> +	MPTCP_EVENT_UNSPEC,
> +	MPTCP_EVENT_CREATED,
> +	MPTCP_EVENT_ESTABLISHED,
> +	MPTCP_EVENT_CLOSED,
> +	MPTCP_EVENT_ANNOUNCED = 6,
> +	MPTCP_EVENT_REMOVED,
> +	MPTCP_EVENT_SUB_ESTABLISHED = 10,
> +	MPTCP_EVENT_SUB_CLOSED,
> +	MPTCP_EVENT_SUB_PRIORITY = 13,
> +	MPTCP_EVENT_LISTENER_CREATED = 15,
> +	MPTCP_EVENT_LISTENER_CLOSED,
> +};

...

  reply	other threads:[~2023-10-13 17:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-10 19:21 [PATCH net-next 0/6] mptcp: convert Netlink code to use YAML spec Matthieu Baerts
2023-10-10 19:21 ` [PATCH net-next 1/6] tools: ynl: add uns-admin-perm to genetlink legacy Matthieu Baerts
2023-10-10 19:21 ` [PATCH net-next 2/6] net: mptcp: convert netlink from small_ops to ops Matthieu Baerts
2023-10-10 19:21 ` [PATCH net-next 3/6] Documentation: netlink: add a YAML spec for mptcp Matthieu Baerts
2023-10-11  1:08   ` Jakub Kicinski
2023-10-11 10:13     ` Davide Caratti
2023-10-11 16:22       ` Jakub Kicinski
2023-10-10 19:21 ` [PATCH net-next 4/6] uapi: mptcp: use header file generated from YAML spec Matthieu Baerts
2023-10-13 17:28   ` Simon Horman [this message]
2023-10-14 11:37     ` Davide Caratti
2023-10-17  8:58       ` Simon Horman
2023-10-10 19:21 ` [PATCH net-next 5/6] net: mptcp: rename netlink handlers to mptcp_pm_nl_<blah>_{doit,dumpit} Matthieu Baerts
2023-10-10 19:21 ` [PATCH net-next 6/6] net: mptcp: use policy generated by YAML spec Matthieu Baerts
  -- strict thread matches above, loose matches on Subject: below --
2023-10-06 14:46 [PATCH net-next 0/6] mptcp: convert Netlink code to use " Matthieu Baerts
2023-10-06 14:46 ` [PATCH net-next 4/6] uapi: mptcp: use header file generated from " Matthieu Baerts

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=20231013172823.GR29570@kernel.org \
    --to=horms@kernel.org \
    --cc=davem@davemloft.net \
    --cc=dcaratti@redhat.com \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martineau@kernel.org \
    --cc=matttbe@kernel.org \
    --cc=mptcp@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /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.