<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/gve, branch stable/14</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>gve: Relax a static assertion</title>
<updated>2025-06-30T14:19:31+00:00</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2025-06-14T12:17:49+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c6e0defd489fb139e753435ccb7ecb722e9ae499'/>
<id>c6e0defd489fb139e753435ccb7ecb722e9ae499</id>
<content type='text'>
It's okay if MCLBYTES is larger than the default receive buffer size.

Fixes:	71702df61262 ("gve: Add support for 4k RX Buffers when using DQO queue formats")

(cherry picked from commit 3b4bc5d70e1c2066fcb6e8535941258c88999fa2)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's okay if MCLBYTES is larger than the default receive buffer size.

Fixes:	71702df61262 ("gve: Add support for 4k RX Buffers when using DQO queue formats")

(cherry picked from commit 3b4bc5d70e1c2066fcb6e8535941258c88999fa2)
</pre>
</div>
</content>
</entry>
<entry>
<title>gve: Add support for 4k RX Buffers when using DQO queue formats</title>
<updated>2025-06-30T14:19:31+00:00</updated>
<author>
<name>Vee Agarwal</name>
<email>veethebee@google.com</email>
</author>
<published>2025-06-13T17:52:25+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=fc03742b2512127a403b7624b49ce4a94fd26244'/>
<id>fc03742b2512127a403b7624b49ce4a94fd26244</id>
<content type='text'>
This change adds support for using 4K RX Buffers when using DQO queue
formats when a boot-time tunable flag is set to true by the user.
When this flag is enabled, the driver will use 4K RX Buffer size either
when HW LRO is enabled or mtu &gt; 2048.

Signed-off-by: Vee Agarwal &lt;veethebee@google.com&gt;

Reviewed by:	markj, ziaee
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D50786

(cherry picked from commit 71702df6126226b31dc3ec66459388e32b993be1)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change adds support for using 4K RX Buffers when using DQO queue
formats when a boot-time tunable flag is set to true by the user.
When this flag is enabled, the driver will use 4K RX Buffer size either
when HW LRO is enabled or mtu &gt; 2048.

Signed-off-by: Vee Agarwal &lt;veethebee@google.com&gt;

Reviewed by:	markj, ziaee
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D50786

(cherry picked from commit 71702df6126226b31dc3ec66459388e32b993be1)
</pre>
</div>
</content>
</entry>
<entry>
<title>gve: Fix timestamp invalidation for DQO queue formats</title>
<updated>2025-06-20T12:47:27+00:00</updated>
<author>
<name>Jasper Tran O'Leary</name>
<email>jtranoleary@google.com</email>
</author>
<published>2025-06-05T17:21:06+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f3ab96aeb509c4c645e5e3ea63ec2f1002a2c070'/>
<id>f3ab96aeb509c4c645e5e3ea63ec2f1002a2c070</id>
<content type='text'>
We need to invalidate timestamps when a TX queue is cleared so that the
TX timeout detection callout does not mistakenly fire for cleared
packets. When using DQO queue formats, timestamps are set on the pending
packet array whose length is not the same as the length of the
descriptor ring itself. This commit fixes logic which invalidated the
wrong number of pending packets.

Signed-off-by: Jasper Tran O'Leary &lt;jtranoleary@google.com&gt;

Fixes:		3d2957336c7d ("gve: Add callout to detect and handle TX timeouts")
Reviewed by:	markj
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D50688

(cherry picked from commit 46fce000843215ff3d574d1c24fc24771975973e)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We need to invalidate timestamps when a TX queue is cleared so that the
TX timeout detection callout does not mistakenly fire for cleared
packets. When using DQO queue formats, timestamps are set on the pending
packet array whose length is not the same as the length of the
descriptor ring itself. This commit fixes logic which invalidated the
wrong number of pending packets.

Signed-off-by: Jasper Tran O'Leary &lt;jtranoleary@google.com&gt;

Fixes:		3d2957336c7d ("gve: Add callout to detect and handle TX timeouts")
Reviewed by:	markj
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D50688

