1. 29 9月, 2013 4 次提交
    • V
      bonding: remove __get_first_port() · fe9323da
      Veaceslav Falico 提交于
      Currently we have only one user of it, so it's kind of useless and just
      obfusicates things.
      
      Remove it and move the logic to the only user -
      bond_3ad_state_machine_handler().
      
      CC: Jay Vosburgh <fubar@us.ibm.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      Signed-off-by: NVeaceslav Falico <vfalico@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fe9323da
    • V
      bonding: remove __get_next_port() · 3c4c88a1
      Veaceslav Falico 提交于
      Currently this function is only used in constructs like
      
      for (port = __get_first_port(bond); port; port = __get_next_port(port))
      
      which is basicly the same as
      
      bond_for_each_slave(bond, slave, iter) {
      	port = &(SLAVE_AD_INFO(slave).port);
      
      but a more time consuming.
      
      Remove the function and convert the users to bond_for_each_slave().
      
      CC: Jay Vosburgh <fubar@us.ibm.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      Signed-off-by: NVeaceslav Falico <vfalico@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3c4c88a1
    • V
      bonding: verify if we still have slaves in bond_3ad_unbind_slave() · 74684493
      Veaceslav Falico 提交于
      After commit 1f718f0f ("bonding: populate
      neighbour's private on enslave"), we've moved the unlinking of the slave
      to the earliest position possible - so that nobody will see an
      half-uninited slave.
      
      However, bond_3ad_unbind_slave() relied that, even while removing the last
      slave, it is still accessible - via __get_first_agg() (and, eventually,
      bond_first_slave()).
      
      Fix that by verifying if the aggregator return is an actual aggregator, but
      not NULL.
      
      CC: Jay Vosburgh <fubar@us.ibm.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      Signed-off-by: NVeaceslav Falico <vfalico@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      74684493
    • V
      bonding: correctly verify for the first slave in bond_enslave · 23c147e0
      Veaceslav Falico 提交于
      After commit 1f718f0f ("bonding: populate
      neighbour's private on enslave"), we've moved the actual 'linking' in the
      end of the function - so that, once linked, the slave is ready to be used,
      and is not still in the process of enslaving.
      
      However, 802.3ad verified if it's the first slave by looking at the
      
      if (bond_first_slave(bond) == new_slave)
      
      which, because we've moved the linking to the end, became broken - on the
      first slave bond_first_slave(bond) returns NULL.
      
      Fix this by verifying if the prev_slave, that equals bond_last_slave(), is
      actually populated - if it is - then it's not the first slave, and vice
      versa.
      
      CC: Jay Vosburgh <fubar@us.ibm.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      Signed-off-by: NVeaceslav Falico <vfalico@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      23c147e0
  2. 27 9月, 2013 20 次提交
  3. 16 9月, 2013 1 次提交
  4. 12 9月, 2013 2 次提交
  5. 04 9月, 2013 7 次提交
  6. 30 8月, 2013 6 次提交