Re: [PATCH net-next 1/2] bridge: Redirect to backup port when port is administratively down

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 13, 2025 at 05:20:17PM -0700, Jakub Kicinski wrote:
> On Tue, 12 Aug 2025 11:02:12 +0300 Ido Schimmel wrote:
> >  	/* redirect to backup link if the destination port is down */
> > -	if (rcu_access_pointer(to->backup_port) && !netif_carrier_ok(to->dev)) {
> > +	if (rcu_access_pointer(to->backup_port) &&
> > +	    (!netif_carrier_ok(to->dev) || !netif_running(to->dev))) {
> 
> Not really blocking this patch, but I always wondered why we allow
> devices with carrier on in admin down state. Is his just something we
> have because updating 200 drivers which don't manage carrier today
> would be a PITA? Or there's a stronger reason to allow this?
> Hopefully I'm not misreading the patch..

Probably the first reason.

The primary bridge port and its backup are usually bonds (the feature is
called "LAG Redirect" in hardware) and the bond driver does not turn off
its carrier upon admin down:

$ ip link show dev bond1
83: bond1: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 9c:05:91:9b:5e:f1 brd ff:ff:ff:ff:ff:ff
$ cat /sys/class/net/bond1/carrier_changes 
2
# ip link set dev bond1 down
$ cat /sys/class/net/bond1/carrier_changes 
2

Same thing happens with the dummy device that is used in the selftest. 




[Index of Archives]     [Netdev]     [AoE Tools]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux