Author: sephe
Date: Tue Feb 23 09:25:20 2016
New Revision: 295918
URL: https://svnweb.freebsd.org/changeset/base/295918

Log:
  hyperv/hn: Use IFQ_DRV_PREPEND instead of IF_PREPEND
  
  IF_PREPEND promises out-of-order packet sending when the TX desc list
  is depleted. It was overlooked and copied blindly when the transmission
  path was partially rewritten.
  
  MFC after:    1 week
  Sponsored by: Microsoft OSTC
  Differential Revision:        https://reviews.freebsd.org/D5386

Modified:
  head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c

Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
==============================================================================
--- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c  Tue Feb 23 09:22:00 
2016        (r295917)
+++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c  Tue Feb 23 09:25:20 
2016        (r295918)
@@ -998,14 +998,14 @@ hn_start_locked(struct hn_tx_ring *txr, 
                         * dispatch this packet sending (and sending of any
                         * following up packets) to tx taskqueue.
                         */
-                       IF_PREPEND(&ifp->if_snd, m_head);
+                       IFQ_DRV_PREPEND(&ifp->if_snd, m_head);
                        return 1;
                }
 
                txd = hn_txdesc_get(txr);
                if (txd == NULL) {
                        txr->hn_no_txdescs++;
-                       IF_PREPEND(&ifp->if_snd, m_head);
+                       IFQ_DRV_PREPEND(&ifp->if_snd, m_head);
                        atomic_set_int(&ifp->if_drv_flags, IFF_DRV_OACTIVE);
                        break;
                }
@@ -1019,7 +1019,7 @@ hn_start_locked(struct hn_tx_ring *txr, 
                error = hn_send_pkt(ifp, device_ctx, txr, txd);
                if (__predict_false(error)) {
                        /* txd is freed, but m_head is not */
-                       IF_PREPEND(&ifp->if_snd, m_head);
+                       IFQ_DRV_PREPEND(&ifp->if_snd, m_head);
                        atomic_set_int(&ifp->if_drv_flags, IFF_DRV_OACTIVE);
                        break;
                }
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to