netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Willem de Bruijn <willemb@google.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, eric.dumazet@gmail.com,
	richardcochran@gmail.com, Willem de Bruijn <willemb@google.com>
Subject: [PATCH net-next v4 0/6] net-timestamp: new tx tstamps and tcp
Date: Mon,  4 Aug 2014 22:11:44 -0400	[thread overview]
Message-ID: <1407204710-21778-1-git-send-email-willemb@google.com> (raw)

Extend socket tx timestamping:
- allow multiple types of software timestamps aside from send (1)
- add software timestamp on enter packet scheduling (4)
- add software timestamp for TCP (5)
- add software timestamp for TCP on ACK (6)

The sk_flags option space is nearly exhausted. Also move the
many timestamp options to a new sk->sk_tstamps (2).

To disambiguate data when tstamps may arrive out of order,
optionally return a sequential ID assigned at send (3).

Extend Linux tx timestamping to monitoring of latency
incurred within the kernel stack and to protocols embedded in TCP.
Complex kernel setups may have multiple layers of queueing, including
multiple instances of packet scheduling, and many classes per layer.
Many applications embed discrete payloads into TCP bytestreams for
reliability, flow control, etcetera. Detecting application tail
latency in such scenarios relies on identifying the exact queue
responsible if on the host, or the network latency if otherwise.

Changelog:
v4->v5
  - define SCM_TSTAMP_SND == 0, for legacy behavior
  - add TCP tstamps without changing the generated byte stream
    - modify GSO and ACK to find offset: slightly more complex
      than previous invariant that it is the last byte
  - consistent naming of packet scheduling
    - rename SCM_TSTAMP_ENQ to SCM_TSTAMP_SCHED
  - add unique key in ee_data
  - add id field in ee_info to disambiguate tstamps
    - optional, only on new flag SOF_TIMESTAMPING_OPT_ID
    - for bytestream, in bytes

v3->v4
  - (v3 review comment) removed skb->mark packet identification (*A)
  - (v3 review comment) fixed indentation
  - tcp: fixed poll() to return POLLERR on non-zero queue
  - rebased to work without syststamp
  - comments: removed all traces of MSG_TSTAMP_.. (*B)

v2->v3
  - extend the SO_TIMESTAMPING API, instead of defining a new one.
  - add protocol independent support to correlate tstamps with data,
    based on returning skb->mark.
  - removed no-payload optimization and documentation (for now):

    I have a follow-on patch that reintroduces MSG_TSTAMP along with a
    new socket option SOF_TIMESTAMPING_OPT_ONFLAG. This is equivalent
    to sequence setsockopt(<enable>); send(..); setsockopt(<disable>),
    but avoids the need to define a MSG_TSTAMP_<TYPE> for each type.

    I will leave these three patches as follow-on, as this patchset is
    large enough as is.

v1->v2
  - expand timestamping (existing and new) to SOCK_RAW and ping sockets
  - rename sock_errqueue_timestamping to scm_timestamping
  - change timestamp data format: do not add fields to scm_timestamping.
      Doing so could break legacy applications. Instead, communicate
      through an existing, but unused, field in the error message.
  - rename SOF_.._OPT_TX_NO_PAYLOAD to shorter SOF_.._OPT_TSONLY
  - move msg_tstamp test app out of patchset and to github
      git://github.com/wdebruij/kerneltools.git


Willem de Bruijn (6):
  net-timestamp: extend SCM_TIMESTAMPING ancillary data struct
  net-timestamp: move timestamp flags out of sk_flags
  net-timestamp: add key to disambiguate concurrent datagrams
  net-timestamp: SCHED timestamp on entering packet scheduler
  net-timestamp: TCP timestamping
  net-timestamp: ACK timestamp for bytestreams

-- 
2.0.0.526.g5318336

             reply	other threads:[~2014-08-05  2:11 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-05  2:11 Willem de Bruijn [this message]
2014-08-05  2:11 ` [PATCH net-next v4 1/6] net-timestamp: extend SCM_TIMESTAMPING ancillary data struct Willem de Bruijn
2014-08-05  2:11 ` [PATCH net-next v4 2/6] net-timestamp: move timestamp flags out of sk_flags Willem de Bruijn
2014-08-05  2:11 ` [PATCH net-next v4 3/6] net-timestamp: add key to disambiguate concurrent datagrams Willem de Bruijn
2014-08-05  2:11 ` [PATCH net-next v4 4/6] net-timestamp: SCHED timestamp on entering packet scheduler Willem de Bruijn
2014-08-05  2:11 ` [PATCH net-next v4 5/6] net-timestamp: TCP timestamping Willem de Bruijn
2014-08-06  6:25   ` Eric Dumazet
2014-08-06  6:55   ` Eric Dumazet
2014-08-06 13:08     ` Willem de Bruijn
2014-08-06 14:36       ` Eric Dumazet
2014-08-06  7:05   ` Eric Dumazet
2014-08-06  9:49     ` [PATCH net-next] net-timestamp: sock_tx_timestamp() fix Eric Dumazet
2014-08-06 12:52       ` Willem de Bruijn
2014-08-06 19:38       ` David Miller
2014-08-06 14:23     ` [PATCH net-next v4 5/6] net-timestamp: TCP timestamping Willem de Bruijn
2014-08-06 14:37       ` Eric Dumazet
2014-08-06 19:20         ` Willem de Bruijn
2014-08-06 21:32           ` David Miller
2014-08-07  0:59             ` Willem de Bruijn
2014-08-07  2:03               ` David Miller
2014-08-07  3:43                 ` Willem de Bruijn
2014-08-07  3:50                   ` David Miller
2014-08-05  2:11 ` [PATCH net-next v4 6/6] net-timestamp: ACK timestamp for bytestreams Willem de Bruijn
2014-08-05  2:16 ` [PATCH net-next v4 0/6] net-timestamp: new tx tstamps and tcp Willem de Bruijn
2014-08-05 23:36 ` David Miller
2014-08-07 23:09 ` Andi Kleen
2014-08-07 23:39   ` Willem de Bruijn

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=1407204710-21778-1-git-send-email-willemb@google.com \
    --to=willemb@google.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.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).