diff options
author | lstewart <lstewart@FreeBSD.org> | 2011-12-31 07:21:28 +0000 |
---|---|---|
committer | lstewart <lstewart@FreeBSD.org> | 2011-12-31 07:21:28 +0000 |
commit | 8a799f2a2fc40cc67b9553f01a90520534216440 (patch) | |
tree | 3eb06a535629d68eeeb1840d5bc2d9846632b397 /share | |
parent | b7d764bce757d21a3b1a13fde0c7aad1c902bd9a (diff) | |
download | FreeBSD-src-8a799f2a2fc40cc67b9553f01a90520534216440.zip FreeBSD-src-8a799f2a2fc40cc67b9553f01a90520534216440.tar.gz |
Revert r228986 until it can be reworked to avoid panicing the kernel when the
same interface is attached multiple times with different DLTs, as is done in
net80211 for example.
Reported by: adrian
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man4/bpf.4 | 101 |
1 files changed, 36 insertions, 65 deletions
diff --git a/share/man/man4/bpf.4 b/share/man/man4/bpf.4 index 54d1a59..e69456a 100644 --- a/share/man/man4/bpf.4 +++ b/share/man/man4/bpf.4 @@ -49,7 +49,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 30, 2011 +.Dd June 15, 2010 .Dt BPF 4 .Os .Sh NAME @@ -516,48 +516,61 @@ by default. .It Dv BIOCSTSTAMP .It Dv BIOCGTSTAMP .Pq Li u_int -Set or get the format and resolution of time stamps returned by BPF. -The per-BPF descriptor configuration provided by the -.Dv BIOCSTSTAMP -IOCTL complements the per-interface time stamp configuration detailed in the -.Sx CONFIGURATION -section. -.Pp +Set or get format and resolution of the time stamps returned by BPF. Set to -.Dv BPF_T_MICROTIME +.Dv BPF_T_MICROTIME , +.Dv BPF_T_MICROTIME_FAST , +.Dv BPF_T_MICROTIME_MONOTONIC , or -.Dv BPF_T_MICROTIME_MONOTONIC +.Dv BPF_T_MICROTIME_MONOTONIC_FAST to get time stamps in 64-bit .Vt struct timeval format. Set to -.Dv BPF_T_NANOTIME +.Dv BPF_T_NANOTIME , +.Dv BPF_T_NANOTIME_FAST , +.Dv BPF_T_NANOTIME_MONOTONIC , or -.Dv BPF_T_NANOTIME_MONOTONIC +.Dv BPF_T_NANOTIME_MONOTONIC_FAST to get time stamps in 64-bit .Vt struct timespec format. Set to -.Dv BPF_T_BINTIME +.Dv BPF_T_BINTIME , +.Dv BPF_T_BINTIME_FAST , +.Dv BPF_T_NANOTIME_MONOTONIC , or -.Dv BPF_T_BINTIME_MONOTONIC +.Dv BPF_T_BINTIME_MONOTONIC_FAST to get time stamps in 64-bit .Vt struct bintime format. Set to .Dv BPF_T_NONE -to not set a time stamp. -By default, time stamps are initilized to -.Dv BPF_T_MICROTIME . -.Pp +to ignore time stamp. All 64-bit time stamp formats are wrapped in .Vt struct bpf_ts . The +.Dv BPF_T_MICROTIME_FAST , +.Dv BPF_T_NANOTIME_FAST , +.Dv BPF_T_BINTIME_FAST , +.Dv BPF_T_MICROTIME_MONOTONIC_FAST , +.Dv BPF_T_NANOTIME_MONOTONIC_FAST , +and +.Dv BPF_T_BINTIME_MONOTONIC_FAST +are analogs of corresponding formats without _FAST suffix but do not perform +a full time counter query, so their accuracy is one timer tick. +The .Dv BPF_T_MICROTIME_MONOTONIC , .Dv BPF_T_NANOTIME_MONOTONIC , +.Dv BPF_T_BINTIME_MONOTONIC , +.Dv BPF_T_MICROTIME_MONOTONIC_FAST , +.Dv BPF_T_NANOTIME_MONOTONIC_FAST , and -.Dv BPF_T_BINTIME_MONOTONIC +.Dv BPF_T_BINTIME_MONOTONIC_FAST store the time elapsed since kernel boot. +This setting is initialized to +.Dv BPF_T_MICROTIME +by default. .It Dv BIOCFEEDBACK .Pq Li u_int Set packet feedback mode. @@ -679,14 +692,14 @@ Currently, .Vt bpf_hdr is used when the time stamp is set to .Dv BPF_T_MICROTIME , +.Dv BPF_T_MICROTIME_FAST , .Dv BPF_T_MICROTIME_MONOTONIC , +.Dv BPF_T_MICROTIME_MONOTONIC_FAST , or .Dv BPF_T_NONE -for backward compatibility reasons. -Otherwise, +for backward compatibility reasons. Otherwise, .Vt bpf_xhdr -is used. -However, +is used. However, .Vt bpf_hdr may be deprecated in the near future. Suitable precautions @@ -939,48 +952,6 @@ array initializers: .Fn BPF_STMT opcode operand and .Fn BPF_JUMP opcode operand true_offset false_offset . -.Sh CONFIGURATION -Per-interface BPF time stamp configuration is possible via the -.Va net.bpf.tscfg -.Xr sysctl 8 -tree which provides the following variables: -.Bl -tag -width " " -offset indent -.It Va net.bpf.tscfg.default -The default time stamp configuration setting used by all BPF attached interfaces -which have not been explicitly changed. -Valid values are "none", "fast", "normal" and "external". -The default is "normal". -.It Va net.bpf.tscfg.<interface> -The time stamp configuration setting used by a specific BPF attached interface. -There will be a separate entry in the -.Va net.bpf.tscfg -sysctl tree for each BPF attached interface. -Valid values are "default", "none", "fast", "normal" and "external". -The default is "default", which means the system wide default setting specified -by the -.Va net.bpf.tscfg.default -sysctl is used. -.El -.Pp -The meaning of each per-interface time stamp configuration option is as follows: -.Bl -tag -width " " -offset indent -.It none -Do not generate a time stamp for all packets tapped from this interface. -.It fast -Generate a time stamp for all packets tapped from this interface by doing a fast -read of the system clock. -Fast reads have a granularity equivalent to the underlying kernel tick rate. -.It normal -Generate a time stamp for all packets tapped from this interface by doing a full -read of the system clock. -Full reads are slower than fast reads, but provide full hardware time counter -granularity for the time stamp. -.It external -Something external to BPF is capable of generating time stamps for all packets -tapped from this interface and BPF should use these external time stamps. -Currently unimplemented, but will become useful when drivers for NICs which -support hardware packet time stamping add support for this feature. -.El .Sh FILES .Bl -tag -compact -width /dev/bpf .It Pa /dev/bpf |