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 v4 1/5] net-timestamp: extend SCM_TIMESTAMPING ancillary data struct
Date: Thu, 31 Jul 2014 13:37:11 -0700 (PDT) [thread overview]
Message-ID: <20140731.133711.750711941438180832.davem@davemloft.net> (raw)
In-Reply-To: <1406735328-7520-2-git-send-email-willemb@google.com>
From: Willem de Bruijn <willemb@google.com>
Date: Wed, 30 Jul 2014 11:48:44 -0400
> Applications that request kernel tx timestamps with SO_TIMESTAMPING
> read timestamps as recvmsg() ancillary data. The response is defined
> implicitly as timespec[3].
>
> 1) define struct scm_timestamping explicitly and
>
> 2) 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.
>
> 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>
...
> +/* type of ts[0], passed in ee_info */
> +enum {
> + SCM_TSTAMP_SND = 1, /* driver passed skb to NIC */
> +};
...
> @@ -3521,6 +3521,7 @@ void skb_tstamp_tx(struct sk_buff *orig_skb,
> memset(serr, 0, sizeof(*serr));
> serr->ee.ee_errno = ENOMSG;
> serr->ee.ee_origin = SO_EE_ORIGIN_TIMESTAMPING;
> + serr->ee.ee_info = hwtstamps ? 0 : SCM_TSTAMP_SND;
>
> err = sock_queue_err_skb(sk, skb);
>
Up until now we've placed the value zero in the ee_info field, do you have
a strong reason to not define SCM_TSTAMP_SND to zero as well?
Unless you have a compelling reason to do otherwise, we should use zero.
next prev parent reply other threads:[~2014-07-31 20:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-30 15:48 [PATCH net-next v4 0/5] net-timestamp: additional sw tstamps and Willem de Bruijn
2014-07-30 15:48 ` [PATCH net-next v4 1/5] net-timestamp: extend SCM_TIMESTAMPING ancillary data struct Willem de Bruijn
2014-07-31 20:37 ` David Miller [this message]
2014-07-30 15:48 ` [PATCH net-next v4 2/5] net-timestamp: move timestamp flags out of sk_flags Willem de Bruijn
2014-07-30 15:48 ` [PATCH net-next v4 3/5] net-timestamp: ENQ timestamp on enqueue to traffic shaping layer Willem de Bruijn
2014-07-31 20:38 ` David Miller
2014-07-30 15:48 ` [PATCH net-next v4 4/5] net-timestamp: TCP timestamping Willem de Bruijn
2014-07-31 20:41 ` David Miller
2014-07-30 15:48 ` [PATCH net-next v4 5/5] net-timestamp: ACK timestamp for bytestreams Willem de Bruijn
2014-07-31 20:43 ` [PATCH net-next v4 0/5] net-timestamp: additional sw tstamps and David Miller
2014-07-31 21:36 ` Willem de Bruijn
2014-08-01 5:35 ` David Miller
2014-08-01 13:44 ` 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=20140731.133711.750711941438180832.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).