(cherry picked from commit 46fce000843215ff3d574d1c24fc24771975973e)
</pre>
</div>
</content>
</entry>
<entry>
<title>gve: Add callout to detect and handle TX timeouts</title>
<updated>2025-06-20T12:46:09+00:00</updated>
<author>
<name>Jasper Tran O'Leary</name>
<email>jtranoleary@google.com</email>
</author>
<published>2025-05-20T23:34:45+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f7a5aab53f26f364def01e3006dd9ef7c90f9ab8'/>
<id>f7a5aab53f26f364def01e3006dd9ef7c90f9ab8</id>
<content type='text'>
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 &lt;jtranoleary@google.com&gt;

Reviewed by:	markj, ziaee
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D50385

(cherry picked from commit 3d2957336c7ddaa0a29cf60cfd458c07df1f5be9)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;jtranoleary@google.com&gt;

Reviewed by:	markj, ziaee
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D50385

(cherry picked from commit 3d2957336c7ddaa0a29cf60cfd458c07df1f5be9)
</pre>
</div>
</content>
</entry>
<entry>
<title>gve: Use load-acquire to fetch generation bits</title>
<updated>2025-06-20T12:46:09+00:00</updated>
<author>
<name>Jasper Tran O'Leary</name>
<email>jtranoleary@google.com</email>
</author>
<published>2025-05-20T23:34:44+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=4e8531ec2633ea101fa29c09acf73f48cf2bcc17'/>
<id>4e8531ec2633ea101fa29c09acf73f48cf2bcc17</id>
<content type='text'>
When running the driver using the DQO queue format, we must load the
generation bit and check it before possibly reading the rest of the
descriptor's fields.

Previously, we guarded against reordering of reads using an explicit
thread fence. This commit changes the thread fence to a load with
acquire semantics. Because the tx and rx generation fields are in a
bitfield, we cannot explicitly address them in an atomic load. Instead
we load the respective containing bytes in the descriptor and mask them
appropriately.

Signed-off-by: Jasper Tran O'Leary &lt;jtranoleary@google.com&gt;

Reviewed by:	markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D50384

(cherry picked from commit b044f125373e05c20ca16edfd29cccad1f4025bd)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When running the driver using the DQO queue format, we must load the
generation bit and check it before possibly reading the rest of the
descriptor's fields.

Previously, we guarded against reordering of reads using an explicit
thread fence. This commit changes the thread fence to a load with
acquire semantics. Because the tx and rx generation fields are in a
bitfield, we cannot explicitly address them in an atomic load. Instead
we load the respective containing bytes in the descriptor and mask them
appropriately.

Signed-off-by: Jasper Tran O'Leary &lt;jtranoleary@google.com&gt;

Reviewed by:	markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D50384

(cherry picked from commit b044f125373e05c20ca16edfd29cccad1f4025bd)
</pre>
</div>
</content>
</entry>
<entry>
<title>gve: Add feature to change TX/RX ring size</title>
<updated>2025-04-18T13:52:10+00:00</updated>
<author>
<name>Vee Agarwal</name>
<email>veethebee@google.com</email>
</author>
<published>2025-04-04T22:53:33+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=9a24acc6c8a6cc707572251902e12b5616e6afbd'/>
<id>9a24acc6c8a6cc707572251902e12b5616e6afbd</id>
<content type='text'>
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 &lt;veethebee@google.com&gt;

Reviewed by:	markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D49428

(cherry picked from commit 22fe926a62b7bca771d46502dd6a8c202f25b5be)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;veethebee@google.com&gt;

Reviewed by:	markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D49428

(cherry picked from commit 22fe926a62b7bca771d46502dd6a8c202f25b5be)
</pre>
</div>
</content>
</entry>
<entry>
<title>gve: Add feature to adjust RX/TX queue counts</title>
<updated>2025-04-18T13:52:09+00:00</updated>
<author>
<name>Vee Agarwal</name>
<email>veethebee@google.com</email>
</author>
<published>2025-04-04T22:53:32+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=ecc250c60049f0fbf80fb0d49db1fd5a70cf198f'/>
<id>ecc250c60049f0fbf80fb0d49db1fd5a70cf198f</id>
<content type='text'>
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 &lt;veethebee@google.com&gt;

Reviewed by:	markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D49427

