25 Dec, 2016

1 commit


24 Dec, 2016

1 commit

  • Pull rdma fixes from Doug Ledford:
    "First round of -rc fixes for 4.10 kernel:

    - a series of qedr fixes
    - a series of rxe fixes
    - one i40iw fix
    - one cma fix
    - one cxgb4 fix"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma:
    IB/rxe: Don't check for null ptr in send()
    IB/rxe: Drop future atomic/read packets rather than retrying
    IB/rxe: Use BTH_PSN_MASK when ACKing duplicate sends
    qedr: Always notify the verb consumer of flushed CQEs
    qedr: clear the vendor error field in the work completion
    qedr: post_send/recv according to QP state
    qedr: ignore inline flag in read verbs
    qedr: modify QP state to error when destroying it
    qedr: return correct value on modify qp
    qedr: return error if destroy CQ failed
    qedr: configure the number of CQEs on CQ creation
    i40iw: Set 128B as the only supported RQ WQE size
    IB/cma: Fix a race condition in iboe_addr_get_sgid()
    IB/rxe: Fix a memory leak in rxe_qp_cleanup()
    iw_cxgb4: set correct FetchBurstMax for QPs

    Linus Torvalds
     

23 Dec, 2016

12 commits


19 Dec, 2016

2 commits

  • A socket is associated with every QP by the rxe driver but sock_release()
    is never called. Add a call to sock_release() in rxe_qp_cleanup().

    Fixes: commit 8700e3e7c48A5 ("Add Soft RoCE driver")
    Signed-off-by: Bart Van Assche
    Cc: Moni Shoua
    Cc: Kamal Heib
    Cc: Amir Vadai
    Cc: Haggai Eran
    Cc:
    Reviewed-by: Moni Shoua
    Signed-off-by: Doug Ledford

    Bart Van Assche
     
  • The current QP FetchBurstMax value is 256B, which
    is incorrect since a WR can exceed that value. The
    result being a partial WR fetched by hardware, and
    a fatal "bad WR" error posted by the SGE.

    So bump the FetchBurstMax to 512B.

    Signed-off-by: Steve Wise
    Signed-off-by: Doug Ledford

    Steve Wise
     

16 Dec, 2016

