13 Oct, 2018

1 commit

  • commit f394ad28feffbeebab77c8bf9a203bd49b957c9a upstream.

    Currently, rds_ib_conn_alloc() calls rds_ib_recv_alloc_caches()
    without passing along the gfp_t flag. But rds_ib_recv_alloc_caches()
    and rds_ib_recv_alloc_cache() should take a gfp_t parameter so that
    rds_ib_recv_alloc_cache() can call alloc_percpu_gfp() using the
    correct flag instead of calling alloc_percpu().

    Signed-off-by: Ka-Cheong Poon
    Acked-by: Santosh Shilimkar
    Signed-off-by: David S. Miller
    Cc: Håkon Bugge
    Signed-off-by: Greg Kroah-Hartman

    Ka-Cheong Poon
     

21 Jun, 2018

1 commit

  • [ Upstream commit 91a825290ca4eae88603bc811bf74a45f94a3f46 ]

    The function rds_ib_setup_qp is calling rds_ib_get_client_data and
    should correspondingly call rds_ib_dev_put. This call was lost in
    the non-error path with the introduction of error handling done in
    commit 3b12f73a5c29 ("rds: ib: add error handle")

    Signed-off-by: Dag Moxnes
    Reviewed-by: Håkon Bugge
    Acked-by: Santosh Shilimkar
    Signed-off-by: David S. Miller
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Dag Moxnes
     

16 Mar, 2017

1 commit


14 Mar, 2017

1 commit

  • When rdma_accept fails, rdma_reject is called in it. As such, it is
    not necessary to execute rdma_reject again.

    Cc: Joe Jin
    Cc: Junxiao Bi
    Acked-by: Santosh Shilimkar
    Signed-off-by: Zhu Yanjun
    Signed-off-by: David S. Miller

    Zhu Yanjun
     

10 Mar, 2017

1 commit

  • In the function rds_ib_setup_qp, the error handle is missing. When some
    error occurs, it is possible that memory leak occurs. As such, error
    handle is added.

    Cc: Joe Jin
    Reviewed-by: Junxiao Bi
    Reviewed-by: Guanglei Li
    Signed-off-by: Zhu Yanjun
    Acked-by: Santosh Shilimkar
    Signed-off-by: David S. Miller

    Zhu Yanjun
     

03 Jan, 2017

5 commits


02 Jul, 2016

2 commits


30 Jun, 2016

1 commit


19 Jun, 2016

1 commit

  • Fix coding style issues in the following files:

    ib_cm.c: add space
    loop.c: convert spaces to tabs
    sysctl.c: add space
    tcp.h: convert spaces to tabs
    tcp_connect.c:remove extra indentation in switch statement
    tcp_recv.c: convert spaces to tabs
    tcp_send.c: convert spaces to tabs
    transport.c: move brace up one line on for statement

    Signed-off-by: Joshua Houghton
    Acked-by: Santosh Shilimkar
    Signed-off-by: David S. Miller

    Joshua Houghton
     

15 Jun, 2016

2 commits

  • Pass a struct rds_conn_path to rds_send_xmit so that MP capable
    transports can transmit packets on something other than c_path[0].
    The eventual goal for MP capable transports is to hash the rds
    socket to a path based on the bound local address/port, and use
    this path as the argument to rds_send_xmit()

    Signed-off-by: Sowmini Varadhan
    Signed-off-by: David S. Miller

    Sowmini Varadhan
     
  • In preparation for multipath RDS, split the rds_connection
    structure into a base structure, and a per-path struct rds_conn_path.
    The base structure tracks information and locks common to all
    paths. The workqs for send/recv/shutdown etc are tracked per
    rds_conn_path. Thus the workq callbacks now work with rds_conn_path.

    This commit allows for one rds_conn_path per rds_connection, and will
    be extended into multiple conn_paths in subsequent commits.

    Signed-off-by: Sowmini Varadhan
    Signed-off-by: David S. Miller

    Sowmini Varadhan
     

