[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140731.133711.750711941438180832.davem@davemloft.net>
Date: Thu, 31 Jul 2014 13:37:11 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: willemb@...gle.com
Cc: netdev@...r.kernel.org, eric.dumazet@...il.com,
richardcochran@...il.com
Subject: Re: [PATCH net-next v4 1/5] net-timestamp: extend SCM_TIMESTAMPING
ancillary data struct
From: Willem de Bruijn <willemb@...gle.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@...gle.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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists