Thread (20 messages) flat view 20 messages, 4 authors, 2016-04-03

Re: [PATCH net-next 7/8] sock: enable timestamping using control messages

From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Date: 2016-03-31 03:39:50

On Wed, Mar 30, 2016 at 6:37 PM, Soheil Hassas Yeganeh
[off-list ref] wrote:
From: Soheil Hassas Yeganeh <redacted>

Currently, SOL_TIMESTAMPING can only be enabled using setsockopt.
This is very costly when users want to sample writes to gather
tx timestamps.

Add support for enabling SO_TIMESTAMPING via control messages by
using tsflags added in `struct sockcm_cookie` (added in the previous
patches in this series) to set the tx_flags of the last skb created in
a sendmsg. With this patch, the timestamp recording bits in tx_flags
of the skbuff is overridden if SO_TIMESTAMPING is passed in a cmsg.

Please note that this is only effective for overriding the recording
timestamps flags. Users should enable timestamp reporting (e.g.,
SOF_TIMESTAMPING_SOFTWARE | SOF_TIMESTAMPING_OPT_ID) using
socket options and then should ask for SOF_TIMESTAMPING_TX_*
using control messages per sendmsg to sample timestamps for each
write.

Signed-off-by: Soheil Hassas Yeganeh <redacted>
Acked-by: Willem de Bruijn <willemb@google.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help