17 Apr, 2016

1 commit

  • dp->dp_ack_seq is used in big endian format. We need to do the
    big endianness conversion when we assign a value in host format
    to it.

    Signed-off-by: Qing Huang
    Signed-off-by: Santosh Shilimkar
    Signed-off-by: David S. Miller

    Qing Huang
     

03 Mar, 2016

3 commits


08 Nov, 2015

1 commit

  • Pull rdma updates from Doug Ledford:
    "This is my initial round of 4.4 merge window patches. There are a few
    other things I wish to get in for 4.4 that aren't in this pull, as
    this represents what has gone through merge/build/run testing and not
    what is the last few items for which testing is not yet complete.

    - "Checksum offload support in user space" enablement
    - Misc cxgb4 fixes, add T6 support
    - Misc usnic fixes
    - 32 bit build warning fixes
    - Misc ocrdma fixes
    - Multicast loopback prevention extension
    - Extend the GID cache to store and return attributes of GIDs
    - Misc iSER updates
    - iSER clustering update
    - Network NameSpace support for rdma CM
    - Work Request cleanup series
    - New Memory Registration API"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (76 commits)
    IB/core, cma: Make __attribute_const__ declarations sparse-friendly
    IB/core: Remove old fast registration API
    IB/ipath: Remove fast registration from the code
    IB/hfi1: Remove fast registration from the code
    RDMA/nes: Remove old FRWR API
    IB/qib: Remove old FRWR API
    iw_cxgb4: Remove old FRWR API
    RDMA/cxgb3: Remove old FRWR API
    RDMA/ocrdma: Remove old FRWR API
    IB/mlx4: Remove old FRWR API support
    IB/mlx5: Remove old FRWR API support
    IB/srp: Dont allocate a page vector when using fast_reg
    IB/srp: Remove srp_finish_mapping
    IB/srp: Convert to new registration API
    IB/srp: Split srp_map_sg
    RDS/IW: Convert to new memory registration API
    svcrdma: Port to new memory registration API
    xprtrdma: Port to new memory registration API
    iser-target: Port to new memory registration API
    IB/iser: Port to new fast registration API
    ...

    Linus Torvalds
     

29 Oct, 2015

1 commit

  • Add support for network namespaces in the ib_cma module. This is
    accomplished by:

    1. Adding network namespace parameter for rdma_create_id. This parameter is
    used to populate the network namespace field in rdma_id_private.
    rdma_create_id keeps a reference on the network namespace.
    2. Using the network namespace from the rdma_id instead of init_net inside
    of ib_cma, when listening on an ID and when looking for an ID for an
    incoming request.
    3. Decrementing the reference count for the appropriate network namespace
    when calling rdma_destroy_id.

    In order to preserve the current behavior init_net is passed when calling
    from other modules.

    Signed-off-by: Guy Shapiro
    Signed-off-by: Haggai Eran
    Signed-off-by: Yotam Kenneth
    Signed-off-by: Shachar Raindel
    Signed-off-by: Doug Ledford

    Guy Shapiro
     

06 Oct, 2015

3 commits

  • Just in case we are still handling the QP receive completion while the
    rds_ibdev is released, drop the connection instead of crashing the kernel.

    Signed-off-by: Santosh Shilimkar
    Signed-off-by: Santosh Shilimkar

    Santosh Shilimkar
     
  • Similar to what we did with receive CQ completion handling, we split
    the transmit completion handler so that it lets us implement batched
    work completion handling.

    We re-use the cq_poll routine and makes use of RDS_IB_SEND_OP to
    identify the send vs receive completion event handler invocation.

    Signed-off-by: Santosh Shilimkar
    Signed-off-by: Santosh Shilimkar

    Santosh Shilimkar
     
  • For better performance, we split the receive completion IRQ handler. That
    lets us acknowledge several WCE events in one call. We also limit the WC
    to max 32 to avoid latency. Acknowledging several completions in one call
    instead of several calls each time will provide better performance since
    less mutual exclusion locks are being performed.

    In next patch, send completion is also split which re-uses the poll_cq()
    and hence the code is moved to ib_cm.c

    Signed-off-by: Santosh Shilimkar
    Signed-off-by: Santosh Shilimkar

    Santosh Shilimkar
     

