From: Willem de Bruijn <willemb@google.com>
To: Richard Cochran <richardcochran@gmail.com>
Cc: netdev@vger.kernel.org, Eric Dumazet <eric.dumazet@gmail.com>,
David Miller <davem@davemloft.net>
Subject: Re: [PATCH net-next 3/7] net-timestamp: tx timestamp without payload
Date: Wed, 25 Jun 2014 17:22:09 -0400 [thread overview]
Message-ID: <CA+FuTSfDwwdLdbegUup_gQzzBeu=os9fQKnJH8+CHfEPFcDkhA@mail.gmail.com> (raw)
In-Reply-To: <20140625051648.GE3845@localhost.localdomain>
On Wed, Jun 25, 2014 at 1:16 AM, Richard Cochran
<richardcochran@gmail.com> wrote:
> On Tue, Jun 24, 2014 at 11:43:48AM -0400, Willem de Bruijn wrote:
>> Applications receive tx timestamps from the kernel by reading the
>> original packet from the socket error queue with sendmsg() and
>> processing an ancillary data item that holds the timestamps.
>>
>> If the application is only interested in the timestamp, then looping
>> the whole packet back up to userspace wastes socket buffer space
>> (SO_RCVBUF). This is especially important when the same packet is
>> enqueued repeatedly with multiple timestamps.
>>
>> This patch adds a socket option to loop the timestamp on top of an
>> empty packet instead of a clone of the original.
>
> This makes sense. In practice the looped buffer is totally useless,
> due to the fact that many NICs can only handle one outstanding
> transmit time stamp. Applications must make sure they only send one
> packet at a time if they want every packet time stamped.
>
>> diff --git a/include/net/sock.h b/include/net/sock.h
>> index 32cd1be..df7bde0 100644
>> --- a/include/net/sock.h
>> +++ b/include/net/sock.h
>> @@ -690,6 +690,7 @@ enum sock_flags {
>> SOCK_TIMESTAMPING_SOFTWARE, /* %SOF_TIMESTAMPING_SOFTWARE */
>> SOCK_TIMESTAMPING_RAW_HARDWARE, /* %SOF_TIMESTAMPING_RAW_HARDWARE */
>> SOCK_TIMESTAMPING_SYS_HARDWARE, /* %SOF_TIMESTAMPING_SYS_HARDWARE */
>> + SOCK_TIMESTAMPING_OPT_TX_NO_PAYLOAD, /* %SOF_TIMESTAMPING_OPT_TX_NO_PAYLOAD */
>
> That is a bit of a mouthful. How about something like:
>
> SOCK_TIMESTAMPING_PLAIN_TS
> SOCK_TIMESTAMPING_BARE_TS
> SOCK_TIMESTAMPING_TSONLY
Ack. I'll pick a shorter name. This also exceeded 80 chars.
>
>
> Thanks,
> Richard
next prev parent reply other threads:[~2014-06-25 21:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-24 15:43 net-timestamp: MSG_TSTAMP flags and bytestream support Willem de Bruijn
2014-06-24 15:43 ` [PATCH net-next 1/7] net-timestamp: explicit SO_TIMESTAMPING ancillary data struct Willem de Bruijn
2014-06-25 4:56 ` Richard Cochran
2014-06-25 21:18 ` Willem de Bruijn
2014-06-24 15:43 ` [PATCH net-next 2/7] net-timestamp: MSG_TSTAMP one-shot tx timestamps Willem de Bruijn
2014-06-25 5:01 ` Richard Cochran
2014-06-25 21:20 ` Willem de Bruijn
2014-06-24 15:43 ` [PATCH net-next 3/7] net-timestamp: tx timestamp without payload Willem de Bruijn
2014-06-25 5:16 ` Richard Cochran
2014-06-25 21:22 ` Willem de Bruijn [this message]
2014-06-24 15:43 ` [PATCH net-next 4/7] net-timestamp: TCP timestamping Willem de Bruijn
2014-06-24 15:43 ` [PATCH net-next 5/7] net-timestamp: ACK timestamp for bytestreams Willem de Bruijn
2014-06-24 15:43 ` [PATCH net-next 6/7] net-timestamp: ENQ timestamp on enqueue to traffic shaping layer Willem de Bruijn
2014-06-24 15:43 ` [PATCH net-next 7/7] net-timestamp: expand documentation Willem de Bruijn
2014-06-25 7:32 ` net-timestamp: MSG_TSTAMP flags and bytestream support Richard Cochran
2014-06-25 21:11 ` 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='CA+FuTSfDwwdLdbegUup_gQzzBeu=os9fQKnJH8+CHfEPFcDkhA@mail.gmail.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).