(cherry picked from commit e0464f74d5579e1538ce741b0a15e6604dbc53c4)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;veethebee@google.com&gt;

Reviewed by:	markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D49427

(cherry picked from commit e0464f74d5579e1538ce741b0a15e6604dbc53c4)
</pre>
</div>
</content>
</entry>
<entry>
<title>gve: Allocate qpl per ring at ring allocation time</title>
<updated>2025-04-18T13:52:07+00:00</updated>
<author>
<name>Vee Agarwal</name>
<email>veethebee@google.com</email>
</author>
<published>2025-04-04T22:53:31+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=890309a67b50c3b87f12e33bcc157e0757497ad3'/>
<id>890309a67b50c3b87f12e33bcc157e0757497ad3</id>
<content type='text'>
Every tx and rx ring has its own queue-page-list (QPL) that serves as
the bounce buffer. Previously we were allocating QPLs for all queues
before the queues themselves were allocated and later associating a QPL
with a queue. This is avoidable complexity: it is much more natural for
each queue to allocate and free its own QPL.

Signed-off-by: Vee Agarwal &lt;veethebee@google.com&gt;

Reviewed by:	markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D49426

(cherry picked from commit f8ed8382daf4b9a97056b1dba4fe4e5cb4f7485c)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Every tx and rx ring has its own queue-page-list (QPL) that serves as
the bounce buffer. Previously we were allocating QPLs for all queues
before the queues themselves were allocated and later associating a QPL
with a queue. This is avoidable complexity: it is much more natural for
each queue to allocate and free its own QPL.

Signed-off-by: Vee Agarwal &lt;veethebee@google.com&gt;

Reviewed by:	markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D49426

(cherry picked from commit f8ed8382daf4b9a97056b1dba4fe4e5cb4f7485c)
</pre>
</div>
</content>
</entry>
<entry>
<title>gve: Fix qpl_buf_head being initialized improperly</title>
<updated>2025-03-07T22:51:48+00:00</updated>
<author>
<name>Jasper Tran O'Leary</name>
<email>jtranoleary@google.com</email>
</author>
<published>2025-02-14T15:05:46+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=875ec35c0661ac2dfd07c64b4ccf5860b1c08fc8'/>
<id>875ec35c0661ac2dfd07c64b4ccf5860b1c08fc8</id>
<content type='text'>
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 &lt;veethebee@google.com&gt;
Signed-off-by: Jasper Tran O'Leary &lt;jtranoleary@google.com&gt;

Reviewed by:	delphij, markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D48968

(cherry picked from commit 73c3fe4db3ebc2bd6cb732aae77ea017fd376d22)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;veethebee@google.com&gt;
Signed-off-by: Jasper Tran O'Leary &lt;jtranoleary@google.com&gt;

Reviewed by:	delphij, markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D48968

(cherry picked from commit 73c3fe4db3ebc2bd6cb732aae77ea017fd376d22)
</pre>
</div>
</content>
</entry>
<entry>
<title>gve: Do minor cleanup and bump version</title>
<updated>2025-03-07T22:51:48+00:00</updated>
<author>
<name>Jasper Tran O'Leary</name>
<email>jtranoleary@google.com</email>
</author>
<published>2025-02-14T15:04:16+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=28ba212a95f271746a8a22b891dd76ae6e3459e1'/>
<id>28ba212a95f271746a8a22b891dd76ae6e3459e1</id>
<content type='text'>
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 &lt;veethebee@google.com&gt;
Signed-off-by: Vee Agarwal &lt;veethebee@google.com&gt;
Signed-off-by: Jasper Tran O'Leary &lt;jtranoleary@google.com&gt;

Reviewed by:	delphij, markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D48969

(cherry picked from commit 031800c786823a9ad4c4d2f79f217d42dad3f5d1)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;veethebee@google.com&gt;
Signed-off-by: Vee Agarwal &lt;veethebee@google.com&gt;
Signed-off-by: Jasper Tran O'Leary &lt;jtranoleary@google.com&gt;

Reviewed by:	delphij, markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D48969

(cherry picked from commit 031800c786823a9ad4c4d2f79f217d42dad3f5d1)
</pre>
</div>
</content>
</entry>
</feed>
