From fe8ac65b683ec7408b26ba40040134e6d66b1c5c Mon Sep 17 00:00:00 2001 From: Susant Sahani Date: Fri, 4 Jul 2014 22:35:02 +0530 Subject: networkd: add support for mode This patch adds supports networkd to configure bond mode during creation via persistent conf. Mode can be configured with conf param 'Mode'. A new section Bond is added to the conf to support bond mode. These modes can be configured now. balance-rr active-backup balance-xor broadcast 802.3ad balance-tlb balance-alb Example conf file: test-bond.conf [NetDev] Name=bond1 Kind=bond [Bond] Mode=balance-xor Test case: 1. start networkd service: 12: bond1: mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default link/ether 22:89:6c:47:23:d2 brd ff:ff:ff:ff:ff:ff 2. find bond mode: cat /proc/net/bonding/bond1 Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011) Bonding Mode: load balancing (xor) Transmit Hash Policy: layer2 (0) MII Status: up MII Polling Interval (ms): 0 Up Delay (ms): 0 Down Delay (ms): 0 Changes: 1. Added file networkd-bond.c 2. Bond mode enum BondMode 3. conf section [Bond] [tomegun: whitespace] --- src/network/networkd-netdev-gperf.gperf | 1 + 1 file changed, 1 insertion(+) (limited to 'src/network/networkd-netdev-gperf.gperf') diff --git a/src/network/networkd-netdev-gperf.gperf b/src/network/networkd-netdev-gperf.gperf index 5955f5195e..a698ea8c4d 100644 --- a/src/network/networkd-netdev-gperf.gperf +++ b/src/network/networkd-netdev-gperf.gperf @@ -48,3 +48,4 @@ Tap.MultiQueue, config_parse_bool, 0, Tap.PacketInfo, config_parse_bool, 0, offsetof(NetDev, packet_info) Tap.User, config_parse_string, 0, offsetof(NetDev, user_name) Tap.Group, config_parse_string, 0, offsetof(NetDev, group_name) +Bond.Mode, config_parse_bond_mode, 0, offsetof(NetDev, bond_mode) -- cgit v1.2.3-54-g00ecf