09 Sep, 2015

1 commit

  • Pull inifiniband/rdma updates from Doug Ledford:
    "This is a fairly sizeable set of changes. I've put them through a
    decent amount of testing prior to sending the pull request due to
    that.

    There are still a few fixups that I know are coming, but I wanted to
    go ahead and get the big, sizable chunk into your hands sooner rather
    than waiting for those last few fixups.

    Of note is the fact that this creates what is intended to be a
    temporary area in the drivers/staging tree specifically for some
    cleanups and additions that are coming for the RDMA stack. We
    deprecated two drivers (ipath and amso1100) and are waiting to hear
    back if we can deprecate another one (ehca). We also put Intel's new
    hfi1 driver into this area because it needs to be refactored and a
    transfer library created out of the factored out code, and then it and
    the qib driver and the soft-roce driver should all be modified to use
    that library.

    I expect drivers/staging/rdma to be around for three or four kernel
    releases and then to go away as all of the work is completed and final
    deletions of deprecated drivers are done.

    Summary of changes for 4.3:

    - Create drivers/staging/rdma
    - Move amso1100 driver to staging/rdma and schedule for deletion
    - Move ipath driver to staging/rdma and schedule for deletion
    - Add hfi1 driver to staging/rdma and set TODO for move to regular
    tree
    - Initial support for namespaces to be used on RDMA devices
    - Add RoCE GID table handling to the RDMA core caching code
    - Infrastructure to support handling of devices with differing read
    and write scatter gather capabilities
    - Various iSER updates
    - Kill off unsafe usage of global mr registrations
    - Update SRP driver
    - Misc mlx4 driver updates
    - Support for the mr_alloc verb
    - Support for a netlink interface between kernel and user space cache
    daemon to speed path record queries and route resolution
    - Ininitial support for safe hot removal of verbs devices"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (136 commits)
    IB/ipoib: Suppress warning for send only join failures
    IB/ipoib: Clean up send-only multicast joins
    IB/srp: Fix possible protection fault
    IB/core: Move SM class defines from ib_mad.h to ib_smi.h
    IB/core: Remove unnecessary defines from ib_mad.h
    IB/hfi1: Add PSM2 user space header to header_install
    IB/hfi1: Add CSRs for CONFIG_SDMA_VERBOSITY
    mlx5: Fix incorrect wc pkey_index assignment for GSI messages
    IB/mlx5: avoid destroying a NULL mr in reg_user_mr error flow
    IB/uverbs: reject invalid or unknown opcodes
    IB/cxgb4: Fix if statement in pick_local_ip6adddrs
    IB/sa: Fix rdma netlink message flags
    IB/ucma: HW Device hot-removal support
    IB/mlx4_ib: Disassociate support
    IB/uverbs: Enable device removal when there are active user space applications
    IB/uverbs: Explicitly pass ib_dev to uverbs commands
    IB/uverbs: Fix race between ib_uverbs_open and remove_one
    IB/uverbs: Fix reference counting usage of event files
    IB/core: Make ib_dealloc_pd return void
    IB/srp: Create an insecure all physical rkey only if needed
    ...

    Linus Torvalds
     

31 Aug, 2015

1 commit


26 Aug, 2015

