From: Jakub Kicinski <kuba@kernel.org>
To: "Ján Václav" <jvaclav@redhat.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
netdev@vger.kernel.org
Subject: Re: [PATCH v2 net-next] net/hsr: add protocol version to fill_info output
Date: Wed, 24 Sep 2025 16:40:41 -0700 [thread overview]
Message-ID: <20250924164041.3f938cab@kernel.org> (raw)
In-Reply-To: <CAEQfnk3Ft4ke3UXS60WMYH8M6WsLgH=D=7zXmkcr3tx0cdiR_g@mail.gmail.com>
On Wed, 24 Sep 2025 13:21:32 +0200 Ján Václav wrote:
> On Wed, Sep 24, 2025 at 2:06 AM Jakub Kicinski <kuba@kernel.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'm not very familiar with HSR or PRP. But The PRP_V1 which has value
of 3 looks like a kernel-internal hack. Or does the protocol actually
specify value 3 to mean PRP?
I don't think there's anything particularly wrong with the code.
The version is for HSR because PRP only has one version, there's no
ambiguity.
But again, I'm just glancing at the code I could be wrong..
next prev parent reply other threads:[~2025-09-24 23:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-22 9:37 [PATCH v2 net-next] net/hsr: add protocol version to fill_info output Jan Vaclav
2025-09-23 7:22 ` Simon Horman
2025-09-24 0:06 ` Jakub Kicinski
2025-09-24 11:21 ` Ján Václav
2025-09-24 12:01 ` Fernando Fernandez Mancera
2025-09-24 23:40 ` Jakub Kicinski [this message]
2025-09-25 8:37 ` Fernando Fernandez Mancera
2025-09-26 2:00 ` Jakub Kicinski
2025-09-26 9:33 ` Fernando Fernandez Mancera
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=20250924164041.3f938cab@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jvaclav@redhat.com \
--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.