summaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_alb.h
diff options
context:
space:
mode:
authorVeaceslav Falico2013-09-25 09:20:16 +0200
committerDavid S. Miller2013-09-26 22:02:05 +0200
commitc33d78874eeb6c28909158719043fa2a5fd18f0a (patch)
tree626c88e01320831801c7d0548bd5f410c96f78e8 /drivers/net/bonding/bond_alb.h
parentbonding: use bond_for_each_slave() in bond_uninit() (diff)
downloadkernel-qcow2-linux-c33d78874eeb6c28909158719043fa2a5fd18f0a.tar.gz
kernel-qcow2-linux-c33d78874eeb6c28909158719043fa2a5fd18f0a.tar.xz
kernel-qcow2-linux-c33d78874eeb6c28909158719043fa2a5fd18f0a.zip
bonding: rework bond_3ad_xmit_xor() to use bond_for_each_slave() only
Currently, there are two loops - first we find the first slave in an aggregator after the xmit_hash_policy() returned number, and after that we loop from that slave, over bonding head, and till that slave to find any suitable slave to send the packet through. Replace it by just one bond_for_each_slave() loop, which first loops through the requested number of slaves, saving the first suitable one, and after that we've hit the requested number of slaves to skip - search for any up slave to send the packet through. If we don't find such kind of slave - then just send the packet through the first suitable slave found. Logic remains unchainged, and we skip two loops. Also, refactor it a bit for readability. CC: Jay Vosburgh <fubar@us.ibm.com> CC: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: Veaceslav Falico <vfalico@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_alb.h')
0 files changed, 0 insertions, 0 deletions