Skip to content

Commit 1cc1f1c

Browse files
committed
[gve] Report only packet completions for the transmit ring
The hardware reports descriptor and packet completions separately for the transmit ring. We currently ignore descriptor completions (since we cannot free up the transmit buffers in the queue page list and advance the consumer counter until the packet has also completed). Now that transmit completions are written out immediately (instead of being delayed until 128 bytes of completions are available), there is no value in retaining the descriptor completions. Omit descriptor completions entirely, and reduce the transmit fill level back down to its original value. Signed-off-by: Michael Brown <[email protected]>
1 parent d2e1e59 commit 1cc1f1c

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

src/drivers/net/gve.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1422,8 +1422,7 @@ static int gve_transmit ( struct net_device *netdev, struct io_buffer *iobuf ) {
14221422
cpu_to_le64 ( gve_address ( tx, tag ) );
14231423
if ( next == len ) {
14241424
dqo->type = ( GVE_DQO_TX_TYPE_PACKET |
1425-
GVE_DQO_TX_TYPE_LAST |
1426-
GVE_DQO_TX_TYPE_REPORT );
1425+
GVE_DQO_TX_TYPE_LAST );
14271426
dqo->tag.id = tag;
14281427
dqo->tag.count = count;
14291428
} else {

src/drivers/net/gve.h

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -543,14 +543,9 @@ struct gve_qpl {
543543
/**
544544
* Maximum number of transmit buffers
545545
*
546-
* This is a policy decision. Experiments suggest that out-of-order
547-
* transmit queues will write completions only in batches of 128
548-
* bytes, comprising 8 descriptor completions and 8 packet
549-
* completions. The transmit fill level must therefore be greater
550-
* than 8, so that completions will be written out before the transmit
551-
* ring runs out of space.
546+
* This is a policy decision.
552547
*/
553-
#define GVE_TX_FILL 16
548+
#define GVE_TX_FILL 8
554549

555550
/** Transmit queue page list ID */
556551
#define GVE_TX_QPL 0x18ae5458
@@ -624,9 +619,6 @@ struct gve_dqo_tx_descriptor {
624619
/** Last transmit descriptor in a packet */
625620
#define GVE_DQO_TX_TYPE_LAST 0x20
626621

627-
/** Report transmit completion */
628-
#define GVE_DQO_TX_TYPE_REPORT 0x80
629-
630622
/** An out-of-order transmit completion */
631623
struct gve_dqo_tx_completion {
632624
/** Reserved */

0 commit comments

Comments
 (0)