aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorWillem de Bruijn <willemb@google.com>2014-07-25 18:01:31 -0400
committerDavid S. Miller <davem@davemloft.net>2014-07-29 14:39:50 -0400
commit68a360e82e55c9b35097e7be7f7991d8f401032f (patch)
tree62ae3d497c487600f8c93bbd541ad763af096e28 /Documentation
parentce7505882122d9fd72159e902b1ca9cc9d896679 (diff)
packet: remove deprecated syststamp timestamp
No device driver will ever return an skb_shared_info structure with syststamp non-zero, so remove the branch that tests for this and optionally marks the packet timestamp as TP_STATUS_TS_SYS_HARDWARE. Do not remove the definition TP_STATUS_TS_SYS_HARDWARE, as processes may refer to it. Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/networking/packet_mmap.txt18
1 files changed, 6 insertions, 12 deletions
diff --git a/Documentation/networking/packet_mmap.txt b/Documentation/networking/packet_mmap.txt
index 38112d512f47..a6d7cb91069e 100644
--- a/Documentation/networking/packet_mmap.txt
+++ b/Documentation/networking/packet_mmap.txt
@@ -1008,14 +1008,9 @@ hardware timestamps to be used. Note: you may need to enable the generation
1008of hardware timestamps with SIOCSHWTSTAMP (see related information from 1008of hardware timestamps with SIOCSHWTSTAMP (see related information from
1009Documentation/networking/timestamping.txt). 1009Documentation/networking/timestamping.txt).
1010 1010
1011PACKET_TIMESTAMP accepts the same integer bit field as 1011PACKET_TIMESTAMP accepts the same integer bit field as SO_TIMESTAMPING:
1012SO_TIMESTAMPING. However, only the SOF_TIMESTAMPING_SYS_HARDWARE 1012
1013and SOF_TIMESTAMPING_RAW_HARDWARE values are recognized by 1013 int req = SOF_TIMESTAMPING_RAW_HARDWARE;
1014PACKET_TIMESTAMP. SOF_TIMESTAMPING_SYS_HARDWARE takes precedence over
1015SOF_TIMESTAMPING_RAW_HARDWARE if both bits are set.
1016
1017 int req = 0;
1018 req |= SOF_TIMESTAMPING_SYS_HARDWARE;
1019 setsockopt(fd, SOL_PACKET, PACKET_TIMESTAMP, (void *) &req, sizeof(req)) 1014 setsockopt(fd, SOL_PACKET, PACKET_TIMESTAMP, (void *) &req, sizeof(req))
1020 1015
1021For the mmap(2)ed ring buffers, such timestamps are stored in the 1016For the mmap(2)ed ring buffers, such timestamps are stored in the
@@ -1023,14 +1018,13 @@ tpacket{,2,3}_hdr structure's tp_sec and tp_{n,u}sec members. To determine
1023what kind of timestamp has been reported, the tp_status field is binary |'ed 1018what kind of timestamp has been reported, the tp_status field is binary |'ed
1024with the following possible bits ... 1019with the following possible bits ...
1025 1020
1026 TP_STATUS_TS_SYS_HARDWARE
1027 TP_STATUS_TS_RAW_HARDWARE 1021 TP_STATUS_TS_RAW_HARDWARE
1028 TP_STATUS_TS_SOFTWARE 1022 TP_STATUS_TS_SOFTWARE
1029 1023
1030... that are equivalent to its SOF_TIMESTAMPING_* counterparts. For the 1024... that are equivalent to its SOF_TIMESTAMPING_* counterparts. For the
1031RX_RING, if none of those 3 are set (i.e. PACKET_TIMESTAMP is not set), 1025RX_RING, if neither is set (i.e. PACKET_TIMESTAMP is not set), then a
1032then this means that a software fallback was invoked *within* PF_PACKET's 1026software fallback was invoked *within* PF_PACKET's processing code (less
1033processing code (less precise). 1027precise).
1034 1028
1035Getting timestamps for the TX_RING works as follows: i) fill the ring frames, 1029Getting timestamps for the TX_RING works as follows: i) fill the ring frames,
1036ii) call sendto() e.g. in blocking mode, iii) wait for status of relevant 1030ii) call sendto() e.g. in blocking mode, iii) wait for status of relevant