git: 423927d6c3dc - main - igc: Remove invalid debug ring pointer iteration

From: Kevin Bowling <kbowling_at_FreeBSD.org>
Date: Wed, 12 Aug 2026 03:03:42 UTC
The branch main has been updated by kbowling:

URL: https://cgit.FreeBSD.org/src/commit/?id=423927d6c3dc87628fc2a19f25b5b5c07b3b73e2

commit 423927d6c3dc87628fc2a19f25b5b5c07b3b73e2
Author:     Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2026-08-12 03:03:11 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2026-08-12 03:03:11 +0000

    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
---
 sys/dev/igc/if_igc.c | 6 ++----
 1 file 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)),