Author: np
Date: Thu Jun  5 00:38:32 2014
New Revision: 267082
URL: http://svnweb.freebsd.org/changeset/base/267082

Log:
  cxgbe(4):  Properly account for the freelist buffers used when returning
  early from service_iq due to a budget restriction.  This fixes a potential
  rx hang when using INTx.
  
  MFC after:    3 days

Modified:
  head/sys/dev/cxgbe/t4_sge.c

Modified: head/sys/dev/cxgbe/t4_sge.c
==============================================================================
--- head/sys/dev/cxgbe/t4_sge.c Wed Jun  4 21:17:51 2014        (r267081)
+++ head/sys/dev/cxgbe/t4_sge.c Thu Jun  5 00:38:32 2014        (r267082)
@@ -1424,8 +1424,15 @@ service_iq(struct sge_iq *iq, int budget
                                }
 #endif
 
-                               if (budget)
+                               if (budget) {
+                                       if (fl_bufs_used) {
+                                               FL_LOCK(fl);
+                                               fl->needed += fl_bufs_used;
+                                               refill_fl(sc, fl, 32);
+                                               FL_UNLOCK(fl);
+                                       }
                                        return (EINPROGRESS);
+                               }
                        }
                }
 
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to