* [PATCH] network: support vlan tagged bonding
@ 2012-06-21 3:44 Cong Wang
[not found] ` <1340250275-24823-1-git-send-email-amwang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Cong Wang @ 2012-06-21 3:44 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA
Cc: Cong Wang, Harald Hoyer, Dave Young, Vivek Goyal
From: Cong Wang <xiyou.wangcong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
This patch adds support of vlan tagged bonding, for example,
bond0.2. In case of regression, I also tested bond0 and eth0.2,
all work fine.
Cc: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Vivek Goyal <vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Cong Wang <xiyou.wangcong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
modules.d/40network/ifup.sh | 8 ++++++--
modules.d/40network/net-genrules.sh | 6 +++---
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
index 31eb966..316a21a 100755
--- a/modules.d/40network/ifup.sh
+++ b/modules.d/40network/ifup.sh
@@ -188,7 +188,7 @@ if [ -e /tmp/bridge.info ]; then
brctl setfd $bridgename 0
for ethname in $ethnames ; do
if [ "$ethname" = "$bondname" ] ; then
- DO_BOND_SETUP=yes ifup $bondname
+ DO_BOND_SETUP=yes ifup $bondname -m
else
ip link set $ethname up
fi
@@ -211,7 +211,11 @@ get_vid() {
if [ "$netif" = "$vlanname" ] && [ ! -e /tmp/net.$vlanname.up ]; then
modprobe 8021q
- ip link set "$phydevice" up
+ if [ "$phydevice" = "$bondname" ] ; then
+ DO_BOND_SETUP=yes ifup $phydevice -m
+ else
+ ip link set "$phydevice" up
+ fi
wait_for_if_up "$phydevice"
ip link add dev "$vlanname" link "$phydevice" type vlan id "$(get_vid $vlanname; echo $?)"
fi
diff --git a/modules.d/40network/net-genrules.sh b/modules.d/40network/net-genrules.sh
index 99d0fe5..867abcf 100755
--- a/modules.d/40network/net-genrules.sh
+++ b/modules.d/40network/net-genrules.sh
@@ -21,19 +21,19 @@ fix_bootif() {
# bridge: attempt only the defined interface
if [ -e /tmp/bridge.info ]; then
. /tmp/bridge.info
- IFACES=${ethnames%% *}
+ IFACES+=" ${ethnames%% *}"
fi
# bond: attempt only the defined interface (override bridge defines)
if [ -e /tmp/bond.info ]; then
. /tmp/bond.info
# It is enough to fire up only one
- IFACES=${bondslaves%% *}
+ IFACES+=" ${bondslaves%% *}"
fi
if [ -e /tmp/vlan.info ]; then
. /tmp/vlan.info
- IFACES=$phydevice
+ IFACES+=" $phydevice"
fi
ifup='/sbin/ifup $env{INTERFACE}'
--
1.7.7.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] network: support vlan tagged bonding
[not found] ` <1340250275-24823-1-git-send-email-amwang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2012-06-21 9:18 ` Harald Hoyer
0 siblings, 0 replies; 2+ messages in thread
From: Harald Hoyer @ 2012-06-21 9:18 UTC (permalink / raw)
To: Cong Wang
Cc: initramfs-u79uwXL29TY76Z2rM5mHXA, Cong Wang, Dave Young, Vivek Goyal
On 06/21/2012 05:44 AM, Cong Wang wrote:
> From: Cong Wang <xiyou.wangcong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>
> This patch adds support of vlan tagged bonding, for example,
> bond0.2. In case of regression, I also tested bond0 and eth0.2,
> all work fine.
>
> Cc: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> Cc: Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> Cc: Vivek Goyal <vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Cong Wang <xiyou.wangcong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> modules.d/40network/ifup.sh | 8 ++++++--
> modules.d/40network/net-genrules.sh | 6 +++---
> 2 files changed, 9 insertions(+), 5 deletions(-)
Thanks.. pushed
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-06-21 9:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-21 3:44 [PATCH] network: support vlan tagged bonding Cong Wang
[not found] ` <1340250275-24823-1-git-send-email-amwang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-06-21 9:18 ` Harald Hoyer
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.