Use gettime() instead of assignment from time'. (
time' is too
volatile to use outside of splclock(). microtime() is probably too expensive to use for every i/o. However, setting ifi_lastchange for every i/o is just wrong according to the comment about ifi_lastchange in <net/if.h>. It is set then for atm, fddi and the latest version of ppp.)
This commit is contained in:
parent
04ec9f4541
commit
f3b73cd796
@ -38,7 +38,6 @@
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/mbuf.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
@ -106,7 +105,7 @@ atm_output(ifp, m0, dst, rt0)
|
||||
|
||||
if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING))
|
||||
senderr(ENETDOWN);
|
||||
ifp->if_lastchange = time;
|
||||
gettime(&ifp->if_lastchange);
|
||||
|
||||
/*
|
||||
* check route
|
||||
@ -261,7 +260,7 @@ atm_input(ifp, ah, m, rxhand)
|
||||
m_freem(m);
|
||||
return;
|
||||
}
|
||||
ifp->if_lastchange = time;
|
||||
gettime(&ifp->if_lastchange);
|
||||
ifp->if_ibytes += m->m_pkthdr.len;
|
||||
|
||||
#if NBPFILTER > 0
|
||||
|
@ -33,7 +33,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: if_ethersubr.c,v 1.5 1994/12/13 22:31:45 wollman Exp
|
||||
* $Id: if_fddisubr.c,v 1.20 1997/08/02 14:32:36 bde Exp $
|
||||
* $Id: if_fddisubr.c,v 1.21 1997/10/29 07:59:27 julian Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -145,7 +145,7 @@ fddi_output(ifp, m0, dst, rt0)
|
||||
|
||||
if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING))
|
||||
senderr(ENETDOWN);
|
||||
ifp->if_lastchange = time;
|
||||
gettime(&ifp->if_lastchange);
|
||||
#if !defined(__bsdi__) || _BSDI_VERSION >= 199401
|
||||
if (rt = rt0) {
|
||||
if ((rt->rt_flags & RTF_UP) == 0) {
|
||||
@ -470,7 +470,7 @@ fddi_input(ifp, fh, m)
|
||||
m_freem(m);
|
||||
return;
|
||||
}
|
||||
ifp->if_lastchange = time;
|
||||
gettime(&ifp->if_lastchange);
|
||||
ifp->if_ibytes += m->m_pkthdr.len + sizeof (*fh);
|
||||
if (fh->fddi_dhost[0] & 1) {
|
||||
if (bcmp((caddr_t)fddibroadcastaddr, (caddr_t)fh->fddi_dhost,
|
||||
|
Loading…
Reference in New Issue
Block a user