#
9b8701b8 |
| 27-Feb-2025 |
Wei Hu <whu@FreeBSD.org> |
mana: refill the rx mbuf in batch
Set the default refill threshod to be one quarter of the rx queue length. User can change this value with hw.mana.rx_refill_thresh in loader.conf. It improves the r
mana: refill the rx mbuf in batch
Set the default refill threshod to be one quarter of the rx queue length. User can change this value with hw.mana.rx_refill_thresh in loader.conf. It improves the rx completion handling by saving 10% to 15% of overall time with this change.
Tested by: whu MFC after: 2 weeks Sponsored by: Microsoft
show more ...
|
#
a18e9994 |
| 24-Feb-2025 |
Wei Hu <whu@FreeBSD.org> |
mana: Increase default tx and rx ring size to 1024
Tcp perfomance tests show high number of retries under heave tx traffic. The numbers of queue stops and wakeups also increase. Further analysis sug
mana: Increase default tx and rx ring size to 1024
Tcp perfomance tests show high number of retries under heave tx traffic. The numbers of queue stops and wakeups also increase. Further analysis suggests the FreeBSD network stack tends to send TSO packets with multiple sg entries, typically ranging from 10 to 16. On mana, every two sgs takes one unit of tx ring. Therefore, adding up one unit for the head, it takes 6 to 9 units of tx ring to send a typical TSO packet.
Current default tx ring size is 256, which can get filled up quickly under heavy load. When tx ring is full, the send queue is stopped waiting for the ring space to be freed. This could cause the network stack to drop packets, and lead to tcp retransmissions.
Increase the default tx and rx ring size to 1024 units. Also introduce two tuneables allowing users to request tx and rx ring size in loader.conf: hw.mana.rx_req_size hw.mana.tx_req_size When mana is loading, the driver checks these two values and round them up to power of 2. If these two are not set or the request values are out of the allowable range, it sets the default ring size instead.
Also change the tx and rx single loop completion budget to 8.
Tested by: whu MFC after: 2 weeks Sponsored by: Microsoft
show more ...
|
Revision tags: release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, release/14.2.0, release/13.4.0, release/14.1.0, release/13.3.0 |
|
#
516b5059 |
| 17-Jan-2024 |
Wei Hu <whu@FreeBSD.org> |
mana: Fix TX CQE error handling
For an unknown TX CQE error type (probably from a newer hardware), still free the mbuf, update the queue tail, etc., otherwise the accounting will be wrong.
Also, TX
mana: Fix TX CQE error handling
For an unknown TX CQE error type (probably from a newer hardware), still free the mbuf, update the queue tail, etc., otherwise the accounting will be wrong.
Also, TX errors can be triggered by injecting corrupted packets, so replace the mana_err to mana_dbg logging.
Reported by: NetApp MFC after: 1 week Sponsored by: Microsoft
show more ...
|
Revision tags: release/14.0.0 |
|
#
b167e449 |
| 14-Sep-2023 |
Wei Hu <whu@FreeBSD.org> |
mana: add lro and tso stat counters
Add a few stat counters for tso and lro.
MFC after: 3 days Sponsored by: Microsoft
|
#
643fd7b4 |
| 04-Sep-2023 |
Wei Hu <whu@FreeBSD.org> |
mana: fix tso parameters and set hwassist bits
The parameters for tso on mana were not set correctly. Also the hwassist bits were not set. These two cause tso on mana not work. Fixed the issues and
mana: fix tso parameters and set hwassist bits
The parameters for tso on mana were not set correctly. Also the hwassist bits were not set. These two cause tso on mana not work. Fixed the issues and make tso working on mana.
Tested by: whu MFC after: 3 days Sponsored by: Microsoft
show more ...
|
#
95ee2897 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
Revision tags: release/13.2.0, release/12.4.0 |
|
#
37d22ce0 |
| 19-Aug-2022 |
Justin Hibbits <jhibbits@FreeBSD.org> |
Mechanically convert mana to IfAPI
Reviewed by: zlei Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D37835
|
#
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 ...
|
Revision tags: release/13.1.0 |
|
#
aa108bc7 |
| 13-Jan-2022 |
Wei Hu <whu@FreeBSD.org> |
mana: Add RX fencing
RX fencing allows the driver to know that any prior change to the RQs has finished, e.g. when the RQs are disabled/enabled or the hashkey/indirection table are changed, RX fenci
mana: Add RX fencing
RX fencing allows the driver to know that any prior change to the RQs has finished, e.g. when the RQs are disabled/enabled or the hashkey/indirection table are changed, RX fencing is required.
Remove the previous 'sleep' workaround and add the real support for RX fencing as the PF driver supports the MANA_FENCE_RQ request now (any old PF driver not supporting the request won't be used in production).
MFC after: 2 weeks Sponsored by: Microsoft
show more ...
|
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 ...
|