3 commits

  • During connection resets, we are destroying the rdma id too soon. We can't
    destroy it when it is still in use. So lets move rdma_destroy_id() after
    we clear the rings.

    Reviewed-by: Ajaykumar Hotchandani
    Signed-off-by: Santosh Shilimkar
    Signed-off-by: Santosh Shilimkar
    Signed-off-by: David S. Miller

    Santosh Shilimkar
     
  • If we get an ENOMEM during rds_ib_recv_refill, we might never come
    back and refill again later. Patch makes sure to kick krdsd into
    helping out.

    To achieve this we add RDS_RECV_REFILL flag and update in the refill
    path based on that so that at least some therad will keep posting
    receive buffers.

    Since krdsd and softirq both might race for refill, we decide to
    schedule on work queue based on ring_low instead of ring_empty.

    Reviewed-by: Ajaykumar Hotchandani
    Signed-off-by: Santosh Shilimkar
    Signed-off-by: Santosh Shilimkar
    Signed-off-by: David S. Miller

    santosh.shilimkar@oracle.com
     
  • Destroy ib state early during shutdown. Otherwise we can get callbacks
    after the QP isn't really able to handle them.

    Reviewed-by: Ajaykumar Hotchandani
    Signed-off-by: Santosh Shilimkar
    Signed-off-by: Santosh Shilimkar
    Signed-off-by: David S. Miller

    santosh.shilimkar@oracle.com
     

08 Aug, 2015

1 commit


13 Jun, 2015

1 commit


19 May, 2015

1 commit


05 May, 2015

1 commit

  • c0adf54a109 introduced new sparse warnings:
    CHECK /home/dahern/kernels/linux.git/net/rds/ib_cm.c
    net/rds/ib_cm.c:191:34: warning: incorrect type in initializer (different base types)
    net/rds/ib_cm.c:191:34: expected unsigned long long [unsigned] [usertype] dp_ack_seq
    net/rds/ib_cm.c:191:34: got restricted __be64
    net/rds/ib_cm.c:194:51: warning: cast to restricted __be64

    The temporary variable for sequence number should have been declared as __be64
    rather than u64. Make it so.

    Signed-off-by: David Ahern
    Cc: shamir rabinovitch
    Signed-off-by: David S. Miller

    David Ahern
     

04 May, 2015

1 commit

  • rdma_conn_param private data is copied using memcpy after headers such
    as cma_hdr (see cma_resolve_ib_udp as example). so the start of the
    private data is aligned to the end of the structure that come before. if
    this structure end with u32 the meaning is that the start of the private
    data will be 4 bytes aligned. structures that use u8/u16/u32/u64 are
    naturally aligned but in case the structure start is not 8 bytes aligned,
    all u64 members of this structure will not be aligned. to solve this issue
    we must use special macros that allow unaligned access to those
    unaligned members.

    Addresses the following kernel log seen when attempting to use RDMA:

    Kernel unaligned access at TPC[10507a88] rds_ib_cm_connect_complete+0x1bc/0x1e0 [rds_rdma]

    Acked-by: Chien Yen
    Signed-off-by: shamir rabinovitch
    [Minor tweaks for top of tree by:]
    Signed-off-by: David Ahern
    Signed-off-by: David S. Miller

    shamir rabinovitch
     

27 Dec, 2012

1 commit


23 Mar, 2012

1 commit

  • We should be using the gfp flags the caller specified here, instead of
    GFP_KERNEL. I think this might be a bugfix, depending on the value of
    "sock->sk->sk_allocation" when we call rds_conn_create_outgoing() in
    rds_sendmsg(). Otherwise, it's just a cleanup.

    Signed-off-by: Dan Carpenter
    Acked-by: Venkat Venkatsubra
    Signed-off-by: David S. Miller

    Dan Carpenter
     

15 Sep, 2011

1 commit


17 Jun, 2011

1 commit


26 May, 2011

1 commit

  • The RDMA CM currently infers the QP type from the port space selected
    by the user. In the future (eg with RDMA_PS_IB or XRC), there may not
    be a 1-1 correspondence between port space and QP type. For netlink
    export of RDMA CM state, we want to export the QP type to userspace,
    so it is cleaner to explicitly associate a QP type to an ID.

    Modify rdma_create_id() to allow the user to specify the QP type, and
    use it to make our selections of datagram versus connected mode.

    Signed-off-by: Sean Hefty
    Signed-off-by: Roland Dreier

    Sean Hefty