[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m2le2pbc1o.fsf@gmail.com>
Date: Fri, 28 Jun 2024 11:24:03 +0100
From: Donald Hunter <donald.hunter@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
pabeni@...hat.com
Subject: Re: [PATCH net-next v2 2/2] tcp_metrics: add netlink protocol spec
in YAML
Jakub Kicinski <kuba@...nel.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@...nel.org>
Reviewed-by: Donald Hunter <donald.hunter@...il.com>
Powered by blists - more mailing lists