netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miroslav Lichvar <mlichvar@redhat.com>
To: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: Network Development <netdev@vger.kernel.org>,
	Richard Cochran <richardcochran@gmail.com>,
	Willem de Bruijn <willemb@google.com>,
	Soheil Hassas Yeganeh <soheil@google.com>,
	"Keller, Jacob E" <jacob.e.keller@intel.com>,
	Denny Page <dennypage@me.com>, Jiri Benc <jbenc@redhat.com>
Subject: Re: [PATCH v1 net-next 5/6] net: allow simultaneous SW and HW transmit timestamping
Date: Tue, 2 May 2017 11:56:53 +0200	[thread overview]
Message-ID: <20170502095653.GB4610@localhost> (raw)
In-Reply-To: <CAF=yD-Ku30zqECeK-68o5Vuk+u4BaU8U3TZR32ZY4mq1y8f6jw@mail.gmail.com>

On Fri, Apr 28, 2017 at 04:07:29PM -0400, Willem de Bruijn wrote:
> On Fri, Apr 28, 2017 at 12:23 PM, Miroslav Lichvar <mlichvar@redhat.com> wrote:
> > On Fri, Apr 28, 2017 at 11:50:28AM -0400, Willem de Bruijn wrote:
> >> A more elegant solution would be to not set SKBTX_IN_PROGRESS
> >> at all if SOF_TIMESTAMPING_OPT_TX_SWHW is set on the socket.
> >> But the patch to do so is not elegant, having to update callsites in many
> >> device drivers.
> >
> > Also, it would change the meaning of the flag as it seems some drivers
> > actually use the SKBTX_IN_PROGRESS flag to check if they expect a
> > timestamp.
> >
> > How about allocating the last bit of tx_flags for SKBTX_SWHW_TSTAMP?
> 
> That is such a scarce resource that I really would prefer to avoid using
> that if we can.

Ok. I think it won't really matter. We should keep in mind that the
reason for adding the OPT_TX_SWHW option was to not break old
applications which enabled both SW and HW TX timestamping, even though
they could get only one timestamp. I think most applications in future
will either enable only SW or HW TX timestamping, or enable both
together with the OPT_TX_SWHW option in order to get a SW timestamp
when HW timestamp was requested but missing.

> >> Otherwise you may indeed have to call skb_tstamp_tx for every packet
> >> that has SKBTX_SW_TSTAMP set, as you do. We can at least move
> >> the skb->sk != NULL check into skb_tx_timestamp in skbuff.h.

There are other callers of skb_tx_timestamp() and it's not obvious to
me they are all safe (i.e. cannot pass skb will sk==NULL), so I think
this should rather be a separate patch if necessary.

I'll resend the series with the other changes you have suggested.

-- 
Miroslav Lichvar

  reply	other threads:[~2017-05-02  9:56 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-26 14:50 [PATCH v1 net-next 0/6] Extend socket timestamping API Miroslav Lichvar
2017-04-26 14:50 ` [PATCH v1 net-next 1/6] net: define receive timestamp filter for NTP Miroslav Lichvar
2017-04-26 14:50 ` [PATCH v1 net-next 2/6] net: ethernet: update drivers to handle HWTSTAMP_FILTER_NTP_ALL Miroslav Lichvar
2017-04-26 14:50 ` [PATCH v1 net-next 3/6] net: add new control message for incoming HW-timestamped packets Miroslav Lichvar
2017-04-26 23:34   ` Willem de Bruijn
2017-04-27 10:15     ` Miroslav Lichvar
2017-04-27 11:38       ` Willem de Bruijn
2017-04-27  4:09   ` kbuild test robot
2017-04-26 14:50 ` [PATCH v1 net-next 4/6] net: don't make false software transmit timestamps Miroslav Lichvar
2017-04-26 14:50 ` [PATCH v1 net-next 5/6] net: allow simultaneous SW and HW transmit timestamping Miroslav Lichvar
2017-04-27  0:00   ` Willem de Bruijn
2017-04-27 16:17     ` Miroslav Lichvar
2017-04-27 16:21       ` Willem de Bruijn
2017-04-27 16:39         ` Miroslav Lichvar
2017-04-27 16:48           ` Willem de Bruijn
2017-04-28  8:54     ` Miroslav Lichvar
2017-04-28 15:50       ` Willem de Bruijn
2017-04-28 16:23         ` Miroslav Lichvar
2017-04-28 20:07           ` Willem de Bruijn
2017-05-02  9:56             ` Miroslav Lichvar [this message]
2017-04-26 14:50 ` [PATCH v1 net-next 6/6] net: ethernet: update drivers to make both SW and HW TX timestamps Miroslav Lichvar
2017-04-26 16:54 ` [PATCH v1 net-next 0/6] Extend socket timestamping API Richard Cochran
2017-04-27  9:28   ` Miroslav Lichvar

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=20170502095653.GB4610@localhost \
    --to=mlichvar@redhat.com \
    --cc=dennypage@me.com \
    --cc=jacob.e.keller@intel.com \
    --cc=jbenc@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    --cc=soheil@google.com \
    --cc=willemb@google.com \
    --cc=willemdebruijn.kernel@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).