1. 22 4月, 2016 2 次提交
  2. 20 4月, 2016 2 次提交
  3. 21 3月, 2016 1 次提交
  4. 19 3月, 2016 1 次提交
  5. 18 3月, 2016 1 次提交
    • J
      mm: introduce page reference manipulation functions · fe896d18
      Joonsoo Kim 提交于
      The success of CMA allocation largely depends on the success of
      migration and key factor of it is page reference count.  Until now, page
      reference is manipulated by direct calling atomic functions so we cannot
      follow up who and where manipulate it.  Then, it is hard to find actual
      reason of CMA allocation failure.  CMA allocation should be guaranteed
      to succeed so finding offending place is really important.
      
      In this patch, call sites where page reference is manipulated are
      converted to introduced wrapper function.  This is preparation step to
      add tracepoint to each page reference manipulation function.  With this
      facility, we can easily find reason of CMA allocation failure.  There is
      no functional change in this patch.
      
      In addition, this patch also converts reference read sites.  It will
      help a second step that renames page._count to something else and
      prevents later attempt to direct access to it (Suggested by Andrew).
      Signed-off-by: NJoonsoo Kim <iamjoonsoo.kim@lge.com>
      Acked-by: NMichal Nazarewicz <mina86@mina86.com>
      Acked-by: NVlastimil Babka <vbabka@suse.cz>
      Cc: Minchan Kim <minchan@kernel.org>
      Cc: Mel Gorman <mgorman@techsingularity.net>
      Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
      Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fe896d18
  6. 15 3月, 2016 1 次提交
    • A
      mlx4: add missing braces in verify_qp_parameters · baefd701
      Arnd Bergmann 提交于
      The implementation of QP paravirtualization back in linux-3.7 included
      some code that looks very dubious, and gcc-6 has grown smart enough
      to warn about it:
      
      drivers/net/ethernet/mellanox/mlx4/resource_tracker.c: In function 'verify_qp_parameters':
      drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:3154:5: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation]
           if (optpar & MLX4_QP_OPTPAR_ALT_ADDR_PATH) {
           ^~
      drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:3144:4: note: ...this 'if' clause, but it is not
          if (slave != mlx4_master_func_num(dev))
      
      >From looking at the context, I'm reasonably sure that the indentation
      is correct but that it should have contained curly braces from the
      start, as the update_gid() function in the same patch correctly does.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: 54679e14 ("mlx4: Implement QP paravirtualization and maintain phys_pkey_cache for smp_snoop")
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      baefd701
  7. 14 3月, 2016 1 次提交
    • J
      mlx4: use napi_consume_skb API to get bulk free operations · b4a53379
      Jesper Dangaard Brouer 提交于
      Bulk free of SKBs happen transparently by the API call napi_consume_skb().
      The napi budget parameter is usually needed by napi_consume_skb()
      to detect if called from netpoll.  In this patch it has an extra meaning.
      
      For mlx4 driver, the mlx4_en_stop_port() call is done outside
      NAPI/softirq context, and cleanup the entire TX ring via
      mlx4_en_free_tx_buf().  The code mlx4_en_free_tx_desc() for
      freeing SKBs are shared with NAPI calls.
      
      To handle this shared use the zero budget indication is reused,
      and handled appropriately in napi_consume_skb(). To reflect this,
      variable is called napi_mode for the function call that needed
      this distinction.
      Signed-off-by: NJesper Dangaard Brouer <brouer@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b4a53379
  8. 04 3月, 2016 2 次提交
    • A
      net: mellanox: add DEVLINK dependencies · 3d1cbe83
      Arnd Bergmann 提交于
      The new NET_DEVLINK infrastructure can be a loadable module, but the drivers
      using it might be built-in, which causes link errors like:
      
      drivers/net/built-in.o: In function `mlx4_load_one':
      :(.text+0x2fbfda): undefined reference to `devlink_port_register'
      :(.text+0x2fc084): undefined reference to `devlink_port_unregister'
      drivers/net/built-in.o: In function `mlxsw_sx_port_remove':
      :(.text+0x33a03a): undefined reference to `devlink_port_type_clear'
      :(.text+0x33a04e): undefined reference to `devlink_port_unregister'
      
      There are multiple ways to avoid this:
      
      a) add 'depends on NET_DEVLINK || !NET_DEVLINK' dependencies
         for each user
      b) use 'select NET_DEVLINK' from each driver that uses it
         and hide the symbol in Kconfig.
      c) make NET_DEVLINK a 'bool' option so we don't have to
         list it as a dependency, and rely on the APIs to be
         stubbed out when it is disabled
      d) use IS_REACHABLE() rather than IS_ENABLED() to check for
         NET_DEVLINK in include/net/devlink.h
      
      This implements a variation of approach a) by adding an
      intermediate symbol that drivers can depend on, and changes
      the three drivers using it.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: 09d4d087 ("mlx4: Implement devlink interface")
      Fixes: c4745500 ("mlxsw: Implement devlink interface")
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3d1cbe83
    • J
      net: relax setup_tc ndo op handle restriction · 5eb4dce3
      John Fastabend 提交于
      I added this check in setup_tc to multiple drivers,
      
       if (handle != TC_H_ROOT || tc->type != TC_SETUP_MQPRIO)
      
      Unfortunately restricting to TC_H_ROOT like this breaks the old
      instantiation of mqprio to setup a hardware qdisc. This patch
      relaxes the test to only check the type to make it equivalent
      to the check before I broke it. With this the old instantiation
      continues to work.
      
      A good smoke test is to setup mqprio with,
      
      # tc qdisc add dev eth4 root mqprio num_tc 8 \
        map 0 1 2 3 4 5 6 7 \
        queues 0@0 1@1 2@2 3@3 4@4 5@5 6@6 7@7
      
      Fixes: e4c6734e ("net: rework ndo tc op to consume additional qdisc handle paramete")
      Reported-by: NSingh Krishneil <krishneil.k.singh@intel.com>
      Reported-by: NJake Keller <jacob.e.keller@intel.com>
      CC: Murali Karicheri <m-karicheri2@ti.com>
      CC: Shradha Shah <sshah@solarflare.com>
      CC: Or Gerlitz <ogerlitz@mellanox.com>
      CC: Ariel Elior <ariel.elior@qlogic.com>
      CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
      CC: Bruce Allan <bruce.w.allan@intel.com>
      CC: Jesse Brandeburg <jesse.brandeburg@intel.com>
      CC: Don Skidmore <donald.c.skidmore@intel.com>
      Signed-off-by: NJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5eb4dce3
  9. 03 3月, 2016 3 次提交
    • J
      net/mlx4_core: Allow resetting VF admin mac to zero · 6e522422
      Jack Morgenstein 提交于
      The VF administrative mac addresses (stored in the PF driver) are
      initialized to zero when the PF driver starts up.
      
      These addresses may be modified in the PF driver through ndo calls
      initiated by iproute2 or libvirt.
      
      While we allow the PF/host to change the VF admin mac address from zero
      to a valid unicast mac, we do not allow restoring the VF admin mac to
      zero. We currently only allow changing this mac to a different unicast mac.
      
      This leads to problems when libvirt scripts are used to deal with
      VF mac addresses, and libvirt attempts to revoke the mac so this
      host will not use it anymore.
      
      Fix this by allowing resetting a VF administrative MAC back to zero.
      
      Fixes: 8f7ba3ca ('net/mlx4: Add set VF mac address support')
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Reported-by: NMoshe Levi <moshele@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6e522422
    • M
      net/mlx4_core: Check the correct limitation on VFs for HA mode · 00ada910
      Moni Shoua 提交于
      The limit of 63 is only for virtual functions while the actual enforcement
      was for VFs plus physical functions, fix that.
      
      Fixes: e57968a1 ('net/mlx4_core: Support the HA mode for SRIOV VFs too')
      Signed-off-by: NMoni Shoua <monis@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      00ada910
    • J
      net/mlx4_core: Fix lockdep warning in handling of mac/vlan tables · 03a79f31
      Jack Morgenstein 提交于
      In the mac and vlan register/unregister/replace functions, the driver locks
      the mac table mutex (or vlan table mutex) on both ports.
      
      We move to use mutex_lock_nested() to prevent warnings, such as the one below.
      
      [ 101.828445] =============================================
      [ 101.834820] [ INFO: possible recursive locking detected ]
      [ 101.841199] 4.5.0-rc2+  #49 Not tainted
      [ 101.850251] ---------------------------------------------
      [ 101.856621] modprobe/3054 is trying to acquire lock:
      [ 101.862514] (&table->mutex#2){+.+.+.}, at: [<ffffffffa079c10e>] __mlx4_register_mac+0x87e/0xa90 [mlx4_core]
      [ 101.874598]
      [ 101.874598] but task is already holding lock:
      [ 101.881703] (&table->mutex#2){+.+.+.}, at: [<ffffffffa079c0f0>] __mlx4_register_mac+0x860/0xa90 [mlx4_core]
      [ 101.893776]
      [ 101.893776] other info that might help us debug this:
      [ 101.901658] Possible unsafe locking scenario:
      [ 101.901658]
      [ 101.908859] CPU0
      [ 101.911923] ----
      [ 101.914985] lock(&table->mutex#2);
      [ 101.919595] lock(&table->mutex#2);
      [ 101.924199]
      [ 101.924199] * DEADLOCK *
      [ 101.924199]
      [ 101.931643] May be due to missing lock nesting notation
      
      Fixes: 5f61385d ('net/mlx4_core: Keep VLAN/MAC tables mirrored in multifunc HA mode')
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Suggested-by: NDoron Tsur <doront@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      03a79f31
  10. 02 3月, 2016 2 次提交
  11. 01 3月, 2016 1 次提交
    • M
      IB/mlx4: Add support for the don't trap rule · 0e451e88
      Marina Varshaver 提交于
      Add support for receiving multicast/unicast traffic with
      the don't trap rule.
      
      Sniffing these packets requires a flow steering rule of type NORMAL
      at priority 0 with flag IB_FLOW_ATTR_FLAGS_DONT_TRAP set.
      Choosing between multicast or unicast is done via ethernet L2 dest_mac
      mask and value:
      - If mask is all zeros - unicast and multicast are set.
      - If mask non zero - only mask with multicast bit 1 and rest 0 is
                           supported, the mac value will choose if it is
                           multicast or unicast rule.
      
      If the mask multicast bit is on and some other bits are on too, it means
      a request for specific multicast or unicast, this is not supported,
      either receive all multicast or all unicast.
      
      Only when limitations are met registered QP will receive requested type
      but other QPs can receive same traffic if registered for it.
      Otherwise, if limitations are not met, an error will be returned.
      
      Limitations:
      - Rule must be with priority 0.
      - A0 mode is not supported.
      - Sniffer QP cannot appear in any other flow steering rule.
      Signed-off-by: NMarina Varshaver <marinav@mellanox.com>
      Reviewed-by: NMatan Barak <matanb@mellanox.com>
      Reviewed-by: NYishai Hadas <yishaih@mellanox.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      0e451e88
  12. 26 2月, 2016 1 次提交
  13. 17 2月, 2016 8 次提交
  14. 12 2月, 2016 1 次提交
  15. 20 1月, 2016 4 次提交
  16. 19 12月, 2015 2 次提交
  17. 16 12月, 2015 1 次提交
  18. 09 12月, 2015 1 次提交
  19. 07 12月, 2015 5 次提交