svn commit: r220170 - projects/sv/sys/netinet

Attilio Rao attilio at FreeBSD.org
Wed Mar 30 21:21:26 UTC 2011


Author: attilio
Date: Wed Mar 30 21:21:26 2011
New Revision: 220170
URL: http://svn.freebsd.org/changeset/base/220170

Log:
  - Fix a style bug
  - Use the if_transmit() method directly. That enables the multiqueue
    support where available avoiding to bypass the overridden functions.
  
    In critical conditions (panic, or however when the CPUs are stopped)
    a different function needs to be used in order to avoid acquiring the
    locks and allocating the mbufs. It needs to be a shortcut for a direct
    handover of the mbuf.

Modified:
  projects/sv/sys/netinet/netdump_client.c

Modified: projects/sv/sys/netinet/netdump_client.c
==============================================================================
--- projects/sv/sys/netinet/netdump_client.c	Wed Mar 30 20:13:55 2011	(r220169)
+++ projects/sv/sys/netinet/netdump_client.c	Wed Mar 30 21:21:26 2011	(r220170)
@@ -316,21 +316,13 @@ netdump_ether_output(struct mbuf *m, str
 	memcpy(eh->ether_dhost, dst.octet, ETHER_ADDR_LEN);
 	eh->ether_type = htons(etype);
 
-	if (((ifp->if_flags & (IFF_MONITOR|IFF_UP)) != IFF_UP) ||
+	if (((ifp->if_flags & (IFF_MONITOR | IFF_UP)) != IFF_UP) ||
 	    (ifp->if_drv_flags & IFF_DRV_RUNNING) != IFF_DRV_RUNNING) {
 		if_printf(ifp, "netdump_ether_output: Interface isn't up\n");
 		m_freem(m);
 		return (ENETDOWN);
 	}
-
-	if (_IF_QFULL(&ifp->if_snd)) {
-		if_printf(ifp, "netdump_ether_output: TX queue full\n");
-		m_freem(m);
-		return (ENOBUFS);
-	}
-
-	_IF_ENQUEUE(&ifp->if_snd, m);
-	return (0);
+	return ((ifp->if_transmit(ifp, m));
 }
 
 /*


More information about the svn-src-projects mailing list