timestamping updates
Subsystems (4)
cover timestamping updates
From: Willem de Bruijn <[email protected]>
The main goal for this patchset is to allow correlating timestamps with the egress interface. Also introduce a warning, as discussed previously, and update the tests to verify the new feature.
Willem de Bruijn (3):
ipv4: warn once on passing AF_INET6 socket to ip_recv_error
net-timestamp: allow reading recv cmsg on errqueue with origin tstamp
net-timestamp: expand documentation and test
Documentation/networking/timestamping.txt | 33 ++++++-- .../networking/timestamping/txtimestamp.c | 90 +++++++++++++++++++--- include/uapi/linux/net_tstamp.h | 3 +- net/ipv4/ip_sockglue.c | 24 +++++- net/ipv6/datagram.c | 21 ++++- 5 files changed, 146 insertions(+), 25 deletions(-)
Signature · 1 line
2.2.0.rc0.207.ga3a616c
PATCH 1/3 ipv4: warn once on passing AF_INET6 socket to ip_recv_error
From: Willem de Bruijn <[email protected]>
One line change, in response to catching an occurrence of this bug. See also fix f4713a3dfad0 ("net-timestamp: make tcp_recvmsg call ...")
--- net/ipv4/ip_sockglue.c | 2 ++ 1 file changed, 2 insertions(+)
net/ipv4/ip_sockglue.c +2 -0
@@ -414,6 +414,8 @@ int ip_recv_error(struct sock *sk, struct msghdr *msg, int len, int *addr_len)int err;int copied; +WARN_ON_ONCE (sk->sk_family ==AF_INET6 ); + err = -EAGAIN ; skb =sock_dequeue_err_skb (sk);if (skb ==NULL )
Signature · 1 line
2.2.0.rc0.207.ga3a616c
PATCH 3/3 net-timestamp: expand documentation and test
In reply to Willem de BruijnFrom: Willem de Bruijn <[email protected]>
Documentation:
expand explanation of timestamp counter
Test:
new: flag -I requests and prints PKTINFO
new: flag -x prints payload (possibly truncated)
fix: remove pretty print that breaks common flag '-l 1'
--- Documentation/networking/timestamping.txt | 23 ++++-- .../networking/timestamping/txtimestamp.c | 90 +++++++++++++++++++--- 2 files changed, 93 insertions(+), 20 deletions(-)
Documentation/networking/timestamping.txt +15 -8
@@ -130,19 +130,26 @@ SOF_TIMESTAMPING_OPT_ID: have multiple concurrent timestamping requests outstanding. Packets can be reordered in the transmit path, for instance in the packet scheduler. In that case timestamps will be queued onto the error - queue out of order from the original send() calls. This option - embeds a counter that is incremented at send() time, to order - timestamps within a flow. + queue out of order from the original send() calls. It is not always + possible to uniquely match timestamps to the original send() calls + based on timestamp order or payload inspection alone, then. + + This option associates each packet at send() with a unique + identifier and returns that along with the timestamp. The identifier + is derived from a per-socket u32 counter (that wraps). For datagram + sockets, the counter increments with each sent packet. For stream + sockets, it increments with every byte. + + The counter starts at zero. It is initialized the first time that + the socket option is enabled. It is reset each time the option is + enabled after having been disabled. Resetting the counter does not + change the identifiers of existing packets in the system. This option is implemented only for transmit timestamps. There, the timestamp is always looped along with a struct sock_extended_err. The option modifies field ee_data to pass an id that is unique among all possibly concurrently outstanding timestamp requests for - that socket. In practice, it is a monotonically increasing u32 - (that wraps). - - In datagram sockets, the counter increments on each send call. In - stream sockets, it increments with every byte. + that socket. SOF_TIMESTAMPING_OPT_CMSG:
Documentation/networking/timestamping/txtimestamp.c +78 -12
186 lines not on this page · raw message
Signature · 1 line
2.2.0.rc0.207.ga3a616c
Quoted 10 lines · Willem de Bruijn
From: Willem de Bruijn <[email protected]>
The main goal for this patchset is to allow correlating timestamps with the egress interface. Also introduce a warning, as discussed previously, and update the tests to verify the new feature.
Willem de Bruijn (3):
ipv4: warn once on passingAF_INET6socket toip_recv_error
net-timestamp: allow reading recv cmsg on errqueue with origin tstamp
net-timestamp: expand documentation and test
David Miller
maintainerFrom: Willem de Bruijn <[email protected]>
Date: Sun, 30 Nov 2014 22:22:32 -0500
Quoted 3 lines
The main goal for this patchset is to allow correlating timestamps with the egress interface. Also introduce a warning, as discussed previously, and update the tests to verify the new feature.
Series applied, thanks.