aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/bnxt_re/main.c
Commit message (Collapse)AuthorAgeFilesLines
...
* RDMA/bnxt_re: Update the correct DB FIFO depth and mask for GenP7Selvin Xavier2024-07-011-14/+24
| | | | | | | | | | | | | | | | GenP5 and P7 devices have different DB FIFO depth. Use different values based on the chip context. Instead of hardcoding doorbell FIFO related values, get it from the HWRM interface. Maintain backward compatibility by having default values when FW is not providing the doorbell FIFO related values. Signed-off-by: Chandramohan Akula <[email protected]> Signed-off-by: Ajit Khaparde <[email protected]> Signed-off-by: Selvin Xavier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
* RDMA/bnxt_re: Remove a redundant check inside bnxt_re_vf_res_configKalesh AP2024-01-251-3/+0
| | | | | | | | | | | After the cited commit, there is no possibility that this check can return true. Remove it. Fixes: a43c26fa2e6c ("RDMA/bnxt_re: Remove the sriov config callback") Signed-off-by: Kalesh AP <[email protected]> Signed-off-by: Selvin Xavier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
* RDMA/bnxt_re: Fix the offset for GenP7 adapters for user applicationsSelvin Xavier2023-12-201-3/+5
| | | | | | | | | | User Doorbell page indexes start at an offset for GenP7 adapters. Fix the offset that will be used for user doorbell page indexes. Fixes: a62d68581441 ("RDMA/bnxt_re: Update the BAR offsets") Signed-off-by: Selvin Xavier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
* RDMA/bnxt_re: Share a page to expose per CQ info with userspaceSelvin Xavier2023-12-171-1/+9
| | | | | | | | | | | | | | | | | | | | | | Gen P7 adapters needs to share a toggle bits information received in kernel driver with the user space. User space needs this info during the request notify call back to arm the CQ. User space application can get this page using the UAPI routines. Library will mmap this page and get the toggle bits to be used in the next ARM Doorbell. Uses a hash list to map the CQ structure from the CQ ID. CQ structure is retrieved from the hash list while the library calls the UAPI routine to get the toggle page mapping. Currently the full page is mapped per CQ. This can be optimized to enable multiple CQs from the same application share the same page and different offsets in the page. Signed-off-by: Selvin Xavier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
* Expose c0 and SW encap ICM for RDMALeon Romanovsky2023-12-121-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | These two series from Mark and Shun extend RDMA mlx5 API. Mark's series provides c0 register used to match egress traffic sent by local device. Shun's series adds new type for ICM area. Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
| * RDMA/bnxt_re: Correct module description stringKalesh AP2023-11-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | The word "Driver" is repeated twice in the "modinfo bnxt_re" output description. Fix it. Fixes: 1ac5a4047975 ("RDMA/bnxt_re: Add bnxt_re RoCE driver") Signed-off-by: Kalesh AP <[email protected]> Signed-off-by: Selvin Xavier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
* | RDMA/bnxt_re: Update the BAR offsetsSelvin Xavier2023-12-111-14/+7
| | | | | | | | | | | | | | | | | | | | Update the BAR offsets for handling GenP7 adapters. Use the values populated by L2 driver for getting the Doorbell offsets. Signed-off-by: Selvin Xavier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
* | RDMA/bnxt_re: Support new 5760X P7 devicesSelvin Xavier2023-12-111-7/+7
|/ | | | | | | | | | | Add basic support for 5760X P7 devices. Add new chip revisions. The first version support is similar to the existing P5 adapters. Extend the current support for P5 adapters to P7 also. Signed-off-by: Selvin Xavier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
* RDMA/bnxt_re: Fix clang -Wimplicit-fallthrough in ↵Nathan Chancellor2023-10-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | bnxt_re_handle_cq_async_error() Clang warns (or errors with CONFIG_WERROR=y): drivers/infiniband/hw/bnxt_re/main.c:1114:2: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough] 1114 | default: | ^ drivers/infiniband/hw/bnxt_re/main.c:1114:2: note: insert 'break;' to avoid fall-through 1114 | default: | ^ | break; 1 error generated. Clang is a little more pedantic than GCC, which does not warn when falling through to a case that is just break or return. Clang's version is more in line with the kernel's own stance in deprecated.rst, which states that all switch/case blocks must end in either break, fallthrough, continue, goto, or return. Add the missing break to silence the warning. Closes: https://github.com/ClangBuiltLinux/linux/issues/1950 Fixes: b02fd3f79ec3 ("RDMA/bnxt_re: Report async events and errors") Signed-off-by: Nathan Chancellor <[email protected]> Link: https://lore.kernel.org/r/20231020-bnxt_re-implicit-fallthrough-v1-1-b5c19534a6c9@kernel.org Signed-off-by: Leon Romanovsky <[email protected]>
* RDMA/bnxt_re: Do not report SRQ error in srq notificationChandramohan Akula2023-10-151-5/+2
| | | | | | | | | | In the SRQ notification handler, do not report the SRQ_ERROR in the default event case, as there was no error. Signed-off-by: Chandramohan Akula <[email protected]> Signed-off-by: Selvin Xavier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
* RDMA/bnxt_re: Report async events and errorsChandramohan Akula2023-10-151-9/+156
| | | | | | | | | Report QP, SRQ and CQ async events and errors. Signed-off-by: Chandramohan Akula <[email protected]> Signed-off-by: Selvin Xavier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
* Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdmaLinus Torvalds2023-09-011-30/+247
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull rdma updates from Jason Gunthorpe: "Many small changes across the subystem, some highlights: - Usual driver cleanups in qedr, siw, erdma, hfi1, mlx4/5, irdma, mthca, hns, and bnxt_re - siw now works over tunnel and other netdevs with a MAC address by removing assumptions about a MAC/GID from the connection manager - "Doorbell Pacing" for bnxt_re - this is a best effort scheme to allow userspace to slow down the doorbell rings if the HW gets full - irdma egress VLAN priority, better QP/WQ sizing - rxe bug fixes in queue draining and srq resizing - Support more ethernet speed options in the core layer - DMABUF support for bnxt_re - Multi-stage MTT support for erdma to allow much bigger MR registrations - A irdma fix with a CVE that came in too late to go to -rc, missing bounds checking for 0 length MRs" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (87 commits) IB/hfi1: Reduce printing of errors during driver shut down RDMA/hfi1: Move user SDMA system memory pinning code to its own file RDMA/hfi1: Use list_for_each_entry() helper RDMA/mlx5: Fix trailing */ formatting in block comment RDMA/rxe: Fix redundant break statement in switch-case. RDMA/efa: Fix wrong resources deallocation order RDMA/siw: Call llist_reverse_order in siw_run_sq RDMA/siw: Correct wrong debug message RDMA/siw: Balance the reference of cep->kref in the error path Revert "IB/isert: Fix incorrect release of isert connection" RDMA/bnxt_re: Fix kernel doc errors RDMA/irdma: Prevent zero-length STAG registration RDMA/erdma: Implement hierarchical MTT RDMA/erdma: Refactor the storage structure of MTT entries RDMA/erdma: Renaming variable names and field names of struct erdma_mem RDMA/hns: Support hns HW stats RDMA/hns: Dump whole QP/CQ/MR resource in raw RDMA/irdma: Add missing kernel-doc in irdma_setup_umode_qp() RDMA/mlx4: Copy union directly RDMA/irdma: Drop unused kernel push code ...
| * RDMA/bnxt_re: Add support for dmabuf pinned memory regionsSaravanan Vajravel2023-08-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | Support the new verb which indicates dmabuf support. bnxt doesn't support ODP. So use the pinned version of the dmabuf APIs to enable bnxt_re devices to work as dmabuf importer. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Saravanan Vajravel <[email protected]> Signed-off-by: Selvin Xavier <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
| * RDMA/bnxt_re: Initialize mutex dbq_lockKashyap Desai2023-08-151-0/+1
| | | | | | | | | | | | | | | | | | | | Fix the missing dbq_lock mutex initialization Fixes: 2ad4e6303a6d ("RDMA/bnxt_re: Implement doorbell pacing algorithm") Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: Selvin Xavier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
| * RDMA/bnxt_re: Remove unnecessary variable initializationsKalesh AP2023-08-071-6/+6
| | | | | | | | | | | | | | | | | | Remove unnecessary variable initializations. Signed-off-by: Kalesh AP <[email protected]> Signed-off-by: Selvin Xavier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
| * RDMA/bnxt_re: Avoid unnecessary memsetKalesh AP2023-08-071-8/+4
| | | | | | | | | | | | | | | | | | | | Avoid memset by initializing the variables during declaration itself. Signed-off-by: Kalesh AP <[email protected]> Signed-off-by: Selvin Xavier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
| * RDMA/bnxt_re: Remove a redundant flagKalesh AP2023-08-071-3/+2
| | | | | | | | | | | | | | | | | | | | | | After the cited commit, BNXT_RE_FLAG_GOT_MSIX is redundant. Remove it. Fixes: 303432211324 ("bnxt_en: Remove runtime interrupt vector allocation") Signed-off-by: Kalesh AP <[email protected]> Signed-off-by: Selvin Xavier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
| * RDMA/bnxt_re: Fix max_qp count for virtual functionsKalesh AP2023-08-071-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Driver has not accounted QP1 for virtual functions when fetching device attributes and hence max_qp count is one less than active_qp count. Fixed driver so that it counts QP1 for virtual functions as well while fetching device attributes Fixes: ccd9d0d3dffc ("RDMA/bnxt_re: Enable RoCE on virtual functions") Signed-off-by: Saravanan Vajravel <[email protected]> Signed-off-by: Kalesh AP <[email protected]> Signed-off-by: Selvin Xavier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
| * RDMA: Remove unnecessary ternary operatorsRuan Jinjie2023-07-311-4/+3
| | | | | | | | | | | | | | | | | | There are a little ternary operators, the true or false judgment of which is unnecessary in C language semantics. Signed-off-by: Ruan Jinjie <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
| * bnxt_re: Update the debug counters for doorbell pacingChandramohan Akula2023-07-301-0/+3
| | | | | | | | | | | | | | | | | | | | Add debug counters to track the Doorbell pacing events and report the doorbell pacing debug stats. Signed-off-by: Chandramohan Akula <[email protected]> Signed-off-by: Selvin Xavier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
| * bnxt_re: Reorganize the resource statsChandramohan Akula2023-07-301-7/+7
| | | | | | | | | | | | | | | | | | Move the resource stats to a separate stats structure. Signed-off-by: Chandramohan Akula <[email protected]> Signed-off-by: Selvin Xavier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
| * RDMA/bnxt_re: Implement doorbell pacing algorithmChandramohan Akula2023-07-211-0/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | User applications alert the driver when the Doorbell FIFO reaches the alarm threshold. The driver updates the pacing parameters in the shared page to do the maximum pacing by the application till the DB FIFO congestion reduces to pacing threshold. Driver keeps checking the DB FIFO depth at the pacing interval and gradually adjusts the pacing level. Once the pacing level reaches default values (no congestion in the FIFO) pacing gets completed. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Chandramohan Akula <[email protected]> Signed-off-by: Selvin Xavier <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
| * RDMA/bnxt_re: Initialize Doorbell pacing featureChandramohan Akula2023-07-211-0/+96
| | | | | | | | | | | | | | | | | | | | | | | | Checks for pacing feature capability and get the doorbell pacing configuration using FW commands. Allocate a page and initialize the pacing parameters for the applications. Cleanup the page and de-initialize the pacing during device removal. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Chandramohan Akula <[email protected]> Signed-off-by: Selvin Xavier <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
* | RDMA/bnxt_re: Fix error handling in probe failure pathKalesh AP2023-08-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | During bnxt_re_dev_init(), when bnxt_re_setup_chip_ctx() fails unregister with L2 first before bailing out probe. Fixes: ae8637e13185 ("RDMA/bnxt_re: Add chip context to identify 57500 series") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kalesh AP <[email protected]> Signed-off-by: Selvin Xavier <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
* | RDMA/bnxt_re: Properly order ib_device_unalloc() to avoid UAFSelvin Xavier2023-08-101-1/+1
|/ | | | | | | | | | ib_dealloc_device() should be called only after device cleanup. Fix the dealloc sequence. Fixes: 6d758147c7b8 ("RDMA/bnxt_re: Use auxiliary driver interface") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Selvin Xavier <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
* Merge tag 'v6.4' into rdma.git for-nextJason Gunthorpe2023-06-271-2/+4
|\ | | | | | | | | | | | | | | | | | | | | Linux 6.4 Resolve conflicts between rdma rc and next in rxe_cq matching linux-next: drivers/infiniband/sw/rxe/rxe_cq.c: https://lore.kernel.org/r/[email protected] Signed-off-by: Jason Gunthorpe <[email protected]>
| * RDMA/bnxt_re: Fix reporting active_{speed,width} attributesKamal Heib2023-06-011-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | After commit 6d758147c7b8 ("RDMA/bnxt_re: Use auxiliary driver interface") the active_{speed, width} attributes are reported incorrectly, This is happening because ib_get_eth_speed() is called only once from bnxt_re_ib_init() - Fix this issue by calling ib_get_eth_speed() from bnxt_re_query_port(). Fixes: 6d758147c7b8 ("RDMA/bnxt_re: Use auxiliary driver interface") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kamal Heib <[email protected]> Acked-by: Selvin Xavier <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
| * RDMA/bnxt_re: Do not enable congestion control on VFsKalesh AP2023-05-191-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Congestion control needs to be enabled only on the PFs. FW fails the command if issued on VFs. Avoid sending the command on VFs. Fixes: f13bcef04ba0 ("RDMA/bnxt_re: Enable congestion control by default") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kalesh AP <[email protected]> Reviewed-by: Selvin Thyparampil Xavier <[email protected]> Signed-off-by: Selvin Xavier <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
* | RDMA/bnxt_re: Remove duplicated include in bnxt_re/main.cYang Li2023-06-261-1/+0
| | | | | | | | | | | | | | | | | | | | | | ./drivers/infiniband/hw/bnxt_re/main.c: ib_verbs.h is included more than once. Link: https://lore.kernel.org/r/[email protected] Reported-by: Abaci Robot <[email protected]> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=5588 Signed-off-by: Yang Li <[email protected]> Acked-by: Selvin Xavier <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
* | RDMA/bnxt_re: Enable low latency pushSelvin Xavier2023-06-211-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce driver specific uapi functionalites. Added a alloc_page functionality for user library to allocate specific pages. Currently added support for allocating write combine pages for push functinality. This interface shall be extended for other page allocations. Allocate a WC page using the uapi hook for enabling the low latency push in Gen P5 adapters for small packets. This is supported only for the user space QPs. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Selvin Xavier <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
* | RDMA/bnxt_re: Reorg the bar mappingSelvin Xavier2023-06-211-4/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Reorganize the code for allocation and mapping of Doorbell pages. Implements new HW command to get the BAR length used by L2 driver. These changes are used by the future patch which maps the WC Doorbell pages. Also, introduced a new lock dpi_tbl_lock for synchronize the DB page allocation from users. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Selvin Xavier <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
* | RDMA/bnxt_re: Move the interface version to chip context structureSelvin Xavier2023-06-211-1/+1
| | | | | | | | | | | | | | | | | | FW interface version check is required for multiple features. Moving the interface version to chip context structure. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Selvin Xavier <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
* | RDMA/bnxt_re: Query function capabilities from firmwareSelvin Xavier2023-06-211-0/+21
| | | | | | | | | | | | | | | | Query Function capabilities to enable advanced features. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Selvin Xavier <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
* | RDMA/bnxt_re: Optimize the bnxt_re_init_hwrm_hdr usageSelvin Xavier2023-06-211-29/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As of now bnxt_re_init_hwrm_hdr is taking only the opcode from the caller. compl_ring and target_id field is always -1. These fields might be changed when newer features are added. For now, removing these parameters as they are hard coded. Also, remove the rdev field which is not used. Also, initialize the structure bnxt_fw_msg during declaration itself. Link: https://lore.kernel.org/r/[email protected] Suggested-by: Leon Romanovsky <[email protected]> Signed-off-by: Selvin Xavier <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
* | RDMA/bnxt_re: Add disassociate ucontext supportSelvin Xavier2023-06-211-0/+5
| | | | | | | | | | | | | | | | | | | | Add driver disassociation support. Driver uses the APIs rdma_user_mmap_io api while mapping the IO pages to user space. Add empty stub for disassociate ucontext. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Selvin Xavier <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
* | RDMA/bnxt_re: Use the common mmap helper functionsSelvin Xavier2023-06-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | Replace the mmap handling function with common code in IB core. Create rdma_user_mmap_entry for each mmap resource and add to the ib_core mmap list. Add mmap_free verb support. Also, use rdma_user_mmap_io while mapping Doorbell pages. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Selvin Xavier <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
* | RDMA/bnxt_re: use firmware provided max request timeoutKashyap Desai2023-06-121-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | Firmware provides max request timeout value as part of hwrm_ver_get API. Driver gets the timeout from firmware and if that interface is not available then fall back to hardcoded timeout value. Also, Add a helper function to check the FW status. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: Selvin Xavier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
* | RDMA/bnxt_re: cancel all control path command waiters upon errorKashyap Desai2023-06-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | When an error is detected in FW, wake up all the waiters as the all of them need to be completed with timeout. Add the device error state also as a wait condition. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: Selvin Xavier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
* | RDMA/bnxt_re: remove virt_func check while creating RoCE FW channelKashyap Desai2023-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | There is a common FW communication offset for both PF and VF. Removed code around virt_fn check while creating FW channel. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: Selvin Xavier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
* | RDMA/bnxt_re: Remove a redundant check inside bnxt_re_update_gidKalesh AP2023-05-191-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The NULL check inside bnxt_re_update_gid() always return false. If sgid_tbl->tbl is not allocated, then dev_init would have failed. Fixes: 5fac5b1b297f ("RDMA/bnxt_re: Add vlan tag for untagged RoCE traffic when PFC is configured") Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Saravanan Vajravel <[email protected]> Reviewed-by: Damodharam Ammepalli <[email protected]> Reviewed-by: Ajit Khaparde <[email protected]> Signed-off-by: Selvin Xavier <[email protected]> Signed-off-by: Kalesh AP <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
* | RDMA/bnxt_re: Disable/kill tasklet only if it is enabledSelvin Xavier2023-05-191-3/+9
|/ | | | | | | | | | | | | | | | | | | | | | | When the ulp hook to start the IRQ fails because the rings are not available, tasklets are not enabled. In this case when the driver is unloaded, driver calls CREQ tasklet_kill. This causes an indefinite hang as the tasklet is not enabled. Driver shouldn't call tasklet_kill if it is not enabled. So using the creq->requested and nq->requested flags to identify if both tasklets/irqs are registered. Checking this flag while scheduling the tasklet from ISR. Also, added a cleanup for disabling tasklet, in case request_irq fails during start_irq. Check for return value for bnxt_qplib_rcfw_start_irq and in case the bnxt_qplib_rcfw_start_irq fails, return bnxt_re_start_irq without attempting to start NQ IRQs. Fixes: 1ac5a4047975 ("RDMA/bnxt_re: Add bnxt_re RoCE driver") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kalesh AP <[email protected]> Signed-off-by: Selvin Xavier <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
* RDMA/bnxt_re: Enable congestion control by defaultSelvin Xavier2023-04-041-1/+23
| | | | | | | | | | Enable Congesion control by default. Issue FW command enable the CC during driver load and disable it during unload. Signed-off-by: Selvin Xavier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
* RDMA/bnxt_re: Remove HW queue mapping from RoCE DriverSelvin Xavier2023-04-041-77/+0
| | | | | | | | | bnxt_en driver does the queue mapping for RoCE traffic. Removing the queue mapping from RoCE driver. Signed-off-by: Selvin Xavier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
* RDMA/bnxt_re: Add resize_cq supportSelvin Xavier2023-03-291-0/+2
| | | | | | | | | | | | | | | | | | Add resize_cq verb support for user space CQs. Resize operation for kernel CQs are not supported now. Driver should free the current CQ only after user library polls for all the completions and switch to new CQ. So after the resize_cq is returned from the driver, user library polls for existing completions and store it as temporary data. Once library reaps all completions in the current CQ, it invokes the ibv_cmd_poll_cq to inform the driver about the resize_cq completion. Adding a check for user CQs in driver's poll_cq and complete the resize operation for user CQs. Updating uverbs_cmd_mask with poll_cq to support this. Signed-off-by: Selvin Xavier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
* bnxt_en: Remove runtime interrupt vector allocationAjit Khaparde2023-02-021-36/+12
| | | | | | | | | | | | Modified the bnxt_en code to create and pre-configure RDMA devices with the right MSI-X vector count for the ROCE driver to use. This is to align the ROCE driver to the auxiliary device model which will simply bind the driver without getting into PCI-related handling. All PCI-related logic will now be in the bnxt_en driver. Suggested-by: Leon Romanovsky <[email protected]> Signed-off-by: Ajit Khaparde <[email protected]> Reviewed-by: Leon Romanovsky <[email protected]>
* RDMA/bnxt_re: Remove the sriov config callbackAjit Khaparde2023-02-021-4/+7
| | | | | | | | | | | | | Remove the SRIOV config callback which the bnxt_en was calling to reconfigure the chip resources for a PF device when VFs are created. The code is now modified to provision the VF resources based on the total VF count instead of the actual VF count. This allows the SRIOV config callback to be removed from the list of ulp_ops. Suggested-by: Leon Romanovsky <[email protected]> Signed-off-by: Ajit Khaparde <[email protected]> Reviewed-by: Leon Romanovsky <[email protected]>
* bnxt_en: Remove struct bnxt access from RoCE driverHongguang Gao2023-02-021-15/+7
| | | | | | | | | | | | | Decouple RoCE driver from directly accessing L2's private bnxt structure. Move the fields needed by RoCE driver into bnxt_en_dev. They'll be passed to RoCE driver by bnxt_rdma_aux_device_add() function. Signed-off-by: Hongguang Gao <[email protected]> Signed-off-by: Ajit Khaparde <[email protected]> Reviewed-by: Andy Gospodarek <[email protected]> Reviewed-by: Selvin Xavier <[email protected]> Reviewed-by: Leon Romanovsky <[email protected]>
* bnxt_en: Use auxiliary bus calls over proprietary callsAjit Khaparde2023-02-021-41/+61
| | | | | | | | | | | | | Wherever possible use the function ops provided by auxiliary bus instead of using proprietary ops. Defined bnxt_re_suspend and bnxt_re_resume calls which can be invoked by the bnxt_en driver instead of the ULP stop/start calls. Signed-off-by: Ajit Khaparde <[email protected]> Reviewed-by: Andy Gospodarek <[email protected]> Reviewed-by: Selvin Xavier <[email protected]> Reviewed-by: Leon Romanovsky <[email protected]>
* bnxt_en: Use direct API instead of indirectionAjit Khaparde2023-02-021-55/+16
| | | | | | | | | | | | | For a single ULP user there is no need for complicating function indirection calls. Remove all this complexity in favour of direct function calls exported by the bnxt_en driver. This allows to simplify the code greatly. Also remove unused ulp_async_notifier. Suggested-by: Leon Romanovsky <[email protected]> Signed-off-by: Ajit Khaparde <[email protected]> Reviewed-by: Andy Gospodarek <[email protected]> Reviewed-by: Selvin Xavier <[email protected]> Reviewed-by: Leon Romanovsky <[email protected]>
* bnxt_en: Remove usage of ulp_idAjit Khaparde2023-02-021-13/+11
| | | | | | | | | | | | Since the driver continues to use the single ULP model, the extra complexity and indirection is unnecessary. Remove the usage of ulp_id from the code. Suggested-by: Leon Romanovsky <[email protected]> Signed-off-by: Ajit Khaparde <[email protected]> Reviewed-by: Andy Gospodarek <[email protected]> Reviewed-by: Selvin Xavier <[email protected]> Reviewed-by: Leon Romanovsky <[email protected]>