Hi Greg, Hi Joe,

dlg@ hinted to me that the ring might overwrite it's own starting
position with the current code.

Does this help?
mbuhl

Index: dev/pci/if_igc.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_igc.c,v
retrieving revision 1.9
diff -u -p -r1.9 if_igc.c
--- dev/pci/if_igc.c    2 Jun 2022 07:41:17 -0000       1.9
+++ dev/pci/if_igc.c    8 Nov 2022 10:35:39 -0000
@@ -978,7 +978,7 @@ igc_start(struct ifqueue *ifq)
        mask = sc->num_tx_desc - 1;
 
        for (;;) {
-               if (free <= IGC_MAX_SCATTER) {
+               if (free <= IGC_MAX_SCATTER + 1) {
                        ifq_set_oactive(ifq);
                        break;
                }
@@ -1005,6 +1005,7 @@ igc_start(struct ifqueue *ifq)
                        /* Consume the first descriptor */
                        prod++;
                        prod &= mask;
+                       free--;
                }
 
                for (i = 0; i < map->dm_nsegs; i++) {

Reply via email to