From: Soheil Hassas Yeganeh <soheil.kdev@gmail.com>
To: davem@davemloft.net, netdev@vger.kernel.org
Cc: willemb@google.com, edumazet@google.com, ycheng@google.com,
ncardwell@google.com, kafai@fb.com,
Soheil Hassas Yeganeh <soheil@google.com>
Subject: [PATCH v3 net-next 0/8] add TX timestamping via cmsg
Date: Sat, 2 Apr 2016 23:08:05 -0400 [thread overview]
Message-ID: <1459652893-14207-1-git-send-email-soheil.kdev@gmail.com> (raw)
From: Soheil Hassas Yeganeh <soheil@google.com>
This patch series aim at enabling TX timestamping via cmsg.
Currently, to occasionally sample TX timestamping on a socket,
applications need to call setsockopt twice: first for enabling
timestamps and then for disabling them. This is an unnecessary
overhead. With cmsg, in contrast, applications can sample TX
timestamps per sendmsg().
This patch series adds the code for processing SO_TIMESTAMPING
for cmsg's of the SOL_SOCKET level, and adds the glue code for
TCP, UDP, and RAW for both IPv4 and IPv6. This implementation
supports overriding timestamp generation flags (i.e.,
SOF_TIMESTAMPING_TX_*) but not timestamp reporting flags.
Applications must still enable timestamp reporting via
setsockopt to receive timestamps.
This series does not change existing timestamping behavior for
applications that are using socket options.
I will follow up with another patch to enable timestamping for
active TFO (client-side TCP Fast Open) and also setting packet
mark via cmsgs.
Thanks!
Changes in v2:
- Replace u32 with __u32 in the documentation.
Changes in v3:
- Fix the broken build for L2TP (due to changes
in IPv6).
Soheil Hassas Yeganeh (7):
tcp: accept SOF_TIMESTAMPING_OPT_ID for passive TFO
tcp: use one bit in TCP_SKB_CB to mark ACK timestamps
sock: accept SO_TIMESTAMPING flags in socket cmsg
ipv4: process socket-level control messages in IPv4
ipv6: process socket-level control messages in IPv6
sock: enable timestamping using control messages
sock: document timestamping via cmsg in Documentation
Willem de Bruijn (1):
sock: break up sock_cmsg_snd into __sock_cmsg_snd and loop
Documentation/networking/timestamping.txt | 48 ++++++++++++++++++++++++++++--
drivers/net/tun.c | 3 +-
include/net/ip.h | 3 +-
include/net/ipv6.h | 6 ++--
include/net/sock.h | 13 +++++---
include/net/tcp.h | 3 +-
include/net/transp_v6.h | 3 +-
include/uapi/linux/net_tstamp.h | 10 +++++++
net/can/raw.c | 2 +-
net/core/sock.c | 49 +++++++++++++++++++++++--------
net/ipv4/ip_sockglue.c | 9 +++++-
net/ipv4/ping.c | 7 +++--
net/ipv4/raw.c | 13 ++++----
net/ipv4/tcp.c | 22 ++++++++++----
net/ipv4/tcp_input.c | 2 +-
net/ipv4/udp.c | 10 +++----
net/ipv6/datagram.c | 9 +++++-
net/ipv6/icmp.c | 6 ++--
net/ipv6/ip6_flowlabel.c | 3 +-
net/ipv6/ip6_output.c | 15 ++++++----
net/ipv6/ipv6_sockglue.c | 3 +-
net/ipv6/ping.c | 3 +-
net/ipv6/raw.c | 7 +++--
net/ipv6/udp.c | 10 +++++--
net/l2tp/l2tp_ip6.c | 10 ++++---
net/packet/af_packet.c | 30 +++++++++++++++----
net/socket.c | 10 +++----
27 files changed, 231 insertions(+), 78 deletions(-)
--
2.8.0.rc3.226.g39d4020
next reply other threads:[~2016-04-03 3:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-03 3:08 Soheil Hassas Yeganeh [this message]
2016-04-03 3:08 ` [PATCH v3 net-next 1/8] sock: break up sock_cmsg_snd into __sock_cmsg_snd and loop Soheil Hassas Yeganeh
2016-04-03 3:08 ` [PATCH v3 net-next 2/8] tcp: accept SOF_TIMESTAMPING_OPT_ID for passive TFO Soheil Hassas Yeganeh
2016-04-03 3:08 ` [PATCH v3 net-next 3/8] tcp: use one bit in TCP_SKB_CB to mark ACK timestamps Soheil Hassas Yeganeh
2016-04-03 3:08 ` [PATCH v3 net-next 4/8] sock: accept SO_TIMESTAMPING flags in socket cmsg Soheil Hassas Yeganeh
2016-04-03 3:08 ` [PATCH v3 net-next 5/8] ipv4: process socket-level control messages in IPv4 Soheil Hassas Yeganeh
2016-04-03 3:08 ` [PATCH v3 net-next 6/8] ipv6: process socket-level control messages in IPv6 Soheil Hassas Yeganeh
2016-04-03 3:08 ` [PATCH v3 net-next 7/8] sock: enable timestamping using control messages Soheil Hassas Yeganeh
2016-04-04 19:52 ` [PATCH v3 net-next 0/8] add TX timestamping via cmsg David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1459652893-14207-1-git-send-email-soheil.kdev@gmail.com \
--to=soheil.kdev@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kafai@fb.com \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=soheil@google.com \
--cc=willemb@google.com \
--cc=ycheng@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).