03 Aug, 2016

3 commits

  • This fix allows for support of in-kernel reserved operations
    without impacting the ULP user.

    The low level driver can register a non-zero value which
    will be transparently added to the send queue size and hidden
    from the ULP in every respect.

    ULP post sends will never see a full queue due to a reserved
    post send and reserved operations will never exceed that
    registered value.

    The s_avail will continue to track the ULP swqe availability
    and the difference between the reserved value and the reserved
    in use will track reserved availabity.

    Reviewed-by: Ashutosh Dixit
    Signed-off-by: Mike Marciniszyn
    Signed-off-by: Dennis Dalessandro
    Signed-off-by: Doug Ledford

    Mike Marciniszyn
     
  • In order to support extended memory management, add the mechanism to
    invalidate MR keys. This includes a flag "lkey_invalid" in the MR data
    structure that is to be checked when validating access to the MR via
    the associated key, and two utility functions to perform fast memory
    registration and memory key invalidate operations.

    Reviewed-by: Mike Marciniszyn
    Reviewed-by: Dennis Dalessandro
    Signed-off-by: Jianxin Xiong
    Signed-off-by: Dennis Dalessandro
    Signed-off-by: Doug Ledford

    Jianxin Xiong
     
  • Add flexibility for driver dependent operations in post send
    because different drivers will have differing post send
    operation support.

    This includes data structure definitions to support a table
    driven scheme along with the necessary validation routine
    using the new table.

    Reviewed-by: Ashutosh Dixit
    Reviewed-by: Jianxin Xiong
    Reviewed-by: Dennis Dalessandro
    Signed-off-by: Mike Marciniszyn
    Signed-off-by: Dennis Dalessandro
    Signed-off-by: Doug Ledford

    Mike Marciniszyn
     

23 Jun, 2016

1 commit

  • The current drivers return errors from this calldown
    wrapped in an ERR_PTR().

    The rdmavt code incorrectly tests for NULL.

    The code is fixed to use IS_ERR() and change ret according
    to the driver return value.

    Cc: Stable # 4.6+
    Reviewed-by: Dennis Dalessandro
    Signed-off-by: Mike Marciniszyn
    Signed-off-by: Dennis Dalessandro
    Signed-off-by: Doug Ledford

    Mike Marciniszyn
     

27 May, 2016

2 commits

  • rdmavt allows the driver to specify the size of the ack queue, but
    only uses it for the modify QP limit testing for setting the atomic
    limit value.

    The driver dependent size is now used to size the s_ack_queue ring
    dynamicially.

    Since the driver knows its size, the driver will use its define
    for any ring size dependent code.

    Reviewed-by: Mitko Haralanov
    Signed-off-by: Mike Marciniszyn
    Signed-off-by: Doug Ledford

    Mike Marciniszyn
     
  • This matches the ib_qp_attr size and
    avoids a extremely large value when the lower level
    driver registers.

    As part of the patch, the u8 ordinals are moved to the
    end of the struct to reduce pahole noted excesses.

    Reviewed-by: Mitko Haralanov
    Reviewed-by: Dennis Dalessandro
    Signed-off-by: Mike Marciniszyn
    Signed-off-by: Doug Ledford

    Mike Marciniszyn
     

29 Apr, 2016

1 commit

  • rdi->ports has memory allocated in rvt_alloc_device(), but does not get
    freed because the hfi1 and qib drivers drivers call ib_dealloc_device()
    directly instead of going through rdmavt. Add a rvt_dealloc_device()
    that frees rdi->ports and then calls ib_dealloc_device(). Switch hfi1
    and qib drivers to calling rvt_dealloc_device() instead of
    ib_dealloc_device() directly.

    Reviewed-by: Dennis Dalessandro
    Reviewed-by: Brian Welty
    Signed-off-by: Jubin John
    Reviewed-by: Leon Romanovsky
    Signed-off-by: Doug Ledford

    Jubin John
     

11 Mar, 2016

