1. 03 6月, 2017 1 次提交
  2. 02 6月, 2017 5 次提交
  3. 01 6月, 2017 4 次提交
  4. 31 5月, 2017 4 次提交
  5. 28 5月, 2017 2 次提交
  6. 27 5月, 2017 1 次提交
  7. 26 5月, 2017 3 次提交
    • N
      bonding: Don't update slave->link until ready to commit · 797a9364
      Nithin Sujir 提交于
      In the loadbalance arp monitoring scheme, when a slave link change is
      detected, the slave->link is immediately updated and slave_state_changed
      is set. Later down the function, the rtnl_lock is acquired and the
      changes are committed, updating the bond link state.
      
      However, the acquisition of the rtnl_lock can fail. The next time the
      monitor runs, since slave->link is already updated, it determines that
      link is unchanged. This results in the bond link state permanently out
      of sync with the slave link.
      
      This patch modifies bond_loadbalance_arp_mon() to handle link changes
      identical to bond_ab_arp_{inspect/commit}(). The new link state is
      maintained in slave->new_link until we're ready to commit at which point
      it's copied into slave->link.
      
      NOTE: miimon_{inspect/commit}() has a more complex state machine
      requiring the use of the bond_{propose,commit}_link_state() functions
      which maintains the intermediate state in slave->link_new_state. The arp
      monitors don't require that.
      
      Testing: This bug is very easy to reproduce with the following steps.
      1. In a loop, toggle a slave link of a bond slave interface.
      2. In a separate loop, do ifconfig up/down of an unrelated interface to
      create contention for rtnl_lock.
      Within a few iterations, the bond link goes out of sync with the slave
      link.
      Signed-off-by: NNithin Nayak Sujir <nsujir@tintri.com>
      Cc: Mahesh Bandewar <maheshb@google.com>
      Cc: Jay Vosburgh <jay.vosburgh@canonical.com>
      Acked-by: NMahesh Bandewar <maheshb@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      797a9364
    • G
      net: fix potential null pointer dereference · 65d786c2
      Gustavo A. R. Silva 提交于
      Add null check to avoid a potential null pointer dereference.
      
      Addresses-Coverity-ID: 1408831
      Signed-off-by: NGustavo A. R. Silva <garsilva@embeddedor.com>
      Acked-by: NPablo Neira Ayuso <pablo@netfilter.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      65d786c2
    • E
      geneve: fix fill_info when using collect_metadata · 11387fe4
      Eric Garver 提交于
      Since 9b4437a5 ("geneve: Unify LWT and netdev handling.") fill_info
      does not return UDP_ZERO_CSUM6_RX when using COLLECT_METADATA. This is
      because it uses ip_tunnel_info_af() with the device level info, which is
      not valid for COLLECT_METADATA.
      
      Fix by checking for the presence of the actual sockets.
      
      Fixes: 9b4437a5 ("geneve: Unify LWT and netdev handling.")
      Signed-off-by: NEric Garver <e@erig.me>
      Acked-by: NPravin B Shelar <pshelar@ovn.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      11387fe4
  8. 25 5月, 2017 5 次提交
  9. 23 5月, 2017 11 次提交
    • O
      cdc-ether: divorce initialisation with a filter reset and a generic method · 7f65b1f5
      Oliver Neukum 提交于
      Some devices need their multicast filter reset but others are crashed by that.
      So the methods need to be separated.
      Signed-off-by: NOliver Neukum <oneukum@suse.com>
      Reported-by: N"Ridgway, Keith" <kridgway@harris.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7f65b1f5
    • T
      net/mlx5: Tolerate irq_set_affinity_hint() failures · b665d98e
      Tariq Toukan 提交于
      Add tolerance to failures of irq_set_affinity_hint().
      Its role is to give hints that optimizes performance,
      and should not block the driver load.
      
      In non-SMP systems, functionality is not available as
      there is a single core, and all these calls definitely
      fail.  Hence, do not call the function and avoid the
      warning prints.
      
      Fixes: db058a18 ("net/mlx5_core: Set irq affinity hints")
      Signed-off-by: NTariq Toukan <tariqt@mellanox.com>
      Cc: kernel-team@fb.com
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      b665d98e
    • M
      net/mlx5: Avoid using pending command interface slots · 73dd3a48
      Mohamad Haj Yahia 提交于
      Currently when firmware command gets stuck or it takes long time to
      complete, the driver command will get timeout and the command slot is
      freed and can be used for new commands, and if the firmware receive new
      command on the old busy slot its behavior is unexpected and this could
      be harmful.
      To fix this when the driver command gets timeout we return failure,
      but we don't free the command slot and we wait for the firmware to
      explicitly respond to that command.
      Once all the entries are busy we will stop processing new firmware
      commands.
      
      Fixes: 9cba4ebc ('net/mlx5: Fix potential deadlock in command mode change')
      Signed-off-by: NMohamad Haj Yahia <mohamad@mellanox.com>
      Cc: kernel-team@fb.com
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      73dd3a48
    • E
      net/mlx5e: IPoIB, handle RX packet correctly · b57fe691
      Erez Shitrit 提交于
      IPoIB packet contains the pseudo header area, we need to pull it prior
      to reset_mac_header in order to let the GRO work well.
      
      In more details:
      GRO checks the mac address of the new coming packet, it does that by
      comparing the hard_header_len size of the current packet to the previous
      one in that session, the comparison is over hard_header_len size.
      Now, the driver prepares that area in the skb by allocating area from the
      reserved part and resetting the correct mac header to it.
      
      Fixes: 9d6bd752 ("net/mlx5e: IPoIB, RX handler")
      Signed-off-by: NErez Shitrit <erezsh@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      b57fe691
    • O
      net/mlx5e: Fix warnings around parsing of TC pedit actions · e3ca4e05
      Or Gerlitz 提交于
      The sparse tool emits these correct complaints:
      
      drivers/net/ethernet/mellanox/mlx5/core//en_tc.c:1005:25: warning: cast to restricted __be32
      drivers/net/ethernet/mellanox/mlx5/core//en_tc.c:1007:25: warning: cast to restricted __be16
      
      The value is provided from user-space in network order, but there's
      no way for them to realize that, avoid the warnings by casting to the
      appropriate type.
      
      Fixes: d79b6df6 ('net/mlx5e: Add parsing of TC pedit actions to HW format')
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Reported-by: NLeon Romanovsky <leonro@mellanox.com>
      Reviewed-by: NPaul Blakey <paulb@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      e3ca4e05
    • O
      net/mlx5e: Properly enforce disallowing of partial field re-write offload · d824bf3f
      Or Gerlitz 提交于
      Currently we don't support partial header re-writes through TC pedit
      action offloading. However, the code that enforces that wasn't err-ing
      on cases where the first and last bits of the mask are set but there is
      some zero bit between them, such as in the below example, fix that!
      
      tc filter add dev enp1s0 protocol ip parent ffff: prio 10 flower
      	ip_proto udp dst_port 2001 skip_sw
      	action pedit munge ip src set 1.0.0.1 retain 0xff0000ff
      
      Fixes: d79b6df6 ('net/mlx5e: Add parsing of TC pedit actions to HW format')
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Reviewed-by: NPaul Blakey <paulb@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      d824bf3f
    • O
      net/mlx5e: Allow TC csum offload if applied together with pedit action · 26c02749
      Or Gerlitz 提交于
      When offloading header re-writes, the HW re-calculates the relevant L3/L4
      checksums. Hence, when upper layers (as done by OVS) ask for TC checksum action
      offload together with pedit offload, don't err. This command now works:
      
      tc filter add dev ens1f0 protocol ip parent ffff: prio 20 flower skip_sw
      	ip_proto tcp dst_port 9001
      	action pedit ex munge tcp dport set 0x1234 pipe
              action csum tcp
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Reported-by: NPaul Blakey <paulb@mellanox.com>
      Reviewed-by: NPaul Blakey <paulb@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      26c02749
    • O
      net/mlx5e: Use the correct delete call on offloaded TC encap entry detach · cdc5a7f3
      Or Gerlitz 提交于
      We wrongly direcly invoke hlist_del_rcu() and not hash_del_rcu() which
      does a slightly different call now and may change later, fix that.
      
      Fixes: a54e20b4 ('net/mlx5e: Add basic TC tunnel set action for SRIOV offloads')
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Reported-by: NPaul Blakey <paulb@mellanox.com>
      Reviewed-by: NPaul Blakey <paulb@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      cdc5a7f3
    • J
      bonding: fix randomly populated arp target array · 72ccc471
      Jarod Wilson 提交于
      In commit dc9c4d0f, the arp_target array moved from a static global
      to a local variable. By the nature of static globals, the array used to
      be initialized to all 0. At present, it's full of random data, which
      that gets interpreted as arp_target values, when none have actually been
      specified. Systems end up booting with spew along these lines:
      
      [   32.161783] IPv6: ADDRCONF(NETDEV_UP): lacp0: link is not ready
      [   32.168475] IPv6: ADDRCONF(NETDEV_UP): lacp0: link is not ready
      [   32.175089] 8021q: adding VLAN 0 to HW filter on device lacp0
      [   32.193091] IPv6: ADDRCONF(NETDEV_UP): lacp0: link is not ready
      [   32.204892] lacp0: Setting MII monitoring interval to 100
      [   32.211071] lacp0: Removing ARP target 216.124.228.17
      [   32.216824] lacp0: Removing ARP target 218.160.255.255
      [   32.222646] lacp0: Removing ARP target 185.170.136.184
      [   32.228496] lacp0: invalid ARP target 255.255.255.255 specified for removal
      [   32.236294] lacp0: option arp_ip_target: invalid value (-255.255.255.255)
      [   32.243987] lacp0: Removing ARP target 56.125.228.17
      [   32.249625] lacp0: Removing ARP target 218.160.255.255
      [   32.255432] lacp0: Removing ARP target 15.157.233.184
      [   32.261165] lacp0: invalid ARP target 255.255.255.255 specified for removal
      [   32.268939] lacp0: option arp_ip_target: invalid value (-255.255.255.255)
      [   32.276632] lacp0: Removing ARP target 16.0.0.0
      [   32.281755] lacp0: Removing ARP target 218.160.255.255
      [   32.287567] lacp0: Removing ARP target 72.125.228.17
      [   32.293165] lacp0: Removing ARP target 218.160.255.255
      [   32.298970] lacp0: Removing ARP target 8.125.228.17
      [   32.304458] lacp0: Removing ARP target 218.160.255.255
      
      None of these were actually specified as ARP targets, and the driver does
      seem to clean up the mess okay, but it's rather noisy and confusing, leaks
      values to userspace, and the 255.255.255.255 spew shows up even when debug
      prints are disabled.
      
      The fix: just zero out arp_target at init time.
      
      While we're in here, init arp_all_targets_value in the right place.
      
      Fixes: dc9c4d0f ("bonding: reduce scope of some global variables")
      CC: Mahesh Bandewar <maheshb@google.com>
      CC: Jay Vosburgh <j.vosburgh@gmail.com>
      CC: Veaceslav Falico <vfalico@gmail.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      CC: netdev@vger.kernel.org
      CC: stable@vger.kernel.org
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Acked-by: NAndy Gospodarek <andy@greyhouse.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      72ccc471
    • J
      bonding: fix accounting of active ports in 3ad · 751da2a6
      Jarod Wilson 提交于
      As of 7bb11dc9 and 0622cab0, bond slaves in a 3ad bond are not
      removed from the aggregator when they are down, and the active slave count
      is NOT equal to number of ports in the aggregator, but rather the number
      of ports in the aggregator that are still enabled. The sysfs spew for
      bonding_show_ad_num_ports() has a comment that says "Show number of active
      802.3ad ports.", but it's currently showing total number of ports, both
      active and inactive. Remedy it by using the same logic introduced in
      0622cab0 in __bond_3ad_get_active_agg_info(), so sysfs, procfs and
      netlink all report the number of active ports. Note that this means that
      IFLA_BOND_AD_INFO_NUM_PORTS really means NUM_ACTIVE_PORTS instead of
      NUM_PORTS, and thus perhaps should be renamed for clarity.
      
      Lightly tested on a dual i40e lacp bond, simulating link downs with an ip
      link set dev <slave2> down, was able to produce the state where I could
      see both in the same aggregator, but a number of ports count of 1.
      
      MII Status: up
      Active Aggregator Info:
              Aggregator ID: 1
              Number of ports: 2 <---
      Slave Interface: ens10
      MII Status: up <---
      Aggregator ID: 1
      Slave Interface: ens11
      MII Status: up
      Aggregator ID: 1
      
      MII Status: up
      Active Aggregator Info:
              Aggregator ID: 1
              Number of ports: 1 <---
      Slave Interface: ens10
      MII Status: down <---
      Aggregator ID: 1
      Slave Interface: ens11
      MII Status: up
      Aggregator ID: 1
      
      CC: Jay Vosburgh <j.vosburgh@gmail.com>
      CC: Veaceslav Falico <vfalico@gmail.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      CC: netdev@vger.kernel.org
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      751da2a6
    • A
      net: atheros: atl2: don't return zero on failure path in atl2_probe() · bd703a15
      Alexey Khoroshilov 提交于
      If dma mask checks fail in atl2_probe(), it breaks off initialization,
      deallocates all resources, but returns zero.
      
      The patch adds proper error code return value and
      make error code setup unified.
      
      Found by Linux Driver Verification project (linuxtesting.org).
      Signed-off-by: NAlexey Khoroshilov <khoroshilov@ispras.ru>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bd703a15
  10. 22 5月, 2017 1 次提交
  11. 18 5月, 2017 3 次提交