aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Bowling <kbowling@FreeBSD.org>2026-08-12 03:03:11 +0000
committerKevin Bowling <kbowling@FreeBSD.org>2026-08-12 03:03:11 +0000
commit423927d6c3dc87628fc2a19f25b5b5c07b3b73e2 (patch)
tree2038998bfc2bcb38ac247951a6d0d2ddf5551f06
parent7dd826171b69a01c234ba6e9117917398ba2705e (diff)
igc: Remove invalid debug ring pointer iteration
The debug routine reads queue registers by queue index. It also advanced unused pointers to rings embedded in queue structures. Those pointers had the wrong stride and could proceed beyond the ring object. Remove the unused pointer arithmetic. MFC after: 2 weeks
-rw-r--r--sys/dev/igc/if_igc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c
index 574cab87c305..359cd1d6dc39 100644
--- a/sys/dev/igc/if_igc.c
+++ b/sys/dev/igc/if_igc.c
@@ -3518,8 +3518,6 @@ igc_print_debug_info(struct igc_softc *sc)
{
device_t dev = iflib_get_dev(sc->ctx);
if_t ifp = iflib_get_ifp(sc->ctx);
- struct tx_ring *txr = &sc->tx_queues->txr;
- struct rx_ring *rxr = &sc->rx_queues->rxr;
if (if_getdrvflags(ifp) & IFF_DRV_RUNNING)
printf("Interface is RUNNING ");
@@ -3531,14 +3529,14 @@ igc_print_debug_info(struct igc_softc *sc)
else
printf("and ACTIVE\n");
- for (int i = 0; i < sc->tx_num_queues; i++, txr++) {
+ for (int i = 0; i < sc->tx_num_queues; i++) {
device_printf(dev, "TX Queue %d ------\n", i);
device_printf(dev, "hw tdh = %d, hw tdt = %d\n",
IGC_READ_REG(&sc->hw, IGC_TDH(i)),
IGC_READ_REG(&sc->hw, IGC_TDT(i)));
}
- for (int j=0; j < sc->rx_num_queues; j++, rxr++) {
+ for (int j = 0; j < sc->rx_num_queues; j++) {
device_printf(dev, "RX Queue %d ------\n", j);
device_printf(dev, "hw rdh = %d, hw rdt = %d\n",
IGC_READ_REG(&sc->hw, IGC_RDH(j)),