aboutsummaryrefslogtreecommitdiff
path: root/drivers/infiniband/sw/rdmavt
AgeCommit message (Collapse)AuthorFilesLines
2016-03-10IB/rdmavt: Add modify qpDennis Dalessandro2-9/+525
Add modify qp and supporting functions. Reviewed-by: Mike Marciniszyn <[email protected]> Reviewed-by: Ira Weiny <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Add support for tracing eventsDennis Dalessandro4-2/+143
This patch adds support of tracing events using the kernels built-in event tracing infrastructure. This can be extended to provide a wide range of trace and debug capabilities which have a negligible impact on performance when enabled. These should be preferred over the use of the rvt_pr* functions. Reviewed-by: Ira Weiny <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Add post send to rdmavtDennis Dalessandro1-12/+171
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 <[email protected]> Reviewed-by: Ira Weiny <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Add completion queue functionsDennis Dalessandro3-7/+453
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 <[email protected]> Reviewed-by: Harish Chegondi <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Support creating qps with GFP_NOIO flagMike Marciniszyn1-13/+43
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 <[email protected]> Signed-off-by: Mike Marciniszyn <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Add support for rvt_query_device functionHarish Chegondi1-2/+7
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 <[email protected]> Signed-off-by: Harish Chegondi <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Allow reserving just one qpnHarish Chegondi1-2/+2
qib needs to reserve only one qpn for non-verbs stuff. Also fixed the for loop to reserve the end qpn. Reviewed-by: Dennis Dalessandro <[email protected]> Signed-off-by: Harish Chegondi <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Export reset_qp in rdmavtDennis Dalessandro1-3/+4
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 <[email protected]> Reviewed-by: Harish Chegondi <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Add create queue pair functionalityDennis Dalessandro2-22/+404
Add create queue pair verbs call as well as supporting functions. Reviewed-by: Ira Weiny <[email protected]> Reviewed-by: Harish Chegondi <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Add IB user context allocation and de-alloction functionsHarish Chegondi1-2/+18
Adding IB user context alloc and dealloc functions to rdmavt so that the drivers that use rdmavt can use these functions instead of defining their own functions. Reviewed-by: Ira Weiny <[email protected]> Signed-off-by: Harish Chegondi <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Add pkey supportDennis Dalessandro1-16/+30
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 <[email protected]> Reviewed-by: Mike Marciniszyn <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Add mmap related functionsDennis Dalessandro3-2/+141
The mmap data structure was moved in a previous commit. This patch now pulls in the related functions. Reviewed-by: Ira Weiny <[email protected]> Reviewed-by: Mike Marciniszyn <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Initialize and teardown of qpn tableDennis Dalessandro3-13/+221
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 <[email protected]> Reviewed-by: Mike Marciniszyn <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Break rdma_vt main include header file upDennis Dalessandro1-2/+2
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_<ibta_object>.h header files are no longer being touched by drivers their content should be moved to rdmavt/<ibta_object>.h. While here move a couple #defines over to more general IB verbs header files because they fit better. Reviewed-by: Ira Weiny <[email protected]> Reviewed-by: Mike Marciniszyn <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Add driver notification for new AHDennis Dalessandro1-2/+5
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 <[email protected]> Reviewed-by: Mike Marciniszyn <[email protected]> Reviewed-by: Harish Chegondi <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Add an ibport data structure to rdmavtDennis Dalessandro1-0/+24
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 <[email protected]> Reviewed-by: Harish Chegondi <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Add AH to rdmavtKamal Heib2-5/+98
Original patch is from Kamal Heib <[email protected]>. 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 <[email protected]> Signed-off-by: Kamal Heib <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Do not use rvt prints which rely on driver too earlyDennis Dalessandro1-1/+1
Trying to print debug and error messages with the rdmavt helpers will not work out so well if the drivers have not provided the get_card and get pci functions. Use the normal pr_error instead until we can check this. Reviewed-by: Ira Weiny <[email protected]> Reviewed-by: Mike Marciniszyn <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Move memory registration into rdmavtDennis Dalessandro3-14/+716
Use the memory registration routines in hfi1 and move them to rdmavt. A follow on patch will address removing the duplicated code in the hfi1 and qib drivers. Reviewed-by: Ira Weiny <[email protected]> Reviewed-by: Mike Marciniszyn <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Add device specific info printsDennis Dalessandro2-3/+38
Follow hfi1's example for printing information about the driver and incorporate into rdmavt. This requires two new functions to be provided by the driver, one to get_card_name and one to get_pci_dev. Reviewed-by: Mike Marciniszyn <[email protected]> Reviewed-by: Ira Weiny <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Move driver helper functions to a common structureDennis Dalessandro1-1/+5
Drivers are going to need to provide multiple functions for rdmavt to call in to. We already have one, so go ahead and push this into a data structure designated for driver supplied functions. Reviewed-by: Mike Marciniszyn <[email protected]> Reviewed-by: Ira Weiny <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Add queue pair data structure to rdmavtDennis Dalessandro1-5/+0
Add queue pair data structure as well as supporting structures to rdmavt. Reviewed-by: Ira Weiny <[email protected]> Reviewed-by: Mike Marciniszyn <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Add post send and recv stubsDennis Dalessandro3-1/+71
This adds the post sned and recv function stubs. Reviewed-by: Mike Marciniszyn <[email protected]> Reviewed-by: Ira Weiny <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Add completion queue function stubsDennis Dalessandro5-1/+184
Create stubs for completion queue creation, polling, resizing, calling for notification, and destroying. Reviewed-by: Mike Marciniszyn <[email protected]> Reviewed-by: Ira Weiny <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Add get port immutable stubDennis Dalessandro1-0/+7
This adds the get port immutable verbs call. Reviewed-by: Mike Marciniszyn <[email protected]> Reviewed-by: Ira Weiny <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Add mmap stubDennis Dalessandro5-1/+118
Adds the stub for the mmap verbs call. Reviewed-by: Mike Marciniszyn <[email protected]> Reviewed-by: Ira Weiny <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Add process MAD stubDennis Dalessandro3-1/+145
This adds the stub for process mad. More study is needed to determine the final MAD interaction between the driver and rvt. Reviewed-by: Mike Marciniszyn <[email protected]> Reviewed-by: Ira Weiny <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Add multicast stubsDennis Dalessandro5-1/+120
Adds the function stubs for attach and detach multicast. Reviewed-by: Mike Marciniszyn <[email protected]> Reviewed-by: Ira Weiny <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Add SRQ stubsDennis Dalessandro5-1/+155
Adds the stubs for create, modify, query, and destory for shared request queues. Reviewed-by: Mike Marciniszyn <[email protected]> Reviewed-by: Ira Weiny <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Add memory region stubsDennis Dalessandro5-1/+246
Adds the function stubs for allocating, and registering memory regions, as well as deregistering them. Reviewed-by: Mike Marciniszyn <[email protected]> Reviewed-by: Ira Weiny <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Add address handle stubsDennis Dalessandro5-2/+143
Adds the stubs for create, destroy, modify, and query of the address handle. Reviewed-by: Mike Marciniszyn <[email protected]> Reviewed-by: Ira Weiny <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Add queue pair function stubsDennis Dalessandro5-1/+195
Adds the stubs for create, modify, destroy and query functions for queue pairs. Reviewed-by: Mike Marciniszyn <[email protected]> Reviewed-by: Ira Weiny <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Alloc and dealloc ucontextsDennis Dalessandro1-0/+22
Add the stubs to allocate and deallocate user contexts. This will be handled completely by rvt. Reviewed-by: Mike Marciniszyn <[email protected]> Reviewed-by: Ira Weiny <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Add query gid stubDennis Dalessandro1-0/+22
The handler for query gid operates along the same lines as the query pkey handler. The driver will take care to keep the guid table updated. Reviewed-by: Mike Marciniszyn <[email protected]> Reviewed-by: Ira Weiny <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Add pkey query stubDennis Dalessandro1-0/+21
The pkey table will reside in the rvt structure but it will be modified only when the driver requests then rvt will simply read the value to return in the query. Reviewed-by: Mike Marciniszyn <[email protected]> Reviewed-by: Ira Weiny <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Add query and modify port stubsDennis Dalessandro1-0/+48
This patch adds the query and modify port stubs. The query will mostly entail the driver returning everything in the ib_port_attr which will get handed back to the verbs layer. The modify will need some API helpers in the driver. The send_trap and post_mad_send are still issues to address. Reviewed-by: Mike Marciniszyn <[email protected]> Reviewed-by: Ira Weiny <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Add query and modify device stubsDennis Dalessandro1-0/+31
Adds the stubs which will handle the query and modify device functions. At this time the only intention is to support changing the node desc and the guid via these calls. Reviewed-by: Mike Marciniszyn <[email protected]> Reviewed-by: Ira Weiny <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Macroize override checks during driver registrationDennis Dalessandro1-13/+9
Add a macro to cut down on writing the same lines over and over again for what will be a large number of functions that will be supported. Reviewed-by: Mike Marciniszyn <[email protected]> Reviewed-by: Ira Weiny <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Add ib core device attributes to rvt driver params listDennis Dalessandro1-1/+1
Instead of trying to handle each parameter separately, add ib_device_attr to rvt_driver_params. This means drivers will fill this in and pass to the rvt registration function. Reviewed-by: Mike Marciniszyn <[email protected]> Reviewed-by: Ira Weiny <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Add protection domain to rdmavt.Dennis Dalessandro5-1/+176
Add datastructure for and allocation/deallocation of protection domains for RDMAVT. Reviewed-by: Ira Weiny <[email protected]> Reviewed-by: Mike Marciniszyn <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Consolidate dma ops in rdmavt.Dennis Dalessandro5-1/+249
This patch adds dma functions to rdmavt. The source is hfi1's version of dma.c which will be removed by a subsequent hfi1 patch. Reviewed-by: Ira Weiny <[email protected]> Reviewed-by: Mike Marciniszyn <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10IB/rdmavt: Create module framework and handle driver registrationDennis Dalessandro4-0/+152
This patch introduces the basics for a new module called rdma_vt. This new driver is a software implementation of the InfiniBand verbs and aims to replace the multiple implementations that exist and duplicate each others' code. While the call to actually register the device with the IB core happens in rdma_vt, most of the work is still done in the drivers themselves. This will be changing in a follow on patch this is just laying the groundwork for this infrastructure. Reviewed-by: Ira Weiny <[email protected]> Reviewed-by: Mike Marciniszyn <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>