#
d412c076 |
| 05-Nov-2024 |
John Baldwin <jhb@FreeBSD.org> |
Check for errors when detaching children first, not last
These detach routines in these drivers all ended with 'return (bus_generic_detach())' meaning that if any child device failed to detach, the
Check for errors when detaching children first, not last
These detach routines in these drivers all ended with 'return (bus_generic_detach())' meaning that if any child device failed to detach, the parent driver was left in a mostly destroyed state, but still marked attached. Instead, bus drivers should detach child drivers first and return errors before destroying driver state in the parent.
Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47387
show more ...
|
#
65c4ec88 |
| 28-Sep-2024 |
Doug Moore <dougm@FreeBSD.org> |
gdma: use ispower2
It's faster to use ispower2(n) than it is to compute roundup_pow_of_two and do a comparison. So do the former.
Reviewed by: kib Differential Revision: https://reviews.freebsd.or
gdma: use ispower2
It's faster to use ispower2(n) than it is to compute roundup_pow_of_two and do a comparison. So do the former.
Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D46838
show more ...
|
Revision tags: release/13.4.0 |
|
#
1dc7a7b7 |
| 03-Sep-2024 |
Zhenlei Huang <zlei@FreeBSD.org> |
mana: Stop checking for failures from malloc/mallocarray/buf_ring_alloc(M_WAITOK)
MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852
|
#
a94ed493 |
| 24-Jun-2024 |
Doug Moore <dougm@FreeBSD.org> |
dev/mana: replace power2 function
Replace is_power_of_2(length) with power2(length). When length != 0, as in this case, they produce the same result. This will allow an implementation of is_power_
dev/mana: replace power2 function
Replace is_power_of_2(length) with power2(length). When length != 0, as in this case, they produce the same result. This will allow an implementation of is_power_of_two to be dropped.
Reviewed by: alc, markj Differential Revision: https://reviews.freebsd.org/D45536
show more ...
|
#
89848b34 |
| 05-Jun-2024 |
Mark Johnston <markj@FreeBSD.org> |
mana: Use device_set_desc()
No functional change intended.
MFC after: 1 week
|
Revision tags: release/14.1.0, release/13.3.0 |
|
#
47e99e5b |
| 13-Feb-2024 |
Wei Hu <whu@FreeBSD.org> |
mana: fix leaking pci resource problem detaching mana deivces
Fixing the error messages when detaching the mana gdma devices showed in dmesg: "Device leaked memory resources".
Reported by: NetApp M
mana: fix leaking pci resource problem detaching mana deivces
Fixing the error messages when detaching the mana gdma devices showed in dmesg: "Device leaked memory resources".
Reported by: NetApp MFC after: 3 days Sponsored by: Microsoft
show more ...
|
#
fdafd315 |
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remov
sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/
Sponsored by: Netflix
show more ...
|
Revision tags: release/14.0.0 |
|
#
e4e11c1d |
| 28-Aug-2023 |
Wei Hu <whu@FreeBSD.org> |
mana: batch ringing RX queue doorbell on receiving packets
It's inefficient to ring the doorbell page every time a WQE is posted to the received queue. Excessive MMIO writes result in CPU spending m
mana: batch ringing RX queue doorbell on receiving packets
It's inefficient to ring the doorbell page every time a WQE is posted to the received queue. Excessive MMIO writes result in CPU spending more time waiting on LOCK instructions (atomic operations), resulting in poor scaling performance.
Move the code for ringing doorbell page to where after we have posted all WQEs to the receive queue in mana_poll_rx_cq().
In addition, use the correct WQE count for ringing RQ doorbell. The hardware specification specifies that WQE_COUNT should set to 0 for the Receive Queue. Although currently the hardware doesn't enforce the check, in the future releases it may check on this value.
Tested by: whu MFC after: 1 week Sponsored by: Microsoft
show more ...
|
#
685dc743 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
Revision tags: release/13.2.0, release/12.4.0 |
|
#
c5eed414 |
| 28-Sep-2022 |
John Baldwin <jhb@FreeBSD.org> |
Fix various places which cast a pointer to a uint64_t or vice versa.
GCC warns about the mismatched sizes on 32-bit platforms.
Reviewed by: imp, markj Differential Revision: https://reviews.freebsd
Fix various places which cast a pointer to a uint64_t or vice versa.
GCC warns about the mismatched sizes on 32-bit platforms.
Reviewed by: imp, markj Differential Revision: https://reviews.freebsd.org/D36752
show more ...
|
#
b685df31 |
| 29-Aug-2022 |
Wei Hu <whu@FreeBSD.org> |
mana: some code refactoring and export apis for future RDMA driver
- Record the physical address for doorbell page region For supporting RDMA device with multiple user contexts with their indivi
mana: some code refactoring and export apis for future RDMA driver
- Record the physical address for doorbell page region For supporting RDMA device with multiple user contexts with their individual doorbell pages, record the start address of doorbell page region for use by the RDMA driver to allocate user context doorbell IDs.
- Handle vport sharing between devices For outgoing packets, the PF requires the VF to configure the vport with corresponding protection domain and doorbell ID for the kernel or user context. The vport can't be shared between different contexts.
Implement the logic to exclusively take over the vport by either the Ethernet device or RDMA device.
- Add functions for allocating doorbell page from GDMA The RDMA device needs to allocate doorbell pages for each user context. Implement those functions and expose them for use by the RDMA driver.
- Export Work Queue functions for use by RDMA driver RDMA device may need to create Ethernet device queues for use by Queue Pair type RAW. This allows a user-mode context accesses Ethernet hardware queues. Export the supporting functions for use by the RDMA driver.
- Define max values for SGL entries The number of maximum SGl entries should be computed from the maximum WQE size for the intended queue type and the corresponding OOB data size. This guarantees the hardware queue can successfully queue requests up to the queue depth exposed to the upper layer.
- Define and process GDMA response code GDMA_STATUS_MORE_ENTRIES When doing memory registration, the PF may respond with GDMA_STATUS_MORE_ENTRIES to indicate a follow request is needed. This is not an error and should be processed as expected.
- Define data structures for protection domain and memory registration The MANA hardware support protection domain and memory registration for use in RDMA environment. Add those definitions and expose them for use by the RDMA driver.
MFC after: 2 weeks Sponsored by: Microsoft
show more ...
|
#
fa2d4a22 |
| 15-Aug-2022 |
Wei Hu <whu@FreeBSD.org> |
mana: add rmb load fence to comply with hw spec
To ensure software reads fresh data after observing ownership bits.
Sponsored by: Microsoft
|
Revision tags: release/13.1.0 |
|
#
825718a3 |
| 09-May-2022 |
John Baldwin <jhb@FreeBSD.org> |
mana: Remove unused devclass argument to DRIVER_MODULE.
|
#
027d0c1c |
| 13-Jan-2022 |
Wei Hu <whu@FreeBSD.org> |
mana: fix misc minor handlding issues when error happens.
- In mana_create_txq(), if test fails we must free some resources as in all the other handling paths of this function. - In mana_gd_read_c
mana: fix misc minor handlding issues when error happens.
- In mana_create_txq(), if test fails we must free some resources as in all the other handling paths of this function. - In mana_gd_read_cqe(), add warning log in case of CQE read overflow, instead of failing silently. - Fix error handling in mana_create_rxq() when cq->gdma_id >= gc->max_num_cqs. - In mana_init_port(), use the correct port index rather than 0. - In mana_hwc_create_wq(), If allocating the DMA buffer fails, mana_hwc_destroy_wq was called without previously storing the pointer to the queue. In order to avoid leaking the pointer to the queue, store it as soon as it is allocated.
MFC after: 2 weeks Sponsored by: Microsoft
show more ...
|
#
623918a1 |
| 12-Jan-2022 |
Wei Hu <whu@FreeBSD.org> |
mana: Improve the HWC error handling
Currently when the HWC creation fails, the error handling is flawed, e.g. if mana_hwc_create_channel() -> mana_hwc_establish_channel() fails, the resources acqui
mana: Improve the HWC error handling
Currently when the HWC creation fails, the error handling is flawed, e.g. if mana_hwc_create_channel() -> mana_hwc_establish_channel() fails, the resources acquired in mana_hwc_init_queues() is not released.
Enhance mana_hwc_destroy_channel() to do the proper cleanup work and call it accordingly.
MFC after: 2 weeks Sponsored by: Microsoft
show more ...
|
#
ed65c80a |
| 07-Jan-2022 |
Wei Hu <whu@FreeBSD.org> |
Mana: report OS info to PF driver
The PF driver might use the OS info for statistical purposes.
MFC after: 2 weeks Sponsored by: Microsoft
|
Revision tags: release/12.3.0 |
|
#
1833cf13 |
| 26-Oct-2021 |
Wei Hu <whu@FreeBSD.org> |
Mana: move mana polling from EQ to CQ
-Each CQ start task queue to poll when completion happens. This means every rx and tx queue has its own cleanup task thread to poll the completion.
Mana: move mana polling from EQ to CQ
-Each CQ start task queue to poll when completion happens. This means every rx and tx queue has its own cleanup task thread to poll the completion. - Arm EQ everytime no matter it is mana or hwc. CQ arming depends on the budget. - Fix a warning in mana_poll_tx_cq() when cqe_read is 0. - Move cqe_poll from EQ to CQ struct. - Support EQ sharing up to 8 vPorts. - Ease linkdown message from mana_info to mana_dbg.
Tested by: whu MFC after: 2 weeks Sponsored by: Microsoft
show more ...
|
#
ce110ea1 |
| 20-Aug-2021 |
Wei Hu <whu@FreeBSD.org> |
Microsoft Azure Network Adapter(MANA) VF support
MANA is the new network adapter from Microsoft which will be available in Azure public cloud. It provides SRIOV NIC as virtual function to guest OS r
Microsoft Azure Network Adapter(MANA) VF support
MANA is the new network adapter from Microsoft which will be available in Azure public cloud. It provides SRIOV NIC as virtual function to guest OS running on Hyper-V.
The code can be divided into two major parts. Gdma_main.c is the one to bring up the hardware board and drives all underlying hardware queue infrastructure. Mana_en.c contains all main ethernet driver code. It has only tested and supported on amd64 architecture.
PR: 256336 Reviewed by: decui@microsoft.com Tested by: whu MFC after: 2 week Relnotes: yes Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D31150
show more ...
|