Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci/ixgbe Set rxr->next_to_refresh correctly in ixgb...
details: https://anonhg.NetBSD.org/src/rev/e0add39d9dce
branches: trunk
changeset: 1022175:e0add39d9dce
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Wed Jul 07 08:32:51 2021 +0000
description:
Set rxr->next_to_refresh correctly in ixgbe_setup_receive_ring().
ixgbe_setup_receive_ring() fully allocates rx buffers. When a
descriptor ring is full, rxr->next_to_refresh should point to
rxr_next_to_check -1. Before this change, rxr->next_to_refresh
is set to 0 and ixgbe_refresh_mbufs() wastefully loops in
ixgbe_refresh_mbufs() because it means the ring is empty.
diffstat:
sys/dev/pci/ixgbe/ix_txrx.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 39480b42bc4d -r e0add39d9dce sys/dev/pci/ixgbe/ix_txrx.c
--- a/sys/dev/pci/ixgbe/ix_txrx.c Wed Jul 07 03:30:35 2021 +0000
+++ b/sys/dev/pci/ixgbe/ix_txrx.c Wed Jul 07 08:32:51 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ix_txrx.c,v 1.79 2021/05/27 06:11:34 msaitoh Exp $ */
+/* $NetBSD: ix_txrx.c,v 1.80 2021/07/07 08:32:51 msaitoh Exp $ */
/******************************************************************************
@@ -64,7 +64,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.79 2021/05/27 06:11:34 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.80 2021/07/07 08:32:51 msaitoh Exp $");
#include "opt_inet.h"
#include "opt_inet6.h"
@@ -1577,7 +1577,7 @@
/* Setup our descriptor indices */
rxr->next_to_check = 0;
- rxr->next_to_refresh = 0;
+ rxr->next_to_refresh = adapter->num_rx_desc - 1; /* Fully allocated */
rxr->lro_enabled = FALSE;
rxr->rx_copies.ev_count = 0;
#if 0 /* NetBSD */
Home |
Main Index |
Thread Index |
Old Index