Add timestamping option SOF_TIMESTAMPING_OPT_TSONLY. For transmit timestamps, this loops timestamps on top of empty packets. Doing so reduces the pressure on SO_RCVBUF. Payload inspection and cmsg reception (aside from timestamps) are no longer possible. This works together with a follow on patch that allows administrators to only allow tx timestamping if it does not loop payload or metadata. Signed-off-by: Willem de Bruijn <willemb@google.com> ---- Changes (rfc -> v1) - add documentation - remove unnecessary skb->len test (thanks to Richard Cochran) Signed-off-by: David S. Miller <davem@davemloft.net>
Showing the changes to include/uapi/linux (1 of 6 files). Show all
Unified · Split
| @@ -24,8 +24,9 @@ enum { · 23 unmodified lines | ||
| 24 | 24 | SOF_TIMESTAMPING_TX_SCHED = (1<<8), |
| 25 | 25 | SOF_TIMESTAMPING_TX_ACK = (1<<9), |
| 26 | 26 | SOF_TIMESTAMPING_OPT_CMSG = (1<<10), |
| 27 | + SOF_TIMESTAMPING_OPT_TSONLY = (1<<11), | |
| 27 | 28 | |
| 28 | − SOF_TIMESTAMPING_LAST = SOF_TIMESTAMPING_OPT_CMSG, | |
| 29 | + SOF_TIMESTAMPING_LAST = SOF_TIMESTAMPING_OPT_TSONLY, | |
| 29 | 30 | SOF_TIMESTAMPING_MASK = (SOF_TIMESTAMPING_LAST - 1) | |
| 30 | 31 | SOF_TIMESTAMPING_LAST |
| 31 | 32 | }; |