- Notifications
You must be signed in to change notification settings - Fork 795
bnxt_re/lib: Support direct verbs #1654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sbasavapatna wants to merge 4 commits into linux-rdma:master Choose a base branch from sbasavapatna:dv-upstream
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
Open
+1,225 −4
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Introduce a new logging function and new enviornment variables to control it. This will be used in subsequent patches for debug logging. Below environment variables are supported. BNXT_DEBUG_FILE: User can provide absolute file location that will be used for logging the prints from library code. Default path is – “/var/log/messages” BNXT_DEBUG_MASK: Set this value to log direct verbs related information. BNXT_DUMP_DV = 1 Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com> Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com> Reviewed-by: Damodharam Ammepalli <damodharam.ammepalli@broadcom.com> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
To commit: ?? ("RDMA/bnxt_re: Direct Verbs: Support CQ and QP verbs"). Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com> The following Direct Verb (DV) APIs have been implemented in this patch. Doorbell Region Direct Verbs: ----------------------------- - bnxt_re_dv_alloc_db_region(): This will allow the appliation to create extra doorbell regions and use the associated doorbell page index in dv_create_qp() and use the associated DB address while ringing the doorbell. - bnxt_re_dv_free_db_region(): Free the allocated doorbell region. - bnxt_re_dv_get_default_db_region(): Return the default doorbell page index and doorbell page address associated with the ucontext. Umem Registration Direct Verbs: ------------------------------- - bnxt_re_dv_umem_reg(): Register the user memory to be used by the application with the driver. Application can register a large chunk of memory and use it during subsequent resource creation DV APIs. Note that the driver doesn't really map/pin the user memory during dv_umem_reg(). The app specified memory params (addr, len) are saved and a corresponding umem-handle is returned. This memory is mapped/pinned when the application subsequently creates the required resources (CQ/QP) using respective direct verbs. This is implemented in the next patch in this series. - bnxt_re_dv_umem_dereg(): Deregister the user memory specified by the umem-handle. Co-developed-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com> Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com> Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Reviewed-by: Selvin Thyparampil Xavier <selvin.xavier@broadcom.com>
The following Direct Verb (DV) APIs have been implemented in this patch. CQ Direct Verbs: ---------------- - bnxt_re_dv_create_cq(): Create a CQ of requested size (cqe). The application must have already registered this memory using bnxt_re_dv_umem_reg(). The CQ umem-handle and umem-offset provided by the application are passed to the driver. Save the CQ-handle returned by the driver. - bnxt_re_dv_destroy_cq(): Pass the CQ-handle to the driver and destroy the DV_CQ. QP Direct Verbs: ---------------- - bnxt_re_dv_create_qp(): Create a QP using specified params (struct bnxt_re_dv_qp_init_attr). The application must have already registered SQ/RQ memory using bnxt_re_dv_umem_reg(). The SQ/RQ umem-handle and umem-offset provided by the application are passed to the driver. Save the QP-handle returned by the driver. - bnxt_re_dv_destroy_qp(): Pass the QP-handle to the driver and destroy the DV_QP. - bnxt_re_dv_modify_qp(): Modify QP attributes for the DV_QP specified by the QP-handle. - bnxt_re_dv_query_qp(): Return QP attributes for the DV_QP specified by the QP-handle. Note: ----- Some applications might want to allocate memory for all resources of a given type (CQ/QP) in one big chunk and then register that entire memory once using dv_umem_reg(). At the time of creating each individual resource, the application should pass a specific offset/length in the umem registered memory. Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com> Co-developed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Co-developed-by: Selvin Xavier <selvin.xavier@broadcom.com> Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
8042660 to 2617428 Compare Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Hi,
This patchset supports Direct Verbs in the bnxt_re library.
This is required by vendor specific applications that need to manage
the HW resources directly and to implement the datapath in the
application.
To support this, the library and the driver are being enhanced to
provide Direct Verbs using which the application can allocate and
manage the HW resources (Queues, Doorbell etc) . The Direct Verbs
enable the application to implement the control path.
Patch#1 Support debug logging
Patch#2 Update kernel headers
Patch#3 Support dbr and umem direct verbs
Patch#4 Support cq and qp direct verbs
Thanks,
-Harsha