Cong Wang | 22 May 2012 09:48
Picon
Favicon

[PATCH 1/7] Add vlan support in network module

From: Cong Wang <xiyou.wangcong@...>

This patch adds basic vlan support in network module.

The cmdline syntax for vlan is:

        vlan=<vlanname>:<phydevice>

for an example:

        vlan=eth0.2:eth0

or
        vlan=vlan2:eth0

See the doc in patch 2/7.

Cc: Dave Young <dyoung@...>
Cc: Harald Hoyer <harald@...>
Cc: Vivek Goyal <vgoyal@...>
Signed-off-by: Cong Wang <xiyou.wangcong@...>
---
 modules.d/40network/ifup.sh         |   29 ++++++++++++++++++++++
 modules.d/40network/module-setup.sh |    3 ++
 modules.d/40network/net-genrules.sh |    5 ++++
 modules.d/40network/parse-vlan.sh   |   45 +++++++++++++++++++++++++++++++++++
 4 files changed, 82 insertions(+), 0 deletions(-)
 create mode 100644 modules.d/40network/parse-vlan.sh

diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
(Continue reading)

Cong Wang | 22 May 2012 09:48
Picon
Favicon

[PATCH 2/7] Add doc for vlan= cmdline

From: Cong Wang <xiyou.wangcong@...>

Document vlan= cmdline in dracut.cmdline(7).

Cc: Dave Young <dyoung@...>
Cc: Harald Hoyer <harald@...>
Cc: Vivek Goyal <vgoyal@...>
Signed-off-by: Cong Wang <xiyou.wangcong@...>
---
 dracut.cmdline.7.asc |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc
index 61cd139..95c6aea 100644
--- a/dracut.cmdline.7.asc
+++ b/dracut.cmdline.7.asc
 <at>  <at>  -304,6 +304,11  <at>  <at>  auto6::: do IPv6 autoconfiguration
 **rd.neednet=1**::
     boolean, bring up network even without netroot set

+**vlan=_<vlanname>_:_<phydevice>_**::
+    Setup vlan device named <vlanname> on <phydeivce>.
+    We support the four styles of vlan names: VLAN_PLUS_VID (vlan0005), VLAN_PLUS_VID_NO_PAD (vlan5),
+    DEV_PLUS_VID (eth0.0005), DEV_PLUS_VID_NO_PAD (eth0.5)
+
 NFS
 ~~~
 **root=**[_<server-ip>_:]_<root-dir>_[:_<nfs-options>_]::
--

-- 
1.7.7.6
(Continue reading)

Cong Wang | 22 May 2012 09:48
Picon
Favicon

[PATCH 3/7] Add doc for bond= cmdline

From: Cong Wang <xiyou.wangcong@...>

Document bond= cmdline in dracut.cmdline(7).

Cc: Dave Young <dyoung@...>
Cc: Harald Hoyer <harald@...>
Cc: Vivek Goyal <vgoyal@...>
Signed-off-by: Cong Wang <xiyou.wangcong@...>
---
 dracut.cmdline.7.asc |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc
index 95c6aea..79a4577 100644
--- a/dracut.cmdline.7.asc
+++ b/dracut.cmdline.7.asc
 <at>  <at>  -309,6 +309,15  <at>  <at>  auto6::: do IPv6 autoconfiguration
     We support the four styles of vlan names: VLAN_PLUS_VID (vlan0005), VLAN_PLUS_VID_NO_PAD (vlan5),
     DEV_PLUS_VID (eth0.0005), DEV_PLUS_VID_NO_PAD (eth0.5)

+**bond=_<bondname>_[:_<bondslaves>_:[:_<options>_]]**::
+    Setup bonding device <bondname> on top of <bondslaves>.
+    <bondslaves> is a comma-separated list of physical (ethernet) interfaces.
+    <options> is a comma-separated list on bonding options (modinfo bonding for details)
+    in format compatible with initscripts. If <options> includes multi-valued arp_ip_target option,
+    then its values should be separated by semicolon.
+    Bond without parameters assumes bond=bond0:eth0,eth1:mode=balance-rr
+
+
 NFS
(Continue reading)

Cong Wang | 22 May 2012 09:48
Picon
Favicon

[PATCH 4/7] Add doc for bridge= cmdline

From: Cong Wang <xiyou.wangcong@...>

Document bridge= cmdline in dracut.cmdline(7).

Cc: Dave Young <dyoung@...>
Cc: Harald Hoyer <harald@...>
Cc: Vivek Goyal <vgoyal@...>
Signed-off-by: Cong Wang <xiyou.wangcong@...>
---
 dracut.cmdline.7.asc |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc
index 79a4577..c131f1c 100644
--- a/dracut.cmdline.7.asc
+++ b/dracut.cmdline.7.asc
 <at>  <at>  -317,6 +317,9  <at>  <at>  auto6::: do IPv6 autoconfiguration
     then its values should be separated by semicolon.
     Bond without parameters assumes bond=bond0:eth0,eth1:mode=balance-rr

+**bridge=_<bridgename>_:_<ethname>_**::
+    Setup bridge <bridgename> with <ethname>. Bridge without parameters assumes bridge=br0:eth0
+

 NFS
 ~~~
--

-- 
1.7.7.6

(Continue reading)

Cong Wang | 22 May 2012 09:48
Picon
Favicon

[PATCH 5/7] Remove netroot check in cmdline parsing code

From: Cong Wang <xiyou.wangcong@...>

Relax the rules for kdump, we don't specify netroot in kdump.

Cc: Dave Young <dyoung@...>
Cc: Harald Hoyer <harald@...>
Cc: Vivek Goyal <vgoyal@...>
Signed-off-by: Cong Wang <xiyou.wangcong@...>
---
 modules.d/40network/parse-bond.sh   |    3 ---
 modules.d/40network/parse-bridge.sh |    3 ---
 modules.d/40network/parse-vlan.sh   |    3 ---
 3 files changed, 0 insertions(+), 9 deletions(-)

diff --git a/modules.d/40network/parse-bond.sh b/modules.d/40network/parse-bond.sh
index ae0ae97..5822685 100755
--- a/modules.d/40network/parse-bond.sh
+++ b/modules.d/40network/parse-bond.sh
 <at>  <at>  -15,9 +15,6  <at>  <at> 

 # Check if bond parameter is valid
 if getarg bond= >/dev/null ; then
-    if [ -z "$netroot" ] ; then
-        die "No netboot configured, bond is invalid"
-    fi
     command -v ifenslave >/dev/null 2>&1 || die "No 'ifenslave' installed"
 fi

diff --git a/modules.d/40network/parse-bridge.sh b/modules.d/40network/parse-bridge.sh
index aaa5a54..6e1fee1 100755
(Continue reading)

Cong Wang | 22 May 2012 09:48
Picon
Favicon

[PATCH 6/7] Do not use ifenslave

From: Cong Wang <xiyou.wangcong@...>

ifenslave could be dropped, use the /sys interface.

Cc: Dave Young <dyoung@...>
Cc: Harald Hoyer <harald@...>
Cc: Vivek Goyal <vgoyal@...>
Signed-off-by: Cong Wang <xiyou.wangcong@...>
---
 modules.d/40network/ifup.sh         |    2 +-
 modules.d/40network/module-setup.sh |    2 +-
 modules.d/40network/parse-bond.sh   |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
index c03838f..1aaa1a8 100755
--- a/modules.d/40network/ifup.sh
+++ b/modules.d/40network/ifup.sh
 <at>  <at>  -156,7 +156,7  <at>  <at>  if [ -e /tmp/bond.info ]; then

         for slave in $bondslaves ; do
             ip link set $slave down
-            ifenslave $bondname $slave
+            echo "+$slave" > /sys/class/net/$bondname/bonding/slaves
             ip link set $slave up
             wait_for_if_up $slave
         done
diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh
index f28286c..da58521 100755
--- a/modules.d/40network/module-setup.sh
(Continue reading)

Cong Wang | 22 May 2012 09:48
Picon
Favicon

[PATCH 7/7] Avoid generating udev rules for master interfaces

From: Cong Wang <xiyou.wangcong@...>

Vlan/bridge/bonding device has the same mac address with its underlying
physical device, if we generate udev rules for vlan NIC too,
its physical device name will be override.

This looks a little ugly, but I can't find any better way to handle this.

Cc: Dave Young <dyoung@...>
Cc: Harald Hoyer <harald@...>
Cc: Vivek Goyal <vgoyal@...>
Signed-off-by: Cong Wang <xiyou.wangcong@...>
---
 modules.d/40network/ifname-genrules.sh |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/modules.d/40network/ifname-genrules.sh b/modules.d/40network/ifname-genrules.sh
index e188c88..89621a2 100755
--- a/modules.d/40network/ifname-genrules.sh
+++ b/modules.d/40network/ifname-genrules.sh
 <at>  <at>  -8,9 +8,15  <at>  <at>  if ! getarg ifname= >/dev/null ; then
 fi

 {
+    [ -e /tmp/vlan.info ] && source /tmp/vlan.info
+    [ -e /tmp/bridge.info ] && source /tmp/bridge.info
+    [ -e /tmp/bond.info ] && source /tmp/bond.info
     for p in $(getargs ifname=); do
         parse_ifname_opts $p
-        printf 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="%s", ATTR{type}=="1",
(Continue reading)


Gmane