21 Jun, 2013

21 commits

  • Allow the rdma_ucm to query the IB service ID formed or allocated by
    the rdma_cm by exporting the cma_get_service_id() functionality.

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

    Sean Hefty
     
  • The current query_route call can return up to two path records. The
    assumption being that one is the primary path, with optional support
    for an alternate path. In both cases, the paths are assumed to be
    reversible and are used to send CM MADs.

    With the ability to manually set IB path data, the rdma cm can
    eventually be capable of using up to 6 paths per connection:

    forward primary, reverse primary,
    forward alternate, reverse alternate,
    reversible primary path for CM MADs
    reversible alternate path for CM MADs.

    (It is unclear at this time if IB routing will complicate this) In
    order to handle more flexible routing topologies, add a new command to
    report any number of paths.

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

    Sean Hefty
     
  • Allow converting from struct ib_sa_path_rec to the IB defined SA path
    record wire format. This will be used to report path data from the
    rdma cm into user space.

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

    Sean Hefty
     
  • The sockaddr structure for AF_IB is larger than sockaddr_in6. The
    rdma cm user space ABI uses the latter to exchange address information
    between user space and the kernel.

    To support querying for larger addresses, define a new query command
    that exchanges data using sockaddr_storage, rather than sockaddr_in6.
    Unlike the existing query_route command, the new command only returns
    address information. Route (i.e. path record) data is separated.

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

    Sean Hefty
     
  • If an rdma_cm_id is bound to AF_IB, with a wild card address, only
    listen on IB devices.

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

    Sean Hefty
     
  • Allow the user to specify the qkey when using AF_IB. The qkey is
    added to struct rdma_ucm_conn_param in place of a reserved field, but
    for backwards compatability, is only accessed if the associated
    rdma_cm_id is using AF_IB.

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

    Sean Hefty
     
  • If the source or destination address is AF_IB, then do not reserve a
    portion of the private data in the IB CM REQ or SIDR REQ messages for
    the cma header. Instead, all private data should be exported to the
    user. When AF_IB is used, the rdma cm does not have sufficient
    information to fill in the cma header. Additionally, this will be
    necessary to support any IB connection through the rdma cm interface,

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

    Sean Hefty
     
  • With the removal of SDP related code, we can merge cma_get_net_info()
    with cma_save_net_info(), since we're only ever dealing with a single
    header format.

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

    Sean Hefty
     
  • The SDP protocol was never merged upstream. Remove unused SDP related
    code from the RDMA CM.

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

    Sean Hefty
     
  • cma_get_service_id() forms the service ID based on the port space and
    port number of the rdma_cm_id. Extend the call to support AF_IB,
    which contains the service ID directly. This will be needed to
    support any arbitrary SID.

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

    Sean Hefty
     
  • Allow rdma_resolve_route() to handle the case where the user specified
    the source and destination addresses using AF_IB.

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

    Sean Hefty
     
  • Allow the user to specify the remote address using AF_IB format. When
    AF_IB is used, the remote address simply needs to be recorded, and no
    resolution using ARP is done. The local address may still need to be
    matched with a local IB device.

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

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

    Sean Hefty
     
  • If a user specifies AF_IB as the source address for a loopback
    connection, limit the resolution to IB devices only.

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

    Sean Hefty
     
  • Provide inline helpers to extract source and destination address data
    from the rdma_cm_id.

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

    Sean Hefty
     
  • cma_resolve_loopback is called after an rdma_cm_id has been
    bound to a specific sa_family and port. Once the
    source sa_family for the id has been set, do not modify it.
    Only the actual IP address portion of the source address
    needs to be set.

    As part of this fix, we can simplify setting the source address
    by moving the loopback address assignment from cma_resolve_loopback
    to cma_bind_loopback. cma_bind_loopback is only invoked when
    the source address is the loopback address.

    Finally, add loopback support for AF_IB as part of the change.

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

    Sean Hefty
     
  • Modify rdma_bind_addr to allow the user to specify AF_IB when binding
    to a device. AF_IB indicates that the user is not mapping an IP
    address to the native IB addressing. (The mapping may have already
    been done, or is not needed)

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

    Sean Hefty
     
  • The AF_IB uses a 64-bit service id (SID), which the user can control
    through the use of a mask. The rdma_cm will assign values to the
    unmasked portions of the SID based on the selected port space and port
    number.

    Because the IB spec divides the SID range into several regions, a
    SID/mask combination may fall into one of the existing port space
    ranges as defined by the RDMA CM IP Annex. Map the AF_IB SID to the
    correct RDMA port space.

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

    Sean Hefty
     
  • Add support for AF_IB to ip_addr_size, and rename the function to
    account for the change. Give the compiler more control over whether
    the call should be inline or not by moving the definition into the .c
    file, removing the static inline, and exporting it.

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

    Sean Hefty
     
  • Enhance checks for loopback and any address to support AF_IB in
    addition to AF_INET and AF_INT6. This will allow future patches to
    use AF_IB when binding and resolving addresses.

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

    Sean Hefty
     
  • The rdma_cm only allows setting reuseaddr if the corresponding
    rdma_cm_id is in the idle state. Allow setting this value in other
    states. This brings the behavior more inline with sockets.

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

    Sean Hefty
     

20 Jun, 2013

19 commits