socsvn commit: r305828 - soc2016/vincenzo/head/sys/dev/netmap

vincenzo at FreeBSD.org vincenzo at FreeBSD.org
Fri Jul 8 15:44:20 UTC 2016


Author: vincenzo
Date: Fri Jul  8 15:44:18 2016
New Revision: 305828
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=305828

Log:
   freebsd: ptnet_rx_eof: move mhead initialization close to if_input

Modified:
  soc2016/vincenzo/head/sys/dev/netmap/if_ptnet.c

Modified: soc2016/vincenzo/head/sys/dev/netmap/if_ptnet.c
==============================================================================
--- soc2016/vincenzo/head/sys/dev/netmap/if_ptnet.c	Fri Jul  8 15:44:03 2016	(r305827)
+++ soc2016/vincenzo/head/sys/dev/netmap/if_ptnet.c	Fri Jul  8 15:44:18 2016	(r305828)
@@ -1625,17 +1625,8 @@
 			break;
 		}
 
-		mhead->m_pkthdr.rcvif = ifp;
-		mhead->m_pkthdr.len = 0;
-
-                /* No support for checksum offloading for now. */
-		mhead->m_pkthdr.csum_flags = 0;
-
-		/* Store the queue idx in the packet header. */
-		mhead->m_pkthdr.flowid = pq->kring_id;
-		M_HASHTYPE_SET(mhead, M_HASHTYPE_OPAQUE);
-
 		/* Initialize state variables. */
+		mhead->m_pkthdr.len = 0;
 		mtail->m_len = 0;
 
 		/* Scan all the netmap slots containing the current packet. */
@@ -1680,6 +1671,15 @@
 			}
 		}
 
+		mhead->m_pkthdr.rcvif = ifp;
+
+                /* No support for checksum offloading for now. */
+		mhead->m_pkthdr.csum_flags = 0;
+
+		/* Store the queue idx in the packet header. */
+		mhead->m_pkthdr.flowid = pq->kring_id;
+		M_HASHTYPE_SET(mhead, M_HASHTYPE_OPAQUE);
+
 		PTNET_Q_UNLOCK(pq);
 		(*ifp->if_input)(ifp, mhead);
 		PTNET_Q_LOCK(pq);


More information about the svn-soc-all mailing list