All of lore.kernel.org
 help / color / mirror / Atom feed
From: Donald Hunter <donald.hunter@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net,  netdev@vger.kernel.org,
	 edumazet@google.com, pabeni@redhat.com
Subject: Re: [PATCH net-next v2 2/2] tcp_metrics: add netlink protocol spec in YAML
Date: Fri, 28 Jun 2024 11:24:03 +0100	[thread overview]
Message-ID: <m2le2pbc1o.fsf@gmail.com> (raw)
In-Reply-To: <20240627213551.3147327-3-kuba@kernel.org> (Jakub Kicinski's message of "Thu, 27 Jun 2024 14:35:51 -0700")

Jakub Kicinski <kuba@kernel.org> writes:

> Add a protocol spec for tcp_metrics, so that it's accessible via YNL.
> Useful at the very least for testing fixes.
>
> In this episode of "10,000 ways to complicate netlink" the metric
> nest has defines which are off by 1. iproute2 does:
>
>         struct rtattr *m[TCP_METRIC_MAX + 1 + 1];
>
>         parse_rtattr_nested(m, TCP_METRIC_MAX + 1, a);
>
>         for (i = 0; i < TCP_METRIC_MAX + 1; i++) {
>                 // ...
>                 attr = m[i + 1];
>
> This is too weird to support in YNL, add a new set of defines
> with _correct_ values to the official kernel header.
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Reviewed-by: Donald Hunter <donald.hunter@gmail.com>

  reply	other threads:[~2024-06-28 10:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-27 21:35 [PATCH net-next v2 0/2] tcp_metrics: add netlink protocol spec in YAML Jakub Kicinski
2024-06-27 21:35 ` [PATCH net-next v2 1/2] tcp_metrics: add UAPI to the header guard Jakub Kicinski
2024-06-28 10:23   ` Donald Hunter
2024-06-27 21:35 ` [PATCH net-next v2 2/2] tcp_metrics: add netlink protocol spec in YAML Jakub Kicinski
2024-06-28 10:24   ` Donald Hunter [this message]
2024-07-01  8:50 ` [PATCH net-next v2 0/2] " patchwork-bot+netdevbpf

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=m2le2pbc1o.fsf@gmail.com \
    --to=donald.hunter@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --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.