Netdev List
 help / color / mirror / Atom feed
From: Richard Cochran <richardcochran@gmail.com>
To: <netdev@vger.kernel.org>
Cc: David Miller <davem@davemloft.net>
Subject: [PATCH V3 00/10] net: expand time stamping, batch #1
Date: Sun, 12 Jun 2011 14:18:57 +0200	[thread overview]
Message-ID: <cover.1307880494.git.richard.cochran@omicron.at> (raw)

This patch series represents the start of an effort to get better
coverage of the SO_TIMESTAMPING socket API in the Ethernet drivers.
Adding time stamping support to a given driver solves two separate
issues, namely software transmit time stamping and hardware time
stamping in PHY devices.

The SO_TIMESTAMPING socket API has been around since 2.6.30, but it
turned out that getting software transmit time stamps could not be
done in one central place in the stack. Instead, a work around was
introduced whereby each MAC driver must call a skb_tx_timestamp() hook
in order to support SW Tx time stamps.

Full PTP Hardware Clock (PHC) support has been merged for Linux 3.0,
including a driver for a PHY that does HW stamping. In the receive
path, the PHY based time stamping is handled by the stack for NAPI
based MAC drivers. But for transmit time stamps, support is needed in
the Ethernet MAC driver by calling the skb_tx_timestamp() hook.

The first patch exports a time stamping function for use in modules.
The next three patches enable PHY time stamping for two MACs which
have been paired with a PHC PHY on real life boards.

The remaining patches are for MACs that I chose because they (1) use
phylib and (2) compile for x86. However, I only compiled these, not
tested, since I do not have the hardware.

The larger goal is to eventually get the skb_tx_timestamp hook into as
many Ethernet MAC drivers as possible, so that SO_TIMESTAMPING using
SW time stamps will be supported across on most modern hardware. I
have started by picking those drivers in which adding the hook will
bring the greatest benefit, namely those using phylib, since adding
hooks provides both SW and PHY HW time stamping.

If people approve of this effort, I will follow with another patch
series adding SW Tx time stamping to yet more MACs. Adding SW Tx
support is just a single line, but still, perhaps compile testing only
is too risky. I would appreciate feedback on this issue.

Richard Cochran (10):
  net: export time stamp utility function for Ethernet MAC drivers
  fec: enable transmit and receive time stamping.
  davinci_emac: pass ioctls through to phy device.
  davinci_emac: enable transmit time stamping.
  tg3: enable transmit time stamping.
  dnet: enable transmit time stamping.
  ethoc: enable transmit time stamping.
  r6040: enable transmit time stamping.
  stmmac: enable transmit time stamping.
  smsc9420: enable transmit time stamping.

 drivers/net/davinci_emac.c       |    5 +++--
 drivers/net/dnet.c               |    2 ++
 drivers/net/ethoc.c              |    1 +
 drivers/net/fec.c                |    5 ++++-
 drivers/net/r6040.c              |    2 ++
 drivers/net/smsc9420.c           |    2 ++
 drivers/net/stmmac/stmmac_main.c |    2 ++
 drivers/net/tg3.c                |    2 ++
 net/core/timestamping.c          |    1 +
 9 files changed, 19 insertions(+), 3 deletions(-)


             reply	other threads:[~2011-06-12 12:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-12 12:18 Richard Cochran [this message]
2011-06-12 12:18 ` [PATCH V3 01/10] net: export time stamp utility function for Ethernet MAC drivers Richard Cochran
2011-06-12 12:18 ` [PATCH V3 02/10] fec: enable transmit and receive time stamping Richard Cochran
2011-06-12 12:19 ` [PATCH V3 03/10] davinci_emac: pass ioctls through to phy device Richard Cochran
2011-06-12 12:19 ` [PATCH V3 04/10] davinci_emac: enable transmit time stamping Richard Cochran
2011-06-12 12:19 ` [PATCH V3 05/10] tg3: " Richard Cochran
2011-06-12 12:19 ` [PATCH V3 06/10] dnet: " Richard Cochran
2011-06-12 12:19 ` [PATCH V3 07/10] ethoc: " Richard Cochran
2011-06-12 12:19 ` [PATCH V3 08/10] r6040: " Richard Cochran
2011-06-12 12:19 ` [PATCH V3 09/10] stmmac: " Richard Cochran
2011-06-12 12:19 ` [PATCH V3 10/10] smsc9420: " Richard Cochran
2011-06-13 21:26 ` [PATCH V3 00/10] net: expand time stamping, batch #1 David Miller

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=cover.1307880494.git.richard.cochran@omicron.at \
    --to=richardcochran@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /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