2 commits

  • Get rid of this warning:

    drivers/infiniband/sw/rdmavt/cq.c: In function ‘rvt_cq_exit’:
    drivers/infiniband/sw/rdmavt/cq.c:542:2: warning: ‘worker’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    kthread_destroy_worker(worker);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    by fixing the function to actually work.

    Fixes: 6efaf10f163d ("IB/rdmavt: Avoid queuing work into a destroyed cq kthread worker")
    Cc: Petr Mladek
    Cc: Doug Ledford
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • Pull rdma updates from Doug Ledford:
    "This is the complete update for the rdma stack for this release cycle.

    Most of it is typical driver and core updates, but there is the
    entirely new VMWare pvrdma driver. You may have noticed that there
    were changes in DaveM's pull request to the bnxt Ethernet driver to
    support a RoCE RDMA driver. The bnxt_re driver was tentatively set to
    be pulled in this release cycle, but it simply wasn't ready in time
    and was dropped (a few review comments still to address, and some
    multi-arch build issues like prefetch() not working across all
    arches).

    Summary:

    - shared mlx5 updates with net stack (will drop out on merge if
    Dave's tree has already been merged)

    - driver updates: cxgb4, hfi1, hns-roce, i40iw, mlx4, mlx5, qedr, rxe

    - debug cleanups

    - new connection rejection helpers

    - SRP updates

    - various misc fixes

    - new paravirt driver from vmware"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (210 commits)
    IB: Add vmw_pvrdma driver
    IB/mlx4: fix improper return value
    IB/ocrdma: fix bad initialization
    infiniband: nes: return value of skb_linearize should be handled
    MAINTAINERS: Update Intel RDMA RNIC driver maintainers
    MAINTAINERS: Remove Mitesh Ahuja from emulex maintainers
    IB/core: fix unmap_sg argument
    qede: fix general protection fault may occur on probe
    IB/mthca: Replace pci_pool_alloc by pci_pool_zalloc
    mlx5, calc_sq_size(): Make a debug message more informative
    mlx5: Remove a set-but-not-used variable
    mlx5: Use { } instead of { 0 } to init struct
    IB/srp: Make writing the add_target sysfs attr interruptible
    IB/srp: Make mapping failures easier to debug
    IB/srp: Make login failures easier to debug
    IB/srp: Introduce a local variable in srp_add_one()
    IB/srp: Fix CONFIG_DYNAMIC_DEBUG=n build
    IB/multicast: Check ib_find_pkey() return value
    IPoIB: Avoid reading an uninitialized member variable
    IB/mad: Fix an array index check
    ...

    Linus Torvalds
     

15 Dec, 2016

22 commits

  • Patch series "mm: unexport __get_user_pages_unlocked()".

    This patch series continues the cleanup of get_user_pages*() functions
    taking advantage of the fact we can now pass gup_flags as we please.

    It firstly adds an additional 'locked' parameter to
    get_user_pages_remote() to allow for its callers to utilise
    VM_FAULT_RETRY functionality. This is necessary as the invocation of
    __get_user_pages_unlocked() in process_vm_rw_single_vec() makes use of
    this and no other existing higher level function would allow it to do
    so.

    Secondly existing callers of __get_user_pages_unlocked() are replaced
    with the appropriate higher-level replacement -
    get_user_pages_unlocked() if the current task and memory descriptor are
    referenced, or get_user_pages_remote() if other task/memory descriptors
    are referenced (having acquiring mmap_sem.)

    This patch (of 2):

    Add a int *locked parameter to get_user_pages_remote() to allow
    VM_FAULT_RETRY faulting behaviour similar to get_user_pages_[un]locked().

    Taking into account the previous adjustments to get_user_pages*()
    functions allowing for the passing of gup_flags, we are now in a
    position where __get_user_pages_unlocked() need only be exported for his
    ability to allow VM_FAULT_RETRY behaviour, this adjustment allows us to
    subsequently unexport __get_user_pages_unlocked() as well as allowing
    for future flexibility in the use of get_user_pages_remote().

    [sfr@canb.auug.org.au: merge fix for get_user_pages_remote API change]
    Link: http://lkml.kernel.org/r/20161122210511.024ec341@canb.auug.org.au
    Link: http://lkml.kernel.org/r/20161027095141.2569-2-lstoakes@gmail.com
    Signed-off-by: Lorenzo Stoakes
    Acked-by: Michal Hocko
    Cc: Jan Kara
    Cc: Hugh Dickins
    Cc: Dave Hansen
    Cc: Rik van Riel
    Cc: Mel Gorman
    Cc: Paolo Bonzini
    Cc: Radim Krcmar
    Signed-off-by: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Lorenzo Stoakes
     
  • Doug Ledford
     
  • This patch series adds a driver for a paravirtual RDMA device. The
    device is developed for VMware's Virtual Machines and allows existing RDMA
    applications to continue to use existing Verbs API when deployed in VMs
    on ESXi. We recently did a presentation in the OFA Workshop [1] regarding
    this device.

    Description and RDMA Support
    ============================
    The virtual device is exposed as a dual function PCIe device. One part
    is a virtual network device (VMXNet3) which provides networking properties
    like MAC, IP addresses to the RDMA part of the device. The networking
    properties are used to register GIDs required by RDMA applications to
    communicate.

    These patches add support and the all required infrastructure for
    letting applications use such a device. We support the mandatory Verbs API as
    well as the base memory management extensions (Local Inv, Send with Inv and
    Fast Register Work Requests). We currently support both Reliable Connected
    and Unreliable Datagram QPs but do not support Shared Receive Queues
    (SRQs).

    Also, we support the following types of Work Requests:
    o Send/Receive (with or without Immediate Data)
    o RDMA Write (with or without Immediate Data)
    o RDMA Read
    o Local Invalidate
    o Send with Invalidate
    o Fast Register Work Requests

    This version only adds support for version 1 of RoCE. We will add RoCEv2
    support in a future patch. We do support registration of both MAC-based
    and IP-based GIDs. I have also created a git tree for our user-level driver
    [2].

    Testing
    =======
    We have tested this internally for various types of Guest OS - Red Hat,
    Centos, Ubuntu 12.04/14.04/16.04, Oracle Enterprise Linux, SLES 12
    using backported versions of this driver. The tests included several
    runs of the performance tests (included with OFED), Intel MPI PingPong
    benchmark on OpenMPI, krping for FRWRs. Mellanox has been kind enough
    to test the backported version of the driver internally on their hardware
    using a VMware provided ESX build. I have also applied and tested this
    with Doug's k.o/for-4.9 branch (commit 5603910b). Note, that this patch
    series should be applied all together. I split out the commits so that
    it may be easier to review.

    PVRDMA Resources
    ================
    [1] OFA Workshop Presentation -
    https://openfabrics.org/images/eventpresos/2016presentations/102parardma.pdf

    [2] Libpvrdma User-level library -
    http://git.openfabrics.org/?p=~aditr/libpvrdma.git;a=summary

    Reviewed-by: Jorgen Hansen
    Reviewed-by: George Zhang
    Reviewed-by: Aditya Sarwade
    Reviewed-by: Bryan Tan
    Reviewed-by: Leon Romanovsky
    Signed-off-by: Adit Ranadive
    Signed-off-by: Doug Ledford

    Adit Ranadive
     
  • Doug Ledford
     
  • Doug Ledford
     
  • Doug Ledford
     
  • Doug Ledford
     
  • If uhw->inlen is non-zero, the value of variable err is 0 if the copy
    succeeds. Then, if kzalloc() or kmalloc() returns a NULL pointer, it
    will return 0 to the callers. As a result, the callers cannot detect the
    errors. This patch fixes the bug, assign "-ENOMEM" to err before the
    NULL pointer checks, and remove the initialization of err at the
    beginning.

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=189031
    Signed-off-by: Pan Bian
    Reviewed-by: Leon Romanovsky
    Signed-off-by: Doug Ledford

    Pan Bian
     
  • In function ocrdma_mbx_create_ah_tbl(), returns the value of status on
    errors. However, because status is initialized with 0, 0 will be
    returned even if on error paths. This patch initialize status with
    "-ENOMEM".

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188831

    Signed-off-by: Pan Bian
    Reviewed-by: Leon Romanovsky
    Signed-off-by: Doug Ledford

    Pan Bian
     
  • Return value of skb_linearize should be handled in function
    nes_netdev_start_xmit.

    Compiled in x86_64
    Signed-off-by: Zhouyi Zhou
    Reviewed-by: Yuval Shaia
    Reviewed-by: Eric Dumazet
    Signed-off-by: Doug Ledford

    Zhouyi Zhou
     
  • __ib_umem_release calls dma_unmap_sg with a different number of
    sg_entries than ib_umem_get uses for dma_map_sg. This might cause
    trouble for implementations that merge sglist entries and results
    in the following dma debug complaint:

    DMA-API: device driver frees DMA sg list with different entry
    count [map count=2] [unmap count=1]

    Fix it by using the correct value.

    Signed-off-by: Sebastian Ott
    Signed-off-by: Doug Ledford

    Sebastian Ott
     
  • In mthca_create_ah(), pci_pool_alloc() followed by memset will be
    replaced by pci_pool_zalloc()

    Signed-off-by: Souptick joarder
    Reviewed-by: Yuval Shaia
    Signed-off-by: Doug Ledford

    Souptick Joarder
     
  • Make it clear that qp->sq.wqe_cnt is not the number of WQEs.

    Signed-off-by: Bart Van Assche
    Cc: Eli Cohen
    Acked-by: Leon Romanovsky
    Signed-off-by: Doug Ledford

    Bart Van Assche
     
  • This has been detected by building the mlx5 driver with W=1.

    Fixes: 1a412fb1caa2 ('net/mlx5: Fixes: 1a412fb1caa2 (IB/mlx5: Modify QP
    commands via mlx5 ifc')
    Signed-off-by: Bart Van Assche
    Cc: Eli Cohen
    Acked-by: Leon Romanovsky
    Signed-off-by: Doug Ledford

    Bart Van Assche
     
  • Detected by sparse.

    Signed-off-by: Bart Van Assche
    Cc: Eli Cohen
    Signed-off-by: Doug Ledford

    Bart Van Assche
     
  • Avoid that shutdown of srp_daemon is delayed if add_target_mutex is
    held by another process.

    Signed-off-by: Bart Van Assche
    Signed-off-by: Doug Ledford

    Bart Van Assche
     
  • Make it easier to figure out what is going on if memory mapping
    fails because more memory regions than mr_per_cmd are needed.

    Signed-off-by: Bart Van Assche
    Signed-off-by: Doug Ledford

    Bart Van Assche
     
  • If login fails because memory region allocation failed it can be
    hard to figure out what happened. Make it easier to figure out
    why login failed by logging a message if ib_alloc_mr() fails.

    Signed-off-by: Bart Van Assche
    Signed-off-by: Doug Ledford

    Bart Van Assche
     
  • This patch makes the srp_add_one() code more compact and does not
    change any functionality.

    Signed-off-by: Bart Van Assche
    Signed-off-by: Doug Ledford

    Bart Van Assche
     
  • Avoid that the kernel build fails as follows if dynamic debug support
    is disabled:

    drivers/infiniband/ulp/srp/ib_srp.c:2272:3: error: implicit declaration of function 'DEFINE_DYNAMIC_DEBUG_METADATA'
    drivers/infiniband/ulp/srp/ib_srp.c:2272:33: error: 'ddm' undeclared (first use in this function)
    drivers/infiniband/ulp/srp/ib_srp.c:2275:39: error: '_DPRINTK_FLAGS_PRINT' undeclared (first use in this function)

    Signed-off-by: Bart Van Assche
    Signed-off-by: Doug Ledford

    Bart Van Assche
     
  • This patch avoids that Coverity complains about not checking the
    ib_find_pkey() return value.

    Fixes: commit 547af76521b3 ("IB/multicast: Report errors on multicast groups if P_key changes")
    Signed-off-by: Bart Van Assche
    Cc: Sean Hefty
    Cc:
    Signed-off-by: Doug Ledford

    Bart Van Assche
     
  • This patch avoids that Coverity reports the following:

    Using uninitialized value port_attr.state when calling printk

    Fixes: commit 94232d9ce817 ("IPoIB: Start multicast join process only on active ports")
    Signed-off-by: Bart Van Assche
    Cc: Erez Shitrit
    Cc:
    Reviewed-by: Leon Romanovsky
    Signed-off-by: Doug Ledford

    Bart Van Assche