From: David Miller <davem@davemloft.net>
To: willemb@google.com
Cc: netdev@vger.kernel.org, eric.dumazet@gmail.com, richardcochran@gmail.com
Subject: Re: [PATCH net-next v3 1/5] net-timestamp: extend SCM_TIMESTAMPING ancillary data struct
Date: Mon, 21 Jul 2014 16:24:48 -0700 (PDT) [thread overview]
Message-ID: <20140721.162448.2136956416390069389.davem@davemloft.net> (raw)
In-Reply-To: <1405971357-22830-2-git-send-email-willemb@google.com>
From: Willem de Bruijn <willemb@google.com>
Date: Mon, 21 Jul 2014 15:35:53 -0400
> Applications that request kernel tx timestamps with SO_TIMESTAMPING
> read timestamps as recvmsg() ancillary data. The response is defined
> implicitly as timespec[3]. Define the struct, and
>
> 1) Add support for new tstamp types. On tx, scm_timestamping always
> accompanies a sock_extended_err. Define previously unused field
> ee_info to signal the type of ts[0]. Introduce SCM_TSTAMP_SND.
>
> 2) Add support to discern timestamps. When multiple timestamped
> packets are in flight concurrently, correlating a timestamp with
> the right send() call is non-trivial. Define previously unused field
> ee_data to communicate a send() specific key, skb->mark. It is
> up to the application to optionally set this field to a unique
> value for each send call.
>
> The reception path is not modified. On rx, no struct similar to
> sock_extended_err is passed along with SCM_TIMESTAMPING.
>
> Signed-off-by: Willem de Bruijn <willemb@google.com>
I'm not so sure about this skb->mark usage, it has other uses for things
such as classification, it influences route lookups, netfilter behavior,
etc.
I do not think you therefore want to add another usage, timestamp packet
keying, which may conflict.
Also:
> if (sock_flag(sk, SOCK_RCVTSTAMP) ||
> sock_flag(sk, SOCK_TIMESTAMPING_RX_SOFTWARE) ||
> - (kt.tv64 && sock_flag(sk, SOCK_TIMESTAMPING_SOFTWARE)) ||
> + (kt.tv64 && (sock_flag(sk, SOCK_TIMESTAMPING_SOFTWARE) ||
> + skb_shinfo(skb)->tx_flags & SKBTX_ANY_SW_TSTAMP)) ||
This isn't indented correctly, the tx_flags test is part of the sock_flag()
test expression right before it so either:
(kt.tv64 && (sock_flag(sk, SOCK_TIMESTAMPING_SOFTWARE) ||
skb_shinfo(skb)->tx_flags & SKBTX_ANY_SW_TSTAMP)) ||
or:
(kt.tv64 &&
(sock_flag(sk, SOCK_TIMESTAMPING_SOFTWARE) ||
skb_shinfo(skb)->tx_flags & SKBTX_ANY_SW_TSTAMP)) ||
Thanks.
next prev parent reply other threads:[~2014-07-21 23:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-21 19:35 [PATCH net-next v3 0/5] net-timestamp: additional sw tstamps and bytestream support Willem de Bruijn
2014-07-21 19:35 ` [PATCH net-next v3 1/5] net-timestamp: extend SCM_TIMESTAMPING ancillary data struct Willem de Bruijn
2014-07-21 23:24 ` David Miller [this message]
2014-07-22 15:45 ` Willem de Bruijn
2014-07-24 4:12 ` David Miller
2014-07-24 20:48 ` Willem de Bruijn
2014-07-24 21:15 ` David Miller
2014-07-24 23:05 ` Willem de Bruijn
2014-07-24 23:50 ` David Miller
2014-07-25 0:10 ` Willem de Bruijn
2014-07-25 0:53 ` David Miller
2014-07-21 19:35 ` [PATCH net-next v3 2/5] net-timestamp: move timestamp flags out of sk_flags Willem de Bruijn
2014-07-21 19:35 ` [PATCH net-next v3 3/5] net-timestamp: ENQ timestamp on enqueue to traffic shaping layer Willem de Bruijn
2014-07-21 19:35 ` [PATCH net-next v3 4/5] net-timestamp: TCP timestamping Willem de Bruijn
2014-07-21 19:35 ` [PATCH net-next v3 5/5] net-timestamp: ACK timestamp for bytestreams 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=20140721.162448.2136956416390069389.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
--cc=willemb@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).