33 commits

  • Remove exported functions which are no longer required as the
    functionality has moved into rdmavt. This also requires re-ordering some
    of the functions since their prototype no longer appears in a header
    file. Rather than add forward declarations it is just cleaner to
    re-order some of the functions.

    Reviewed-by: Jubin John
    Signed-off-by: Dennis Dalessandro
    Signed-off-by: Doug Ledford

    Dennis Dalessandro
     
  • Initially it was intended that rdmavt would support some signaling
    between the underlying driver and itself. However this turned out to be
    unnecessary for qib and hfi1. If we need to add something like this in
    later to support another driver we should do it then. As of now this
    essentially dead code so remove it.

    Reviewed-by: Ira Weiny
    Reviewed-by: Jubin John
    Signed-off-by: Dennis Dalessandro
    Signed-off-by: Doug Ledford

    Dennis Dalessandro
     
  • While hfi1 and qib were still supporting bits and pieces of core verbs
    components there needed to be a way to convey if rdmavt should handle
    allocation and initialize of resources like the queue pair table. Now
    that all of this is moved into rdmavt there is no need for these flags.
    They are no longer used in the drivers.

    Reviewed-by: Ira Weiny
    Reviewed-by: Jubin John
    Signed-off-by: Dennis Dalessandro
    Signed-off-by: Doug Ledford

    Dennis Dalessandro
     
  • Rdmavt adopted an smi_ah from qib which is not needed by hfi1. Move this
    back to qib and get it out of the common library.

    Reviewed-by: Ira Weiny
    Reviewed-by: Jubin John
    Signed-off-by: Dennis Dalessandro
    Signed-off-by: Doug Ledford

    Dennis Dalessandro
     
  • For each verb validate that all requirements for driver callbacks are met.
    If a function is called without checking for a valid pointer, it is a
    required function. Also document what each callback function does.

    Reviewed-by: Mike Marciniszyn
    Signed-off-by: Dennis Dalessandro
    Signed-off-by: Doug Ledford

    Dennis Dalessandro
     
  • Add, remove, and otherwise clean up existing comments that are leftover
    from the initial code postings of rdmavt. Many of the comments were added
    to provide an idea on the direction we were thinking of going. Now that the
    design is solidified make a pass over and clean everything up. Also add
    details where lacking.

    Ensure all non static functions have nano comments.

    Reviewed-by: Jubin John
    Signed-off-by: Dennis Dalessandro
    Signed-off-by: Doug Ledford

    Dennis Dalessandro
     
  • This patch adds an additional lock to reduce contention on the s_lock.

    This lock is used in post_send() so that the post_send is not
    serialized with the send engine and other send related processing.

    To do this the s_next_psn is now maintained on post_send() while
    post_send() related fields are moved to a new cache line. There is
    an s_avail maintained for the post_send() to mitigate trading cache
    lines with the send engine. The lock is released/acquired around
    releasing the just built packet to the egress mechanism.

    Reviewed-by: Jubin John
    Reviewed-by: Dennis Dalessandro
    Signed-off-by: Dean Luick
    Signed-off-by: Harish Chegondi
    Signed-off-by: Mike Marciniszyn
    Signed-off-by: Ira Weiny
    Signed-off-by: Doug Ledford

    Mike Marciniszyn
     
  • A busy_jiffies variable is maintained and updated when rc qps are
    created and deleted. busy_jiffies is a scaled value of the number
    of rc qps in the device. busy_jiffies is incremented every rc qp
    scaling interval. busy_jiffies is added to the rc timeout
    in add_retry_timer and mod_retry_timer. The rc qp scaling interval
    is selected based on extensive performance evaluation of targeted
    workloads.

    Reviewed-by: Dennis Dalessandro
    Reviewed-by: Mike Marciniszyn
    Signed-off-by: Vennila Megavannan
    Signed-off-by: Jubin John
    Signed-off-by: Doug Ledford

    Vennila Megavannan
     
  • rvt_query_port calls into the driver through a call back function
    query_port_state to populate the rest of ib_port_attr elements.
    rvt_modify_port calls into the driver if needed through a call back
    function shut_down_port()

    Signed-off-by: Harish Chegondi
    Signed-off-by: Dennis Dalessandro
    Signed-off-by: Doug Ledford

    Harish Chegondi
     
  • Addin query gid support. Rdmavt still relies on the driver to maintain
    the gid table. Rdmavt simply calls into the driver to retrive the guid
    for a particular port.

    Reviewed-by: Harish Chegondi
    Signed-off-by: Dennis Dalessandro
    Signed-off-by: Doug Ledford

    Dennis Dalessandro
     
  • IB core uses 1 relative indexing for ports. All of our data structures
    use 0 based indexing. Add an inline function that we can use whenever we
    need to validate a legal value and try to convert a port number to a
    port index at the entrance into rdmavt.

    Try to follow the policy that when we are talking about a port from IB
    core point of view we refer to it as a port number. When port is an
    index into our arrays refer to it as a port index.

    Reviewed-by: Mike Marciniszyn
    Reviewed-by: Harish Chegondi
    Signed-off-by: Dennis Dalessandro
    Signed-off-by: Doug Ledford

    Dennis Dalessandro
     
  • Some hardware drivers requires additional checks on send WRs. Create an
    optional call back to allow hardware drivers to reject a send WR.

    Reviewed-by: Dennis Dalessandro
    Signed-off-by: Ira Weiny
    Signed-off-by: Doug Ledford

    Ira Weiny
     
  • Fill in srq function stubs with code derived from hfi1 and qib.
    Move necessary functions and data structure members as well.

    Reviewed-by: Dennis Dalessandro
    Reviewed-by: Harish Chegondi
    Signed-off-by: Jubin John
    Signed-off-by: Doug Ledford

    Jubin John
     
  • Update all files added by rdmavt which do not yet have 2016 as the
    copyright year.

    Reviewed-by: Ira Weiny
    Reviewed-by: Harish Chegondi
    Signed-off-by: Dennis Dalessandro
    Signed-off-by: Doug Ledford

    Dennis Dalessandro
     
  • This patch adds mad agent create and free to rdmavt.

    Reviewed-by: Ira Weiny
    Signed-off-by: Dennis Dalessandro
    Signed-off-by: Doug Ledford

    Dennis Dalessandro
     
  • This patch adds rdmavt device structure allocation in rdamvt. The
    ib_device alloc is now done in rdmavt instead of the driver. Drivers
    need to tell rdmavt the number of ports when calling.

    A side of effect of this patch is fixing a bug with port initialization
    where the device structure port array was allocated over top of an
    existing one.

    Reviewed-by: Ira Weiny
    Signed-off-by: Dennis Dalessandro
    Signed-off-by: Doug Ledford

    Dennis Dalessandro
     
  • Low level drivers need to be able to check incoming attributes as well as be
    able to adjust their private data on queue pair modification. Add 2 driver
    callbacks, check_modify_qp and modify_qp, to facilitate this.

    Signed-off-by: Ira Weiny
    Signed-off-by: Doug Ledford

    Ira Weiny
     
  • This patch adds in the multicast add and remove functions as well as the
    ancillary infrastructure needed.

    Reviewed-by: Mike Marciniszyn
    Signed-off-by: Dennis Dalessandro
    Signed-off-by: Doug Ledford

    Dennis Dalessandro
     
  • Add modify qp and supporting functions.

    Reviewed-by: Mike Marciniszyn
    Reviewed-by: Ira Weiny
    Signed-off-by: Dennis Dalessandro
    Signed-off-by: Doug Ledford

    Dennis Dalessandro
     
  • Add in a post_send and post_one_send to rdmavt. The ULP will provide a WQE
    to rdmavt which will then walk and queue each element. Rdmavt will then
    queue the work to be done in the driver or kick the driver's progress
    routine.

    There needs to be a follow on patch which adds in another lock for the
    head of the queue so that it can be added to and read from in parallel.
    This will touch protocol handlers and require other changes in the
    drivers. This will be done separately.

    Reviewed-by: Mike Marciniszyn
    Reviewed-by: Ira Weiny
    Signed-off-by: Dennis Dalessandro
    Signed-off-by: Doug Ledford

    Dennis Dalessandro
     
  • Brings in completion queue functionality. A kthread worker is added to
    the rvt_dev_info to serve as a worker for completion queues.

    Reviewed-by: Mike Marciniszyn
    Reviewed-by: Harish Chegondi
    Signed-off-by: Dennis Dalessandro
    Signed-off-by: Doug Ledford

    Dennis Dalessandro
     
  • The current code is problematic when the QP creation and ipoib is
    used to support NFS and NFS desires to do IO for paging purposes.
    In that case, the GFP_KERNEL allocation within create_qp causes
    a deadlock in tight memory situations.

    This fix adds support to create queue pair with GFP_NOIO flag for
    connected mode only to cleanly fail the create queue pair in those
    situations.

    This was previously fixed in qib but needed to get ported to hfi1.
    This patch handles that for both hardwares in the new rdmavt common
    layer.

    Reviewed-by: Dennis Dalessandro
    Signed-off-by: Mike Marciniszyn
    Signed-off-by: Doug Ledford

    Mike Marciniszyn
     
  • With this commit, the drivers using rdmavt need not define query_device
    function. But they should fill in the IB device attributes structure
    rvt_dev_info.dparms.props

    Reviewed-by: Dennis Dalessandro
    Signed-off-by: Harish Chegondi
    Signed-off-by: Doug Ledford

    Harish Chegondi
     
  • Until all queue pair functionality is moved to rdmavt we need to provide
    access to the reset function. This is only temporary and will be reverted
    back to a static, non exported function in the end.

    Reviewed-by: Ira Weiny
    Reviewed-by: Harish Chegondi
    Signed-off-by: Dennis Dalessandro
    Signed-off-by: Doug Ledford

    Dennis Dalessandro
     
  • Add create queue pair verbs call as well as supporting functions.

    Reviewed-by: Ira Weiny
    Reviewed-by: Harish Chegondi
    Signed-off-by: Dennis Dalessandro
    Signed-off-by: Doug Ledford

    Dennis Dalessandro
     
  • Add pkey table in rdi per port data structure. Also bring in related pkey
    functions. Drivers will still be responsible for allocating and
    maintaining the pkey table. However they need to tell rdmavt where to find
    the pkey table. We can not move the pkey table up into rdmavt because
    drivers need to manipulate this long before registering with it.

    Reviewed-by: Ira Weiny
    Reviewed-by: Mike Marciniszyn
    Signed-off-by: Dennis Dalessandro
    Signed-off-by: Doug Ledford

    Dennis Dalessandro
     
  • The mmap data structure was moved in a previous commit. This patch now
    pulls in the related functions.

    Reviewed-by: Ira Weiny
    Reviewed-by: Mike Marciniszyn
    Signed-off-by: Dennis Dalessandro
    Signed-off-by: Doug Ledford

    Dennis Dalessandro
     
  • Add table init as well as teardown for handling qpn maps. Drivers can still
    provide this functionality by setting the QP_INIT_DRIVER bit.

    Reviewed-by: Ira Weiny
    Reviewed-by: Mike Marciniszyn
    Signed-off-by: Dennis Dalessandro
    Signed-off-by: Doug Ledford

    Dennis Dalessandro
     
  • Until all functionality is moved over to rdmavt drivers still need to
    access a number of fields in data structures that are predominantly
    meant to be used by rdmavt. Once these rdmavt_.h header
    files are no longer being touched by drivers their content should be
    moved to rdmavt/.h. While here move a couple #defines
    over to more general IB verbs header files because they fit better.

    Reviewed-by: Ira Weiny
    Reviewed-by: Mike Marciniszyn
    Signed-off-by: Dennis Dalessandro
    Signed-off-by: Doug Ledford

    Dennis Dalessandro
     
  • Drivers may need to do some work once an address handle has been
    created. Add a driver function for this purpose.

    Reviewed-by: Ira Weiny
    Reviewed-by: Mike Marciniszyn
    Reviewed-by: Harish Chegondi
    Signed-off-by: Dennis Dalessandro
    Signed-off-by: Doug Ledford

    Dennis Dalessandro
     
  • Converge the ibport data structures of qib and hfi1 into a common ib
    port structure. Also provides a place to keep track of these ports
    in case rdmavt needs it. Along with this goes an attach and detach
    function for drivers to use to notify rdmavt of the ports.

    Reviewed-by: Ira Weiny
    Reviewed-by: Harish Chegondi
    Signed-off-by: Dennis Dalessandro
    Signed-off-by: Doug Ledford

    Dennis Dalessandro
     
  • Patch moves the srq data structure into rdmavt in preparation for
    removal from qib and hfi1 which will follow in subsequent patches.

    Reviewed-by: Ira Weiny
    Reviewed-by: Harish Chegondi
    Signed-off-by: Dennis Dalessandro
    Signed-off-by: Doug Ledford

    Dennis Dalessandro
     
  • Original patch is from Kamal Heib . It has
    been split into three separate patches. This one for rdmavt,
    a follow on for qib, and one for hfi1.

    Create datastructure for address handle and implement the
    create/destroy/modify/query of address handle for rdmavt.

    Reviewed-by: Ira Weiny
    Signed-off-by: Kamal Heib
    Signed-off-by: Dennis Dalessandro
    Signed-off-by: Doug Ledford

    Kamal Heib