From: Andrew Lunn <andrew@lunn.ch>
To: Rodolfo Giometti <giometti@enneenne.com>
Cc: netdev@vger.kernel.org, Roopa Prabhu <roopa@nvidia.com>,
Nikolay Aleksandrov <razor@blackwall.org>,
Stephen Hemminger <shemminger@osdl.org>,
Flavio Leitner <fbl@redhat.com>,
"David S . Miller" <davem@davemloft.net>
Subject: Re: [PATCH] net br_netlink.c:y allow non "disabled" state for !netif_oper_up() links
Date: Fri, 11 Nov 2022 14:09:57 +0100 [thread overview]
Message-ID: <Y25JpVOSc6mh0cx8@lunn.ch> (raw)
In-Reply-To: <114c9c4c-57b0-5cf5-2217-8bee3c94e6c7@enneenne.com>
> > I also
> > wonder what the hardware drivers do? Since this is a change in
> > behaviour, they might not actually do anything.
>
> For instance Marvell switches just set the state (see
> linux/drivers/net/dsa/mv88e6xxx/port.c) without checking for carrier status:
Yes, that was one i checked myself. I think i remember reviewing a DSA
driver which did not have a mechanism to disable a port, other than
the STP state. So there is a danger the mac_down() call is going to
change the STP state, and the mac_up() call will change it again.
> Yes, of course we can do it but (in case of MRP) the state machine must be
> altered in several points and, again, why the kernel should force such
> behaviour (i.e. introducing a policy) when drivers just don't consider it
> (see the above example).
>
> The kernel should implement mechanisms while all policies should be into user space.
While i agree the policy should not be in the kernel, you have history
against you. Since this was never a requirement, and on first
mentioning it, it seems like an odd requirement, there is no guarantee
it will actually work for all drivers. So either you have to:
1) Say some kernel drivers are probably broken, will do horrible
things to your network instead of being redundant, test it well
before deploying.
2) Monitor for the link up event, and set the STP state as required.
The in kernel bridge/STP code takes this second approach, which again
reinforces the fact that because drivers never needed to support this,
some probably don't.
Andrew
prev parent reply other threads:[~2022-11-11 13:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-09 15:24 Allow non "disabled" state for !netif_oper_up() links Rodolfo Giometti
2022-11-09 15:24 ` [PATCH] net br_netlink.c:y allow " Rodolfo Giometti
2022-11-09 17:34 ` Andrew Lunn
2022-11-09 18:19 ` Rodolfo Giometti
2022-11-09 18:46 ` Andrew Lunn
2022-11-11 9:43 ` Rodolfo Giometti
2022-11-11 13:09 ` Andrew Lunn [this message]
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=Y25JpVOSc6mh0cx8@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=fbl@redhat.com \
--cc=giometti@enneenne.com \
--cc=netdev@vger.kernel.org \
--cc=razor@blackwall.org \
--cc=roopa@nvidia.com \
--cc=shemminger@osdl.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).