| 3d295733 | 21-May-2025 |
Jasper Tran O'Leary <jtranoleary@google.com> |
gve: Add callout to detect and handle TX timeouts
A TX timeout occurs when the driver allocates resources on a TX queue for a packet to be sent, prompts the hardware to send the packet, but does not
gve: Add callout to detect and handle TX timeouts
A TX timeout occurs when the driver allocates resources on a TX queue for a packet to be sent, prompts the hardware to send the packet, but does not receive a completion for the packet within a given timeout period. An accumulation of TX timeouts can cause one or more queues to run out of space and cause the entire driver to become stuck.
This commit adds a lockless timer service that runs periodically and checks queues for timed out packets. In the event we detect a timeout, we prompt the completion phase taskqueue to process completions. Upon the next inspection of the queue we still detect timed out packets, if the last "kick" occurred within a fixed cooldown window, we opt to reset the driver, even if the prior kick successfully freed timed out packets.
Signed-off-by: Jasper Tran O'Leary <jtranoleary@google.com>
Reviewed by: markj, ziaee MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D50385
show more ...
|
| 22fe926a | 05-Apr-2025 |
Vee Agarwal <veethebee@google.com> |
gve: Add feature to change TX/RX ring size
This change introduces new sysctl handlers that allow the user to change RX/TX ring sizes. As before, the default ring sizes will come from the device (usu
gve: Add feature to change TX/RX ring size
This change introduces new sysctl handlers that allow the user to change RX/TX ring sizes. As before, the default ring sizes will come from the device (usually 1024). We also get the max/min limits from the device. In the case min values are not provided we have statically defined constants for the min values. Additionally, if the modify ring option is not enabled on the device, changing ring sizes via sysctl will not be possible. When changing ring sizes, the interface turns down momentarily while allocating/freeing resources as necessary.
Signed-off-by: Vee Agarwal <veethebee@google.com>
Reviewed by: markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D49428
show more ...
|
| e0464f74 | 05-Apr-2025 |
Vee Agarwal <veethebee@google.com> |
gve: Add feature to adjust RX/TX queue counts
This change introduces new sysctl handlers that allow the user to change RX/TX queue counts. As before, the default queue counts will be the max value t
gve: Add feature to adjust RX/TX queue counts
This change introduces new sysctl handlers that allow the user to change RX/TX queue counts. As before, the default queue counts will be the max value the device can support. When chaning queue counts, the interface turns down momentarily while allocating/freeing resources as necessary.
Signed-off-by: Vee Agarwal <veethebee@google.com>
Reviewed by: markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D49427
show more ...
|
| 73c3fe4d | 14-Feb-2025 |
Jasper Tran O'Leary <jtranoleary@google.com> |
gve: Fix qpl_buf_head being initialized improperly
Currently, for DQO QPL our MPASS assertion on qpl_buf_head for available pending_pkts (i.e. not holding a packet) fails due to incorrect initializa
gve: Fix qpl_buf_head being initialized improperly
Currently, for DQO QPL our MPASS assertion on qpl_buf_head for available pending_pkts (i.e. not holding a packet) fails due to incorrect initialization. The MPASS fails on the first run of packets through the ring when INVARIANTS is on, and when INVARIANTS is off, things work without a bug.
The MPASS guards against improper reaping of "pending_pkt" objects, and thus was failing for the first run through the ring. By correctly initializing the objects in this patch we make the MPASS not fail on the first run too.
Signed-off-by: Vee Agarwal <veethebee@google.com> Signed-off-by: Jasper Tran O'Leary <jtranoleary@google.com>
Reviewed by: delphij, markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D48968
show more ...
|
| 031800c7 | 14-Feb-2025 |
Jasper Tran O'Leary <jtranoleary@google.com> |
gve: Do minor cleanup and bump version
This commit fixes several minor issues:
- Removes an unnecessary function pointer parameter on gve_start_tx_ring - Adds a presubmit check against style(9) - R
gve: Do minor cleanup and bump version
This commit fixes several minor issues:
- Removes an unnecessary function pointer parameter on gve_start_tx_ring - Adds a presubmit check against style(9) - Replaces mb() and rmb() macros with native atomic_thread_fence_seq_cst() and atomic_thread_fence_acq() respectively - Fixes various typos throughout - Increments the version number to 1.3.2
Co-authored-by: Vee Agarwal <veethebee@google.com> Signed-off-by: Vee Agarwal <veethebee@google.com> Signed-off-by: Jasper Tran O'Leary <jtranoleary@google.com>
Reviewed by: delphij, markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D48969
show more ...
|
| 62b2d0c3 | 14-Feb-2025 |
Jasper Tran O'Leary <jtranoleary@google.com> |
gve: Fix memory leak during reset
Before this change, during reset we were allocating new memory for priv->ptype_lut_dqo, irq_db_array and the counter_array over the old memory. This change ensures
gve: Fix memory leak during reset
Before this change, during reset we were allocating new memory for priv->ptype_lut_dqo, irq_db_array and the counter_array over the old memory. This change ensures we do not allocate new memory during reset and avoid memory leaks.
Signed-off-by: Vee Agarwal <veethebee@google.com> Signed-off-by: Jasper Tran O'Leary <jtranoleary@google.com>
Reviewed by: delphij, markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D48970
show more ...
|
| 40097cd6 | 05-Nov-2024 |
Shailend Chand <shailend@google.com> |
gve: Fix TX livelock
Before this change the transmit taskqueue would enqueue itself when it cannot find space on the NIC ring with the hope that eventually space would be made. This results in the f
gve: Fix TX livelock
Before this change the transmit taskqueue would enqueue itself when it cannot find space on the NIC ring with the hope that eventually space would be made. This results in the following livelock that only occurs after passing ~200Gbps of TCP traffic for many hours:
100% CPU ┌───────────┐wait on ┌──────────┐ ┌───────────┐ │user thread│ cpu │gve xmit │wait on │gve cleanup│ │with mbuf ├────────►│taskqueue ├────────►│taskqueue │ │uma lock │ │ │ NIC ring│ │ └───────────┘ └──────────┘ space └─────┬─────┘ ▲ │ │ wait on mbuf uma lock │ └───────────────────────────────────────────┘
Further details about the livelock are available on https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281560.
After this change, the transmit taskqueue no longer spins till there is room on the NIC ring. It instead stops itself and lets the completion-processing taskqueue wake it up.
Since I'm touching the trasnmit taskqueue I've also corrected the name of a counter and also fixed a bug where EINVAL mbufs were not being freed and were instead living forever on the bufring.
Signed-off-by: Shailend Chand <shailend@google.com> Reviewed-by: markj MFC-after: 2 weeks Differential Revision: https://reviews.freebsd.org/D47138
show more ...
|
| 2348ac89 | 05-Nov-2024 |
Shailend Chand <shailend@google.com> |
gve: Add DQO QPL support
DQO is the descriptor format for our next generation virtual NIC. It is necessary to make full use of the hardware bandwidth on many newer GCP VM shapes.
This patch extends
gve: Add DQO QPL support
DQO is the descriptor format for our next generation virtual NIC. It is necessary to make full use of the hardware bandwidth on many newer GCP VM shapes.
This patch extends the previously introduced DQO descriptor format with a "QPL" mode. QPL stands for Queue Page List and refers to the fact that the hardware cannot access arbitrary regions of the host memory and instead expects a fixed bounce buffer comprising of a list of pages.
The QPL aspects are similar to the already existing GQI queue queue format: in that the mbufs being input in the Rx path have external storage in the form of vm pages attached to them; and in the Tx path we always copy the mbuf payload into QPL pages.
Signed-off-by: Shailend Chand <shailend@google.com> Reviewed-by: markj MFC-after: 2 weeks Differential Revision: https://reviews.freebsd.org/D46691
show more ...
|