Date: Wed, 30 Mar 2011 21:21:26 +0000 (UTC) From: Attilio Rao <attilio@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r220170 - projects/sv/sys/netinet Message-ID: <201103302121.p2ULLQmo081238@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)); } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201103302121.p2ULLQmo081238>