[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEQfnk3Ft4ke3UXS60WMYH8M6WsLgH=D=7zXmkcr3tx0cdiR_g@mail.gmail.com>
Date: Wed, 24 Sep 2025 13:21:32 +0200
From: Ján Václav <jvaclav@...hat.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>, netdev@...r.kernel.org
Subject: Re: [PATCH v2 net-next] net/hsr: add protocol version to fill_info output
On Wed, Sep 24, 2025 at 2:06 AM Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Mon, 22 Sep 2025 11:37:45 +0200 Jan Vaclav wrote:
> > if (hsr->prot_version == PRP_V1)
> > proto = HSR_PROTOCOL_PRP;
> > + if (nla_put_u8(skb, IFLA_HSR_VERSION, hsr->prot_version))
> > + goto nla_put_failure;
>
> Looks like configuration path does not allow setting version if proto
> is PRP. Should we add an else before the if? since previous if is
> checking for PRP already
>
The way HSR configuration is currently handled seems very confusing to
me, because it allows setting the protocol version, but for PRP_V1
only as a byproduct of setting the protocol to PRP. If you configure
an interface with (proto = PRP, version = PRP_V1), it will fail, which
seems wrong to me, considering this is the end result of configuring
only with proto = PRP anyways.
I think the best solution would be to introduce another change that
allows explicitly setting the version to PRP_V1 if the protocol is set
to PRP.
What do you think?
Powered by blists - more mailing lists