Index: sys/net/bpf.c =================================================================== --- sys/net/bpf.c (revision 227813) +++ sys/net/bpf.c (working copy) @@ -1825,6 +1825,9 @@ { struct m_tag *tag; int quality; +#ifdef FFCLOCK + int ff_flags; +#endif quality = bpf_ts_quality(tstype); if (quality == BPF_TSTAMP_NONE) @@ -1837,31 +1840,32 @@ return (BPF_TSTAMP_EXTERN); } } - if (quality == BPF_TSTAMP_NORMAL) { + #ifdef FFCLOCK - if ((tstype & BPF_T_FFCLOCK) == 0) { - ffclock_read_counter(ffcount); -#endif - binuptime(bt); -#ifdef FFCLOCK + if (tstype & BPF_T_FFCLOCK) { + ff_flags = FFCLOCK_LERP; + if (quality == BPF_TSTAMP_NORMAL) { + if (tstype & BPF_T_MONOTONIC) + ff_flags |= FFCLOCK_UPTIME; + else + ff_flags |= FFCLOCK_LEAPSEC; } else { - if ((tstype & BPF_T_MONOTONIC) == 0) - ffclock_abstime(ffcount, bt, NULL, - (FFCLOCK_LERP | FFCLOCK_LEAPSEC)); - else - ffclock_abstime(ffcount, bt, NULL, - (FFCLOCK_LERP | FFCLOCK_UPTIME)); + ff_flags |= FFCLOCK_LEAPSEC | FFCLOCK_FAST; } + ffclock_abstime(ffcount, bt, NULL, ff_flags); + } else { #endif - } else { + if (quality == BPF_TSTAMP_NORMAL) + binuptime(bt); + else + getbinuptime(bt); #ifdef FFCLOCK - if ((tstype & BPF_T_FFCLOCK) == BPF_T_FFCLOCK) - ffclock_abstime(ffcount, bt, NULL, - (FFCLOCK_LERP | FFCLOCK_LEAPSEC | FFCLOCK_FAST)); - else +#ifdef BPF_FFCOUNTER + ffclock_read_counter(ffcount); #endif - getbinuptime(bt); } +#endif + return (quality); }