diff options
Diffstat (limited to 'Documentation/networking')
-rw-r--r-- | Documentation/networking/packet_mmap.txt | 2 | ||||
-rw-r--r-- | Documentation/networking/timestamping.txt | 52 |
2 files changed, 33 insertions, 21 deletions
diff --git a/Documentation/networking/packet_mmap.txt b/Documentation/networking/packet_mmap.txt index 1404674c0a02..6fea79efb4cb 100644 --- a/Documentation/networking/packet_mmap.txt +++ b/Documentation/networking/packet_mmap.txt | |||
@@ -453,7 +453,7 @@ TP_STATUS_COPY : This flag indicates that the frame (and associated | |||
453 | enabled previously with setsockopt() and | 453 | enabled previously with setsockopt() and |
454 | the PACKET_COPY_THRESH option. | 454 | the PACKET_COPY_THRESH option. |
455 | 455 | ||
456 | The number of frames than can be buffered to | 456 | The number of frames that can be buffered to |
457 | be read with recvfrom is limited like a normal socket. | 457 | be read with recvfrom is limited like a normal socket. |
458 | See the SO_RCVBUF option in the socket (7) man page. | 458 | See the SO_RCVBUF option in the socket (7) man page. |
459 | 459 | ||
diff --git a/Documentation/networking/timestamping.txt b/Documentation/networking/timestamping.txt index 661d3c316a17..048c92b487f6 100644 --- a/Documentation/networking/timestamping.txt +++ b/Documentation/networking/timestamping.txt | |||
@@ -21,26 +21,38 @@ has such a feature). | |||
21 | 21 | ||
22 | SO_TIMESTAMPING: | 22 | SO_TIMESTAMPING: |
23 | 23 | ||
24 | Instructs the socket layer which kind of information is wanted. The | 24 | Instructs the socket layer which kind of information should be collected |
25 | parameter is an integer with some of the following bits set. Setting | 25 | and/or reported. The parameter is an integer with some of the following |
26 | other bits is an error and doesn't change the current state. | 26 | bits set. Setting other bits is an error and doesn't change the current |
27 | 27 | state. | |
28 | SOF_TIMESTAMPING_TX_HARDWARE: try to obtain send time stamp in hardware | 28 | |
29 | SOF_TIMESTAMPING_TX_SOFTWARE: if SOF_TIMESTAMPING_TX_HARDWARE is off or | 29 | Four of the bits are requests to the stack to try to generate |
30 | fails, then do it in software | 30 | timestamps. Any combination of them is valid. |
31 | SOF_TIMESTAMPING_RX_HARDWARE: return the original, unmodified time stamp | 31 | |
32 | as generated by the hardware | 32 | SOF_TIMESTAMPING_TX_HARDWARE: try to obtain send time stamps in hardware |
33 | SOF_TIMESTAMPING_RX_SOFTWARE: if SOF_TIMESTAMPING_RX_HARDWARE is off or | 33 | SOF_TIMESTAMPING_TX_SOFTWARE: try to obtain send time stamps in software |
34 | fails, then do it in software | 34 | SOF_TIMESTAMPING_RX_HARDWARE: try to obtain receive time stamps in hardware |
35 | SOF_TIMESTAMPING_RAW_HARDWARE: return original raw hardware time stamp | 35 | SOF_TIMESTAMPING_RX_SOFTWARE: try to obtain receive time stamps in software |
36 | SOF_TIMESTAMPING_SYS_HARDWARE: return hardware time stamp transformed to | 36 | |
37 | the system time base | 37 | The other three bits control which timestamps will be reported in a |
38 | SOF_TIMESTAMPING_SOFTWARE: return system time stamp generated in | 38 | generated control message. If none of these bits are set or if none of |
39 | software | 39 | the set bits correspond to data that is available, then the control |
40 | 40 | message will not be generated: | |
41 | SOF_TIMESTAMPING_TX/RX determine how time stamps are generated. | 41 | |
42 | SOF_TIMESTAMPING_RAW/SYS determine how they are reported in the | 42 | SOF_TIMESTAMPING_SOFTWARE: report systime if available |
43 | following control message: | 43 | SOF_TIMESTAMPING_SYS_HARDWARE: report hwtimetrans if available |
44 | SOF_TIMESTAMPING_RAW_HARDWARE: report hwtimeraw if available | ||
45 | |||
46 | It is worth noting that timestamps may be collected for reasons other | ||
47 | than being requested by a particular socket with | ||
48 | SOF_TIMESTAMPING_[TR]X_(HARD|SOFT)WARE. For example, most drivers that | ||
49 | can generate hardware receive timestamps ignore | ||
50 | SOF_TIMESTAMPING_RX_HARDWARE. It is still a good idea to set that flag | ||
51 | in case future drivers pay attention. | ||
52 | |||
53 | If timestamps are reported, they will appear in a control message with | ||
54 | cmsg_level==SOL_SOCKET, cmsg_type==SO_TIMESTAMPING, and a payload like | ||
55 | this: | ||
44 | 56 | ||
45 | struct scm_timestamping { | 57 | struct scm_timestamping { |
46 | struct timespec systime; | 58 | struct timespec systime; |