Systemd/src/network
Susant Sahani fe8ac65b68 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: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> 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]
2014-07-07 21:52:01 +02:00
..
.gitignore Revert "update gitignore" 2014-05-22 06:14:41 +09:00
Makefile networkd: add a basic network daemon 2013-11-09 23:41:17 +01:00
network-util.h libsystemd-network: move network-utils from src/shared 2014-03-21 21:54:37 +01:00
networkd-address-pool.c networkd: add address pool support 2014-06-18 18:28:29 +02:00
networkd-address.c networkd: add support for peer address 2014-07-07 13:32:14 +02:00
networkd-bond.c networkd: add support for mode 2014-07-07 21:52:01 +02:00
networkd-dummy.c networkd: netdev - take ref immediately after calling out 2014-07-03 11:00:01 +02:00
networkd-link.c networkd: properly track addresses when first added 2014-07-03 22:55:05 +02:00
networkd-macvlan.c networkd: netdev - add missing refs 2014-07-07 14:18:33 +02:00
networkd-manager.c networkd: link - ignore missing MAC address 2014-07-01 12:55:05 +02:00
networkd-netdev-gperf.gperf networkd: add support for mode 2014-07-07 21:52:01 +02:00
networkd-netdev.c networkd: add support for mode 2014-07-07 21:52:01 +02:00
networkd-network-gperf.gperf networkd: add support for peer address 2014-07-07 13:32:14 +02:00
networkd-network.c networkd: accept section DHCP in systemd.network files 2014-07-04 11:34:43 +02:00
networkd-route.c networkd: netdev - take ref immediately after calling out 2014-07-03 11:00:01 +02:00
networkd-tunnel.c networkd: netdev - add missing refs 2014-07-07 14:18:33 +02:00
networkd-tuntap.c networkd: tuntap - enable PacketInfo by default 2014-07-03 11:37:54 +02:00
networkd-veth.c networkd veth: Make kind assert 2014-07-07 21:49:14 +02:00
networkd-vlan.c networkd: netdev - add missing refs 2014-07-07 14:18:33 +02:00
networkd-vxlan.c networkd: netdev - add missing refs 2014-07-07 14:18:33 +02:00
networkd-wait-online.c Fix several small typos 2014-05-24 19:01:03 -04:00
networkd-wait-online.h networkd-wait-online: flush monitor events after processing 2014-05-08 15:27:55 +02:00
networkd.c networkd: split runtime config dir from state dir 2014-06-03 18:58:00 +02:00
networkd.h networkd: add support for mode 2014-07-07 21:52:01 +02:00
sd-network.c networkd: split runtime config dir from state dir 2014-06-03 18:58:00 +02:00
test-network.c Add support for DHCP static route options 2014-06-29 15:18:21 +02:00