1. 31 8月, 2015 3 次提交
    • Y
      IB/core: Find the network device matching connection parameters · 9268f72d
      Yotam Kenneth 提交于
      In the case of IPoIB, and maybe in other cases, the network device is
      managed by an upper-layer protocol (ULP). In order to expose this
      network device to other users of the IB device, let ULPs implement
      a callback that returns network device according to connection parameters.
      
      The IB device and port, together with the P_Key and the GID should
      be enough to uniquely identify the ULP net device. However, in current
      kernels there can be multiple IPoIB interfaces created with the same GID.
      Furthermore, such configuration may be desireable to support ipvlan-like
      configurations for RDMA CM with IPoIB.  To resolve the device in these
      cases the code will also take the IP address as an additional input.
      Reviewed-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com>
      Signed-off-by: NHaggai Eran <haggaie@mellanox.com>
      Signed-off-by: NYotam Kenneth <yotamke@mellanox.com>
      Signed-off-by: NShachar Raindel <raindel@mellanox.com>
      Signed-off-by: NGuy Shapiro <guysh@mellanox.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      9268f72d
    • H
      IB/core: lock client data with lists_rwsem · 7c1eb45a
      Haggai Eran 提交于
      An ib_client callback that is called with the lists_rwsem locked only for
      read is protected from changes to the IB client lists, but not from
      ib_unregister_device() freeing its client data. This is because
      ib_unregister_device() will remove the device from the device list with
      lists_rwsem locked for write, but perform the rest of the cleanup,
      including the call to remove() without that lock.
      
      Mark client data that is undergoing de-registration with a new going_down
      flag in the client data context. Lock the client data list with lists_rwsem
      for write in addition to using the spinlock, so that functions calling the
      callback would be able to lock only lists_rwsem for read and let callbacks
      sleep.
      
      Since ib_unregister_client() now marks the client data context, no need for
      remove() to search the context again, so pass the client data directly to
      remove() callbacks.
      Reviewed-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com>
      Signed-off-by: NHaggai Eran <haggaie@mellanox.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      7c1eb45a
    • H
      IB/core: Add rwsem to allow reading device list or client list · 5aa44bb9
      Haggai Eran 提交于
      Currently the RDMA subsystem's device list and client list are protected by
      a single mutex. This prevents adding user-facing APIs that iterate these
      lists, since using them may cause a deadlock. The patch attempts to solve
      this problem by adding a read-write semaphore to protect the lists. Readers
      now don't need the mutex, and are safe just by read-locking the semaphore.
      
      The ib_register_device, ib_register_client, ib_unregister_device, and
      ib_unregister_client functions are modified to lock the semaphore for write
      during their respective list modification. Also, in order to make sure
      client callbacks are called only between add() and remove() calls, the code
      is changed to only add items to the lists after the add() calls and remove
      from the lists before the remove() calls.
      
      This patch attempts to solve a similar need [1] that was seen in the RoCE
      v2 patch series.
      
      [1] http://www.spinics.net/lists/linux-rdma/msg24733.htmlReviewed-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com>
      Cc: Matan Barak <matanb@mellanox.com>
      Signed-off-by: NHaggai Eran <haggaie@mellanox.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      5aa44bb9
  2. 29 8月, 2015 14 次提交
  3. 28 7月, 2015 1 次提交
  4. 25 7月, 2015 1 次提交
    • N
      iser-target: Fix REJECT CM event use-after-free OOPs · ce9a9fc2
      Nicholas Bellinger 提交于
      This patch fixes a bug in iser-target code where the REJECT CM event
      handler code currently performs a isert_put_conn() for the final
      isert_conn->kref put, while iscsi_np process context is still blocked
      in isert_get_login_rx().
      
      Once isert_get_login_rx() is awoking due to login timeout, iscsi_np
      process context will attempt to invoke iscsi_target_login_sess_out()
      to cleanup iscsi_conn as expected, and calls isert_wait_conn() +
      isert_free_conn() which triggers the use-after-free OOPs.
      
      To address this bug, move the kref_get_unless_zero() call from
      isert_connected_handler() into isert_connect_request() immediately
      preceeding isert_rdma_accept() to ensure the CM handler cleanup
      paths and isert_free_conn() are always operating with two refs.
      
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: <stable@vger.kernel.org> # v3.10+
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      ce9a9fc2
  5. 24 7月, 2015 4 次提交
    • D
      RDMA/ocrdma: update ocrdma module license string · b8f5595e
      Devesh Sharma 提交于
      Change module_license from "GPL" to "Dual BSD/GPL"
      
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Duan Jiong <duanj.fnst@cn.fujitsu.com>
      Cc: Roland Dreier <roland@purestorage.com>
      Cc: Jes Sorensen <Jes.Sorensen@redhat.com>
      Cc: Sasha Levin <levinsasha928@gmail.com>
      Cc: Dan Carpenter <dan.carpenter@oracle.com>
      Cc: Prarit Bhargava <prarit@redhat.com>
      Cc: Colin Ian King <colin.king@canonical.com>
      Cc: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
      Cc: Moni Shoua <monis@mellanox.com>
      Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      Cc: Li RongQing <roy.qing.li@gmail.com>
      Cc: Devendra Naga <devendra.aaru@gmail.com>
      Signed-off-by: NDevesh Sharma <devesh.sharma@avagotech.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      b8f5595e
    • D
      RDMA/ocrdma: update ocrdma license to dual-license · 71ee6730
      Devesh Sharma 提交于
      Change of license from GPLv2 to dual-license (GPLv2 and BSD 2-Clause)
      
      All contributors were contacted off-list and permission to make this
      change was received.  The complete list of contributors are Cc:ed here.
      
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Duan Jiong <duanj.fnst@cn.fujitsu.com>
      Cc: Roland Dreier <roland@purestorage.com>
      Cc: Jes Sorensen <Jes.Sorensen@redhat.com>
      Cc: Sasha Levin <levinsasha928@gmail.com>
      Cc: Dan Carpenter <dan.carpenter@oracle.com>
      Cc: Prarit Bhargava <prarit@redhat.com>
      Cc: Colin Ian King <colin.king@canonical.com>
      Cc: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
      Cc: Moni Shoua <monis@mellanox.com>
      Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      Cc: Li RongQing <roy.qing.li@gmail.com>
      Cc: Devendra Naga <devendra.aaru@gmail.com>
      Signed-off-by: NDevesh Sharma <devesh.sharma@avagotech.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      71ee6730
    • J
      IB/ipoib: Fix CONFIG_INFINIBAND_IPOIB_CM · efc1eedb
      Jason Gunthorpe 提交于
      If the above is turned off then ipoib_cm_dev_init unconditionally
      returns ENOSYS, and the newly added error handling in
      0b3957 prevents ipoib from coming up at all:
      
      kernel: mlx4_0: ipoib_transport_dev_init failed
      kernel: mlx4_0: failed to initialize port 1 (ret = -12)
      
      Fixes: 0b39578b (IB/ipoib: Use dedicated workqueues per interface)
      Signed-off-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      efc1eedb
    • S
      RDMA/cxgb3: fail get_dma_mr on 64 bit arches · 49fa63d8
      Steve Wise 提交于
      T3 HW only supports 32 bit MRs.  If the system uses 64 bit memory
      addresses, then a registered 32 bit MR will wrap and write to the
      wrong memory when used with addresses > 4GB.  To prevent this,
      simply fail to allocate an MR on 64 bit machines (other means
      of registering memory are still available and software can still
      work, we just don't allow this means of memory registration).
      Signed-off-by: NSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      49fa63d8
  6. 21 7月, 2015 1 次提交
  7. 15 7月, 2015 16 次提交
    • J
      IB/core: Destroy ocrdma_dev_id IDR on module exit · d8b2ba7c
      Johannes Thumshirn 提交于
      Destroy ocrdma_dev_id IDR on module exit, reclaiming the allocated memory.
      
      This was detected by the following semantic patch (written by Luis Rodriguez
      <mcgrof@suse.com>)
      <SmPL>
      @ defines_module_init @
      declarer name module_init, module_exit;
      declarer name DEFINE_IDR;
      identifier init;
      @@
      
      module_init(init);
      
      @ defines_module_exit @
      identifier exit;
      @@
      
      module_exit(exit);
      
      @ declares_idr depends on defines_module_init && defines_module_exit @
      identifier idr;
      @@
      
      DEFINE_IDR(idr);
      
      @ on_exit_calls_destroy depends on declares_idr && defines_module_exit @
      identifier declares_idr.idr, defines_module_exit.exit;
      @@
      
      exit(void)
      {
       ...
       idr_destroy(&idr);
       ...
      }
      
      @ missing_module_idr_destroy depends on declares_idr && defines_module_exit && !on_exit_calls_destroy @
      identifier declares_idr.idr, defines_module_exit.exit;
      @@
      
      exit(void)
      {
       ...
       +idr_destroy(&idr);
       }
      
      </SmPL>
      Signed-off-by: NJohannes Thumshirn <jthumshirn@suse.de>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      d8b2ba7c
    • J
      IB/core: Destroy multcast_idr on module exit · 45d25420
      Johannes Thumshirn 提交于
      Destroy multcast_idr on module exit, reclaiming the allocated memory.
      
      This was detected by the following semantic patch (written by Luis Rodriguez
      <mcgrof@suse.com>)
      <SmPL>
      @ defines_module_init @
      declarer name module_init, module_exit;
      declarer name DEFINE_IDR;
      identifier init;
      @@
      
      module_init(init);
      
      @ defines_module_exit @
      identifier exit;
      @@
      
      module_exit(exit);
      
      @ declares_idr depends on defines_module_init && defines_module_exit @
      identifier idr;
      @@
      
      DEFINE_IDR(idr);
      
      @ on_exit_calls_destroy depends on declares_idr && defines_module_exit @
      identifier declares_idr.idr, defines_module_exit.exit;
      @@
      
      exit(void)
      {
       ...
       idr_destroy(&idr);
       ...
      }
      
      @ missing_module_idr_destroy depends on declares_idr && defines_module_exit && !on_exit_calls_destroy @
      identifier declares_idr.idr, defines_module_exit.exit;
      @@
      
      exit(void)
      {
       ...
       +idr_destroy(&idr);
      }
      
      </SmPL>
      Signed-off-by: NJohannes Thumshirn <jthumshirn@suse.de>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      45d25420
    • D
      IB/mlx4: Optimize do_slave_init · d9a047ae
      Doug Ledford 提交于
      There is little chance our memory allocation will fail, so we can
      combine initializing the work structs with allocating them instead of
      looping through all of them once to allocate and again to initialize.
      Then when we need to actually find out if our device is up or in the
      process of going down, have all of our work structs batched up, take the
      spin_lock once and only once, and do all of the batch under the one
      spin_lock invocation instead of incurring all of the locked memory cycles
      we would otherwise incur to take/release the spin_lock over and over
      again.
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      d9a047ae
    • D
      IB/mlx4: Fix memory leak in do_slave_init · 9bbf282d
      Doug Ledford 提交于
      We create a number of work structs to be queued up to a workqueue, and
      on completion of the workqueue handler, the workqueue handler frees the
      allocated memory.  If, however, we don't queue the work struct because
      the device is going down, then we need to free the memory ourselves.
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      9bbf282d
    • M
      IB/mlx4: Optimize freeing of items on error unwind · a39a98ff
      Maninder Singh 提交于
      On failure, we loop through all possible pointers and test them before
      calling kfree.  But really, why even attempt to free items we didn't
      allocate when we can easily loop through exactly and only the devices
      for which the original memory allocation succeeded and free just those.
      Signed-off-by: NManinder Singh <maninder1.s@samsung.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      a39a98ff
    • O
      IB/mlx4: Fix use of flow-counters for process_mad · 43bfb972
      Or Gerlitz 提交于
      For IB links, reading HCA flow counters through iboe_process_mad() should
      be used when mlx4_ib_process_mad() is invoked only for VFs PMA queries and
      exactly nothing else.
      
      Fixes: 7193a141 ('IB/mlx4: Set VF to read from QP counters')
      Reported-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      43bfb972
    • V
      IB/ipath: Convert use of __constant_<foo> to <foo> · cb1ff431
      Vaishali Thakkar 提交于
      In little endian cases, the macros be16_to_cpu and cpu_to_be64
      unfolds to __swab{16,64} which provides special case for constants.
      In big endian cases, __constant_be16_to_cpu and be16_to_cpu
      expand directly to the same expression. The same applies for
      __constant_cpu_to_be64 and cpu_to_be64.
      
      So, replace __constant_be16_to_cpu with be16_to_cpu and
      __constant_cpu_to_be64 with cpu_to_be64, with the goal of getting
      rid of the definition of __constant_be16_to_cpu and
      __constant_cpu_to_be64 completely.
      Signed-off-by: NVaishali Thakkar <vthakkar1994@gmail.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      cb1ff431
    • E
      IB/ipoib: Set MTU to max allowed by mode when mode changes · edcd2a74
      Erez Shitrit 提交于
      When switching between modes (datagram / connected) change the MTU
      accordingly.
      datagram mode up to 4K, connected mode up to (64K - 0x10).
      Signed-off-by: NELi Cohen <eli@mellanox.com>
      Signed-off-by: NErez Shitrit <erezsh@mellanox.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      edcd2a74
    • Y
      IB/ipoib: Scatter-Gather support in connected mode · c4268778
      Yuval Shaia 提交于
      By default, IPoIB-CM driver uses 64k MTU. Larger MTU gives better
      performance.
      This MTU plus overhead puts the memory allocation for IP based packets at
      32 4k pages (order 5), which have to be contiguous.
      When the system memory under pressure, it was observed that allocating 128k
      contiguous physical memory is difficult and causes serious errors (such as
      system becomes unusable).
      
      This enhancement resolve the issue by removing the physically contiguous
      memory requirement using Scatter/Gather feature that exists in Linux stack.
      
      With this fix Scatter-Gather will be supported also in connected mode.
      
      This change reverts some of the change made in commit e112373f
      ("IPoIB/cm: Reduce connected mode TX object size").
      
      The ability to use SG in IPoIB CM is possible because the coupling
      between NETIF_F_SG and NETIF_F_CSUM was removed in commit
      ec5f0615 ("net: Kill link between CSUM and SG features.")
      Signed-off-by: NYuval Shaia <yuval.shaia@oracle.com>
      Acked-by: NChristian Marie <christian@ponies.io>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      c4268778
    • C
      IB/ucm: Fix bitmap wrap when devnum > IB_UCM_MAX_DEVICES · 59d40dd9
      Carol L Soto 提交于
      ib_ucm_release_dev clears the wrong bit if devnum is greater
      than IB_UCM_MAX_DEVICES.
      Signed-off-by: NCarol L Soto <clsoto@linux.vnet.ibm.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      59d40dd9
    • H
      IB/ipoib: Prevent lockdep warning in __ipoib_ib_dev_flush · 8b7cce0d
      Haggai Eran 提交于
      __ipoib_ib_dev_flush calls itself recursively on child devices, and lockdep
      complains about locking vlan_rwsem twice (see below). Use down_read_nested
      instead of down_read to prevent the warning.
      
       =============================================
       [ INFO: possible recursive locking detected ]
       4.1.0-rc4+ #36 Tainted: G           O
       ---------------------------------------------
       kworker/u20:2/261 is trying to acquire lock:
        (&priv->vlan_rwsem){.+.+..}, at: [<ffffffffa0791e2a>] __ipoib_ib_dev_flush+0x3a/0x2b0 [ib_ipoib]
      
       but task is already holding lock:
        (&priv->vlan_rwsem){.+.+..}, at: [<ffffffffa0791e2a>] __ipoib_ib_dev_flush+0x3a/0x2b0 [ib_ipoib]
      
       other info that might help us debug this:
        Possible unsafe locking scenario:
      
              CPU0
              ----
         lock(&priv->vlan_rwsem);
         lock(&priv->vlan_rwsem);
      
        *** DEADLOCK ***
      
        May be due to missing lock nesting notation
      
       3 locks held by kworker/u20:2/261:
        #0:  ("%s""ipoib_flush"){.+.+..}, at: [<ffffffff810827cc>] process_one_work+0x15c/0x760
        #1:  ((&priv->flush_heavy)){+.+...}, at: [<ffffffff810827cc>] process_one_work+0x15c/0x760
        #2:  (&priv->vlan_rwsem){.+.+..}, at: [<ffffffffa0791e2a>] __ipoib_ib_dev_flush+0x3a/0x2b0 [ib_ipoib]
      
       stack backtrace:
       CPU: 3 PID: 261 Comm: kworker/u20:2 Tainted: G           O    4.1.0-rc4+ #36
       Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2007
       Workqueue: ipoib_flush ipoib_ib_dev_flush_heavy [ib_ipoib]
        ffff8801c6c54790 ffff8801c9927af8 ffffffff81665238 0000000000000001
        ffffffff825b5b30 ffff8801c9927bd8 ffffffff810bba51 ffff880100000000
        ffffffff00000001 ffff880100000001 ffff8801c6c55428 ffff8801c6c54790
       Call Trace:
        [<ffffffff81665238>] dump_stack+0x4f/0x6f
        [<ffffffff810bba51>] __lock_acquire+0x741/0x1820
        [<ffffffff810bcbf8>] lock_acquire+0xc8/0x240
        [<ffffffffa0791e2a>] ? __ipoib_ib_dev_flush+0x3a/0x2b0 [ib_ipoib]
        [<ffffffff81669d2c>] down_read+0x4c/0x70
        [<ffffffffa0791e2a>] ? __ipoib_ib_dev_flush+0x3a/0x2b0 [ib_ipoib]
        [<ffffffffa0791e2a>] __ipoib_ib_dev_flush+0x3a/0x2b0 [ib_ipoib]
        [<ffffffffa0791e4a>] __ipoib_ib_dev_flush+0x5a/0x2b0 [ib_ipoib]
        [<ffffffffa07920ba>] ipoib_ib_dev_flush_heavy+0x1a/0x20 [ib_ipoib]
        [<ffffffff81082871>] process_one_work+0x201/0x760
        [<ffffffff810827cc>] ? process_one_work+0x15c/0x760
        [<ffffffff81082ef0>] worker_thread+0x120/0x4d0
        [<ffffffff81082dd0>] ? process_one_work+0x760/0x760
        [<ffffffff81082dd0>] ? process_one_work+0x760/0x760
        [<ffffffff81088b7e>] kthread+0xfe/0x120
        [<ffffffff81088a80>] ? __init_kthread_worker+0x70/0x70
        [<ffffffff8166c6e2>] ret_from_fork+0x42/0x70
        [<ffffffff81088a80>] ? __init_kthread_worker+0x70/0x70
      Signed-off-by: NHaggai Eran <haggaie@mellanox.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      8b7cce0d
    • H
      IB/ucma: Fix lockdep warning in ucma_lock_files · 31b57b87
      Haggai Eran 提交于
      The ucma_lock_files() locks the mut mutex on two files, e.g. for migrating
      an ID. Use mutex_lock_nested() to prevent the warning below.
      
       =============================================
       [ INFO: possible recursive locking detected ]
       4.1.0-rc6-hmm+ #40 Tainted: G           O
       ---------------------------------------------
       pingpong_rpc_se/10260 is trying to acquire lock:
        (&file->mut){+.+.+.}, at: [<ffffffffa047ac55>] ucma_migrate_id+0xc5/0x248 [rdma_ucm]
      
       but task is already holding lock:
        (&file->mut){+.+.+.}, at: [<ffffffffa047ac4b>] ucma_migrate_id+0xbb/0x248 [rdma_ucm]
      
       other info that might help us debug this:
        Possible unsafe locking scenario:
      
              CPU0
              ----
         lock(&file->mut);
         lock(&file->mut);
      
        *** DEADLOCK ***
      
        May be due to missing lock nesting notation
      
       1 lock held by pingpong_rpc_se/10260:
        #0:  (&file->mut){+.+.+.}, at: [<ffffffffa047ac4b>] ucma_migrate_id+0xbb/0x248 [rdma_ucm]
      
       stack backtrace:
       CPU: 0 PID: 10260 Comm: pingpong_rpc_se Tainted: G           O    4.1.0-rc6-hmm+ #40
       Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2007
        ffff8801f85b63d0 ffff880195677b58 ffffffff81668f49 0000000000000001
        ffffffff825cbbe0 ffff880195677c38 ffffffff810bb991 ffff880100000000
        ffff880100000000 ffff880100000001 ffff8801f85b7010 ffffffff8121bee9
       Call Trace:
        [<ffffffff81668f49>] dump_stack+0x4f/0x6e
        [<ffffffff810bb991>] __lock_acquire+0x741/0x1820
        [<ffffffff8121bee9>] ? dput+0x29/0x320
        [<ffffffff810bcb38>] lock_acquire+0xc8/0x240
        [<ffffffffa047ac55>] ? ucma_migrate_id+0xc5/0x248 [rdma_ucm]
        [<ffffffff8166b901>] ? mutex_lock_nested+0x291/0x3e0
        [<ffffffff8166b6d5>] mutex_lock_nested+0x65/0x3e0
        [<ffffffffa047ac55>] ? ucma_migrate_id+0xc5/0x248 [rdma_ucm]
        [<ffffffff810baeed>] ? trace_hardirqs_on+0xd/0x10
        [<ffffffff8166b66e>] ? mutex_unlock+0xe/0x10
        [<ffffffffa047ac55>] ucma_migrate_id+0xc5/0x248 [rdma_ucm]
        [<ffffffffa0478474>] ucma_write+0xa4/0xb0 [rdma_ucm]
        [<ffffffff81200674>] __vfs_write+0x34/0x100
        [<ffffffff8112427c>] ? __audit_syscall_entry+0xac/0x110
        [<ffffffff810ec055>] ? current_kernel_time+0xc5/0xe0
        [<ffffffff812aa4d3>] ? security_file_permission+0x23/0x90
        [<ffffffff8120088d>] ? rw_verify_area+0x5d/0xe0
        [<ffffffff812009bb>] vfs_write+0xab/0x120
        [<ffffffff81201519>] SyS_write+0x59/0xd0
        [<ffffffff8112427c>] ? __audit_syscall_entry+0xac/0x110
        [<ffffffff8166ffee>] system_call_fastpath+0x12/0x76
      Signed-off-by: NHaggai Eran <haggaie@mellanox.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      31b57b87
    • T
      RDMA/nes: Fix for incorrect recording of the MAC address · 0a691272
      Tatyana Nikolova 提交于
      Fix for incorrect recording of the MAC address
      Signed-off-by: NTatyana Nikolova <Tatyana.E.Nikolova@intel.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      0a691272
    • T
      RDMA/nes: Fix for resolving the neigh · 165d6822
      Tatyana Nikolova 提交于
      Neighbor resolution doesn't work without this fix
      Signed-off-by: NTatyana Nikolova <Tatyana.E.Nikolova@intel.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      165d6822
    • T
      RDMA/core: Fixes for port mapper client registration · a7f2f24c
      Tatyana Nikolova 提交于
      Fixes to allow clients to make remove mapping requests, after
      they have provided the user space service with the mapping
      information, they are using when the service is restarted.
      
      1) Adding IWPM_REG_VALID, IWPM_REG_INCOMPL and IWPM_REG_UNDEF
         registration types for the port mapper clients and functions
         to set/check the registration type.
      2) If the port mapper user space service is not available to register
         the client, then its registration stays IWPM_REG_UNDEF and the
         registration isn't checked until the service becomes available
         (no mappings are possible, if the user space service isn't running).
      3) After the service is restarted, the user space port mapper pid is set
         to valid and the client registration is set to IWPM_REG_INCOMPL
         to allow the client to make remove mapping requests.
      Signed-off-by: NTatyana Nikolova <Tatyana.E.Nikolova@intel.com>
      Reviewed-by: NSteve Wise <swise@opengridcomputing.com>
      Tested-by: NSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      a7f2f24c
    • A
      IB/IPoIB: Fix bad error flow in ipoib_add_port() · 58e9cc90
      Amir Vadai 提交于
      Error values of ib_query_port() and ib_query_device() weren't propagated
      correctly. Because of that, ipoib_add_port() could return NULL value,
      which escaped the IS_ERR() check in ipoib_add_one() and we crashed.
      Signed-off-by: NAmir Vadai <amirv@mellanox.com>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Reviewed-by: NIra Weiny <ira.weiny@intel.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      58e9cc90