If bridge have no sub-interfaces, it's status may be still with 'RUNNING'
From: yzhu1 <hidden>
Date: 2015-02-13 09:57:37
13 messages, 4 authors, 2015-03-10 · open the first message on its own page
From: yzhu1 <hidden>
Date: 2015-02-13 09:57:37
Hi, all I made this test on ubuntu 14.04 with kernel 3,19-rc7: 1. brctl addbr br0 2. ifconfig br0 up 3. ifconfig br0 (br0's status is with 'RUNNING') 4. brctl addif br0 eth0 5. brctl delif br0 eth0 6. ifconfig br0 (br0's status is without 'RUNNING') When there is no sub-interface, the flag "RUNNING" is missing after the last sub-interface is removed. As such, should we keep "RUNNING" flag after the last sub-interface is removed? Thanks a lot. Zhu Yanjun
From: yzhu1 <hidden>
Date: 2015-02-13 10:00:20
Add the maintainer of bridge. Any reply is appreciated. Zhu Yanjun On 02/13/2015 05:57 PM, yzhu1 wrote:
Hi, all I made this test on ubuntu 14.04 with kernel 3,19-rc7: 1. brctl addbr br0 2. ifconfig br0 up 3. ifconfig br0 (br0's status is with 'RUNNING') 4. brctl addif br0 eth0 5. brctl delif br0 eth0 6. ifconfig br0 (br0's status is without 'RUNNING') When there is no sub-interface, the flag "RUNNING" is missing after the last sub-interface is removed. As such, should we keep "RUNNING" flag after the last sub-interface is removed? Thanks a lot. Zhu Yanjun -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2015-02-13 18:31:01
On Fri, 13 Feb 2015 17:57:45 +0800 yzhu1 [off-list ref] wrote:
Hi, all I made this test on ubuntu 14.04 with kernel 3,19-rc7: 1. brctl addbr br0 2. ifconfig br0 up 3. ifconfig br0 (br0's status is with 'RUNNING') 4. brctl addif br0 eth0 5. brctl delif br0 eth0 6. ifconfig br0 (br0's status is without 'RUNNING') When there is no sub-interface, the flag "RUNNING" is missing after the last sub-interface is removed. As such, should we keep "RUNNING" flag after the last sub-interface is removed?
This is intentional. If there are no active ports in bridge, then we want to tell applications that packets will go nowhere.
From: Wu, Kuaikuai <hidden>
Date: 2015-02-15 07:49:44
Hi Stephen,
When we up a bridge without sub-interfaces, it has "RUNNING" flag as below. Is it correct or not?
1. brctl addbr br0
2. ifconfig br0 up
3. ifconfig br0
br0 Link encap:Ethernet HWaddr e6:6c:84:a6:fc:64
inet6 addr: fe80::e46c:84ff:fea6:fc64/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:168 (168.0 B)
Best Regards
Kuaikuai Wu
-----Original Message-----
From: Stephen Hemminger [mailto:stephen@networkplumber.org]
Sent: Saturday, February 14, 2015 2:31 AM
To: Zhu, Yanjun
Cc: netdev; Wu, Kuaikuai; Tao, Yue
Subject: Re: If bridge have no sub-interfaces, it's status may be still with 'RUNNING'
On Fri, 13 Feb 2015 17:57:45 +0800
yzhu1 [off-list ref] wrote:
Hi, all I made this test on ubuntu 14.04 with kernel 3,19-rc7: 1. brctl addbr br0 2. ifconfig br0 up 3. ifconfig br0 (br0's status is with 'RUNNING') 4. brctl addif br0 eth0 5. brctl delif br0 eth0 6. ifconfig br0 (br0's status is without 'RUNNING') When there is no sub-interface, the flag "RUNNING" is missing after the last sub-interface is removed. As such, should we keep "RUNNING" flag after the last sub-interface is removed?
This is intentional. If there are no active ports in bridge, then we want to tell applications that packets will go nowhere.
From: yzhu1 <hidden>
Date: 2015-02-16 04:55:40
Hi, Stephen Follow your advice, I made a new patch. This patch will turn off carrier when a new bridge interface is created. Please comment on it. Thanks a lot. Zhu Yanjun On 02/14/2015 02:30 AM, Stephen Hemminger wrote:
On Fri, 13 Feb 2015 17:57:45 +0800 yzhu1 [off-list ref] wrote:quoted
Hi, all I made this test on ubuntu 14.04 with kernel 3,19-rc7: 1. brctl addbr br0 2. ifconfig br0 up 3. ifconfig br0 (br0's status is with 'RUNNING') 4. brctl addif br0 eth0 5. brctl delif br0 eth0 6. ifconfig br0 (br0's status is without 'RUNNING') When there is no sub-interface, the flag "RUNNING" is missing after the last sub-interface is removed. As such, should we keep "RUNNING" flag after the last sub-interface is removed?This is intentional. If there are no active ports in bridge, then we want to tell applications that packets will go nowhere.
From: David Ahern <hidden>
Date: 2015-02-16 15:47:14
On 2/15/15 9:55 PM, yzhu1 wrote:
quoted
quoted
1. brctl addbr br0 2. ifconfig br0 up 3. ifconfig br0 (br0's status is with 'RUNNING') 4. brctl addif br0 eth0 5. brctl delif br0 eth0 6. ifconfig br0 (br0's status is without 'RUNNING') When there is no sub-interface, the flag "RUNNING" is missing after the last sub-interface is removed.
I do not see that behavior with Fedora 21 and 3.18.5-201.fc21.x86_64. ie., after interface is removed br0 is still in up state. Perhaps a regression with 3.19.
quoted
quoted
As such, should we keep "RUNNING" flag after the last sub-interface is removed?This is intentional. If there are no active ports in bridge, then we want to tell applications that packets will go nowhere.
It changes current behavior with respect to tcpdump. Today I can launch tcpdump on a bridge interface before starting a VM. With this change I will not be able to do that. David
From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2015-02-16 16:51:40
Originally bridge code would start with carrier off, but there were users using bridge as a form of dummy device and this broke them. Therefore it was decided (like 5 yrs ago), that bridge should start with carrier on.
From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2015-02-16 16:52:17
On Mon, 16 Feb 2015 12:55:47 +0800 yzhu1 [off-list ref] wrote:
Hi, Stephen Follow your advice, I made a new patch. This patch will turn off carrier when a new bridge interface is created. Please comment on it. Thanks a lot. Zhu Yanjun
NAK. We need to keep the current behavior to not break corner case users.
From: Zhu, Yanjun <hidden>
Date: 2015-02-17 16:14:40
Hi, all We should make it compatible. So I made a patch to turn on carrier on this bridge interface when the last sub interface is removed. Hi, David Please make tests with this latest patch. Thanks a lot. Best Regards! Zhu Yanjun ________________________________________ From: Stephen Hemminger [stephen@networkplumber.org] Sent: Monday, February 16, 2015 8:51 AM To: David Ahern Cc: Zhu, Yanjun; netdev; Wu, Kuaikuai; Tao, Yue Subject: Re: If bridge have no sub-interfaces, it's status may be still with 'RUNNING' Originally bridge code would start with carrier off, but there were users using bridge as a form of dummy device and this broke them. Therefore it was decided (like 5 yrs ago), that bridge should start with carrier on.
From: yzhu1 <hidden>
Date: 2015-02-25 02:57:05
Hi, Stephen && David Any update? Zhu Yanjun On 02/18/2015 12:14 AM, Zhu, Yanjun wrote:
Hi, all We should make it compatible. So I made a patch to turn on carrier on this bridge interface when the last sub interface is removed. Hi, David Please make tests with this latest patch. Thanks a lot. Best Regards! Zhu Yanjun ________________________________________ From: Stephen Hemminger [stephen@networkplumber.org] Sent: Monday, February 16, 2015 8:51 AM To: David Ahern Cc: Zhu, Yanjun; netdev; Wu, Kuaikuai; Tao, Yue Subject: Re: If bridge have no sub-interfaces, it's status may be still with 'RUNNING' Originally bridge code would start with carrier off, but there were users using bridge as a form of dummy device and this broke them. Therefore it was decided (like 5 yrs ago), that bridge should start with carrier on.
From: David Ahern <hidden>
Date: 2015-02-25 04:23:39
On 2/24/15 7:55 PM, yzhu1 wrote:
Hi, Stephen && David Any update?
As I mentioned in my last response I see no problem with the existing behavior -- 3.18, 3.19 and 4.0-rc1. With all of them the bridge stays in the running state after all interfaces are removed. David
From: yzhu1 <hidden>
Date: 2015-02-25 05:29:40
On 02/25/2015 12:23 PM, David Ahern wrote:
On 2/24/15 7:55 PM, yzhu1 wrote:quoted
Hi, Stephen && David Any update?As I mentioned in my last response I see no problem with the existing behavior -- 3.18, 3.19 and 4.0-rc1. With all of them the bridge stays in the running state after all interfaces are removed. David
Hi, David
I made tests on kernel 3.19-rc7.
1. brctl addbr br0
2. ifconfig br0 up
3. ifconfig br0 (br0's status is with 'RUNNING')
br0 Link encap:Ethernet HWaddr 0a:70:0b:06:34:8f
inet6 addr: fe80::870:bff:fe06:348f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:5054 (5.0 KB)
4. brctl addif br0 eth1
5. brctl delif br0 eth1
6. ifconfig br0 (br0's status is without 'RUNNING')
br0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
inet6 addr: fe80::870:bff:fe06:348f/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:328 errors:0 dropped:5 overruns:0 frame:0
TX packets:19 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:39997 (39.9 KB) TX bytes:5760 (5.7 KB)
Please compare with the outputs of step 3 and step 6, we can find the difference.
uname:
Linux wind-virtual-machine 3.19.0-rc7 #2 SMP Wed Jan 28 18:36:44 CST 2015 x86_64 x86_64 x86_64 GNU/Linux
So I think we should apply the latest patch to make consistent.
From: yzhu1 <hidden>
Date: 2015-03-10 06:08:40
Hi, Stephen && David Any update ? Best Regards! Zhu Yanjun On 02/16/2015 12:55 PM, yzhu1 wrote:
Hi, Stephen Follow your advice, I made a new patch. This patch will turn off carrier when a new bridge interface is created. Please comment on it. Thanks a lot. Zhu Yanjun On 02/14/2015 02:30 AM, Stephen Hemminger wrote:quoted
On Fri, 13 Feb 2015 17:57:45 +0800 yzhu1 [off-list ref] wrote:quoted
Hi, all I made this test on ubuntu 14.04 with kernel 3,19-rc7: 1. brctl addbr br0 2. ifconfig br0 up 3. ifconfig br0 (br0's status is with 'RUNNING') 4. brctl addif br0 eth0 5. brctl delif br0 eth0 6. ifconfig br0 (br0's status is without 'RUNNING') When there is no sub-interface, the flag "RUNNING" is missing after the last sub-interface is removed. As such, should we keep "RUNNING" flag after the last sub-interface is removed?This is intentional. If there are no active ports in bridge, then we want to tell applications that packets will go nowhere.