1. 18 10月, 2013 2 次提交
  2. 09 10月, 2013 1 次提交
  3. 04 10月, 2013 1 次提交
    • N
      bonding: modify the old and add new xmit hash policies · 32819dc1
      Nikolay Aleksandrov 提交于
      This patch adds two new hash policy modes which use skb_flow_dissect:
      3 - Encapsulated layer 2+3
      4 - Encapsulated layer 3+4
      There should be a good improvement for tunnel users in those modes.
      It also changes the old hash functions to:
      hash ^= (__force u32)flow.dst ^ (__force u32)flow.src;
      hash ^= (hash >> 16);
      hash ^= (hash >> 8);
      
      Where hash will be initialized either to L2 hash, that is
      SRCMAC[5] XOR DSTMAC[5], or to flow->ports which should be extracted
      from the upper layer. Flow's dst and src are also extracted based on the
      xmit policy either directly from the buffer or by using skb_flow_dissect,
      but in both cases if the protocol is IPv6 then dst and src are obtained by
      ipv6_addr_hash() on the real addresses. In case of a non-dissectable
      packet, the algorithms fall back to L2 hashing.
      The bond_set_mode_ops() function is now obsolete and thus deleted
      because it was used only to set the proper hash policy. Also we trim a
      pointer from struct bonding because we no longer need to keep the hash
      function, now there's only a single hash function - bond_xmit_hash that
      works based on bond->params.xmit_policy.
      
      The hash function and skb_flow_dissect were suggested by Eric Dumazet.
      The layer names were suggested by Andy Gospodarek, because I suck at
      semantics.
      Signed-off-by: NNikolay Aleksandrov <nikolay@redhat.com>
      Acked-by: NEric Dumazet <edumazet@google.com>
      Acked-by: NVeaceslav Falico <vfalico@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      32819dc1
  4. 01 10月, 2013 3 次提交
    • V
      bonding: RCUify bond_set_rx_mode() · b3241870
      Veaceslav Falico 提交于
      Currently we rely on rtnl locking in bond_set_rx_mode(), however it's not
      always the case:
      
      RTNL: assertion failed at drivers/net/bonding/bond_main.c (3391)
      ...
       [<ffffffff81651ca5>] dump_stack+0x54/0x74
       [<ffffffffa029e717>] bond_set_rx_mode+0xc7/0xd0 [bonding]
       [<ffffffff81553af7>] __dev_set_rx_mode+0x57/0xa0
       [<ffffffff81557ff8>] __dev_mc_add+0x58/0x70
       [<ffffffff81558020>] dev_mc_add+0x10/0x20
       [<ffffffff8161e26e>] igmp6_group_added+0x18e/0x1d0
       [<ffffffff81186f76>] ? kmem_cache_alloc_trace+0x236/0x260
       [<ffffffff8161f80f>] ipv6_dev_mc_inc+0x29f/0x320
       [<ffffffff8161f9e7>] ipv6_sock_mc_join+0x157/0x260
      ...
      
      Fix this by using RCU primitives.
      Reported-by: NJoe Lawrence <joe.lawrence@stratus.com>
      Tested-by: NJoe Lawrence <joe.lawrence@stratus.com>
      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>
      b3241870
    • N
      bonding: Fix broken promiscuity reference counting issue · 5a0068de
      Neil Horman 提交于
      Recently grabbed this report:
      https://bugzilla.redhat.com/show_bug.cgi?id=1005567
      
      Of an issue in which the bonding driver, with an attached vlan encountered the
      following errors when bond0 was taken down and back up:
      
      dummy1: promiscuity touches roof, set promiscuity failed. promiscuity feature of
      device might be broken.
      
      The error occurs because, during __bond_release_one, if we release our last
      slave, we take on a random mac address and issue a NETDEV_CHANGEADDR
      notification.  With an attached vlan, the vlan may see that the vlan and bond
      mac address were in sync, but no longer are.  This triggers a call to dev_uc_add
      and dev_set_rx_mode, which enables IFF_PROMISC on the bond device.  Then, when
      we complete __bond_release_one, we use the current state of the bond flags to
      determine if we should decrement the promiscuity of the releasing slave.  But
      since the bond changed promiscuity state during the release operation, we
      incorrectly decrement the slave promisc count when it wasn't in promiscuous mode
      to begin with, causing the above error
      
      Fix is pretty simple, just cache the bonding flags at the start of the function
      and use those when determining the need to set promiscuity.
      
      This is also needed for the ALLMULTI flag
      
      CC: Jay Vosburgh <fubar@us.ibm.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      CC: Mark Wu <wudxw@linux.vnet.ibm.com>
      CC: "David S. Miller" <davem@davemloft.net>
      Reported-by: NMark Wu <wudxw@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5a0068de
    • V
      bonding: trivial: remove forgotten bond_next_vlan() · 90de527d
      Veaceslav Falico 提交于
      It's a forgotten function declaration, which was removed some time ago
      already.
      
      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>
      90de527d
  5. 29 9月, 2013 11 次提交
  6. 27 9月, 2013 20 次提交
  7. 16 9月, 2013 1 次提交
  8. 12 9月, 2013 1 次提交