All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Kofler <ikofler@edu.uni-klu.ac.at>
To: Richard Cochran <richardcochran@gmail.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>, netdev@vger.kernel.org
Subject: Re: Problems obtaining software TX timestamps
Date: Thu, 09 Sep 2010 10:26:06 +0200	[thread overview]
Message-ID: <4C889A1E.6050405@edu.uni-klu.ac.at> (raw)
In-Reply-To: <20100909063541.GA3305@riccoc20.at.omicron.at>

Richard Cochran wrote:
> On Wed, Sep 08, 2010 at 11:21:36PM +0200, Ingo Kofler wrote:
>   
>> Ok, for hardware timestamps it seems logically for me that the
>> driver has to support this. But what about the software timestamps -
>> do they also require support from the driver? Is there no generic
>> implementation in the networking stack?
>>     
>
> There was once a completely generic implementation, but the Tx path
> had issues. The generic Tx SW code was reverted in
>
> cd4d8fdad1f13205c769266dfa99015e226b6e07
>
> Now, there is a way to support this again, but it requires adding one
> line into each and every MAC driver. It is not very hard to do:
>
> linux/skbuff.h:1992
> /**
>  * skb_tx_timestamp() - Driver hook for transmit timestamping
>  *
>  * Ethernet MAC Drivers should call this function in their hard_xmit()
>  * function as soon as possible after giving the sk_buff to the MAC
>  * hardware, but before freeing the sk_buff.
>  *
>  * @skb: A socket buffer.
>  */
> static inline void skb_tx_timestamp(struct sk_buff *skb);
>
> I am already carrying patches for this privately. If you post a patch
> for your MAC, then you can be the first one to support this feature! ;^)
>   
Thank you very much for this clarification. Are there any drawbacks with 
this approach, e.g. performance issues? Honestly, I am just wondering 
why driver developers do not add this single line if it's that easy....

Ingo
> Richard
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>   


  reply	other threads:[~2010-09-09  8:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-08 12:11 Problems obtaining software TX timestamps Ingo Kofler
2010-09-08 15:12 ` Eric Dumazet
2010-09-08 21:21   ` Ingo Kofler
2010-09-08 21:24     ` David Miller
2010-09-09  6:35     ` Richard Cochran
2010-09-09  8:26       ` Ingo Kofler [this message]
2010-09-09 13:57         ` Richard Cochran
2010-09-09 14:02           ` Eric Dumazet
2010-09-09 14:31             ` Loke, Chetan
2010-09-09 17:32             ` Richard Cochran
2010-09-09 18:58               ` Eric Dumazet

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=4C889A1E.6050405@edu.uni-klu.ac.at \
    --to=ikofler@edu.uni-klu.ac.at \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.