History log of /drivers/net/bonding/bond_debugfs.c
Revision Date Author Comments
547942cace50e536dcda9ce8397792bc992291d6 15-Sep-2014 Nikolay Aleksandrov <nikolay@redhat.com> bonding: trivial: style and comment fixes

First adjust a couple of locking comments that were left inaccurate,
then adjust comments to use the netdev styling and remove extra new
lines where necessary and add a couple of new lines between declarations
and code. These are all trivial styling changes, no functional change.
Also removed a couple of outdated or obvious comments.
This patch is by no means a complete fix of all netdev style violations
but it gets the bonding closer.

Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
4bab16d7c97498e91564231b922d49f52efaf7d4 11-Sep-2014 Nikolay Aleksandrov <nikolay@redhat.com> bonding: alb: convert to bond->mode_lock

The ALB/TLB specific spinlocks are no longer necessary as we now have
bond->mode_lock for this purpose, so convert them and remove them from
struct alb_bond_info.
Also remove the unneeded lock/unlock functions and use spin_lock/unlock
directly.

Suggested-by: Jay Vosburgh <jay.vosburgh@canonical.com>
Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9ef1cf16cfc789eb631eb38d46d5dbfb36832546 15-Jul-2014 Veaceslav Falico <vfalico@gmail.com> bonding: convert bond_debugfs.c to use netdev_printk instead of pr_

One occurance left intact as it's unrelated to net_device.

CC: Jay Vosburgh <j.vosburgh@gmail.com>
CC: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Veaceslav Falico <vfalico@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
01844098ecd9564cd5f903e3ff6c1ea96355772d 15-May-2014 Veaceslav Falico <vfalico@gmail.com> bonding: create a macro for bond mode and use it

CC: Jay Vosburgh <j.vosburgh@gmail.com>
CC: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Veaceslav Falico <vfalico@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
91565ebbcc5aea69d4d6cb3832f52da03dbd44b6 16-Feb-2014 Joe Perches <joe@perches.com> bonding: Convert pr_warning to pr_warn, neatening

Use more current logging style.

Coalesce formats, realign arguments, drop unnecessary periods.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
e53665c6eaa6da6a4a4130ecc2fe9429c7ad2daf 28-Nov-2012 Jiri Bohac <jbohac@suse.cz> bonding: delete migrated IP addresses from the rlb hash table

Bonding in balance-alb mode records information from ARP packets
passing through the bond in a hash table (rx_hashtbl).

At certain situations (e.g. link change of a slave),
rlb_update_rx_clients() will send out ARP packets to update ARP
caches of other hosts on the network to achieve RX load
balancing.

The problem is that once an IP address is recorded in the hash
table, it stays there indefinitely. If this IP address is
migrated to a different host in the network, bonding still sends
out ARP packets that poison other systems' ARP caches with
invalid information.

This patch solves this by looking at all incoming ARP packets,
and checking if the source IP address is one of the source
addresses stored in the rx_hashtbl. If it is, but the MAC
addresses differ, the corresponding hash table entries are
removed. Thus, when an IP address is migrated, the first ARP
broadcast by its new owner will purge the offending entries of
rx_hashtbl.

The hash table is hashed by ip_dst. To be able to do the above
check efficiently (not walking the whole hash table), we need a
reverse mapping (by ip_src).

I added three new members in struct rlb_client_info:
rx_hashtbl[x].src_first will point to the start of a list of
entries for which hash(ip_src) == x.
The list is linked with src_next and src_prev.

When an incoming ARP packet arrives at rlb_arp_recv()
rlb_purge_src_ip() can quickly walk only the entries on the
corresponding lists, i.e. the entries that are likely to contain
the offending IP address.

To avoid confusion, I renamed these existing fields of struct
rlb_client_info:
next -> used_next
prev -> used_prev
rx_hashtbl_head -> rx_hashtbl_used_head

(The current linked list is _not_ a list of hash table
entries with colliding ip_dst. It's a list of entries that are
being used; its purpose is to avoid walking the whole hash table
when looking for used entries.)

Signed-off-by: Jiri Bohac <jbohac@suse.cz>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
96ca7ffe748bf91f851e6aa4479aa11c8b1122ba 09-Jul-2012 Eric W. Biederman <ebiederm@xmission.com> bonding: debugfs and network namespaces are incompatible

The bonding debugfs support has been broken in the presence of network
namespaces since it has been added. The debugfs support does not handle
multiple bonding devices with the same name in different network
namespaces.

I haven't had any bug reports, and I'm not interested in getting any.
Disable the debugfs support when network namespaces are enabled.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
caafa84251b886feb6cdf23d50e2cc99dcdaaaf3 12-Dec-2010 Taku Izumi <izumi.taku@jp.fujitsu.com> bonding: add the debugfs interface to see RLB hash table

This patch provices the debugfs interface to see RLB hash table
like the following:

# cat /sys/kernel/debug/bonding/bond0/rlb_hash_table
SourceIP DestinationIP Destination MAC DEV
10.124.196.205 10.124.196.205 ff:ff:ff:ff:ff:ff eth4
10.124.196.205 10.124.196.81 00:19:99:XX:XX:XX eth3
10.124.196.205 10.124.196.1 00:21:d8:XX:XX:XX eth0

This is helpful to check if the receive load balancing works as expected.

Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
f073c7ca29a4a7e14060d9d3ddf09bfbb7cd9cc0 09-Dec-2010 Taku Izumi <izumi.taku@jp.fujitsu.com> bonding: add the debugfs facility to the bonding driver

This patch provides the debugfs facility to the bonding driver.
The "bonding" directory is created in the debugfs root and directories of
each bonding interface (like bond0, bond1...) are created in that.

# mount -t debugfs none /sys/kernel/debug

# ls /sys/kernel/debug/bonding
bond0 bond1

Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>