From: Richard Cochran <richardcochran@gmail.com>
To: <netdev@vger.kernel.org>
Cc: David Miller <davem@davemloft.net>
Subject: [PATCH V2 00/11] net: expand time stamping, batch #1
Date: Fri, 10 Jun 2011 17:24:46 +0200 [thread overview]
Message-ID: <cover.1307719258.git.richard.cochran@omicron.at> (raw)
(This is V2 - forgot one of the patches when first posted, sorry)
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.
For non-NAPI drivers, PHY based receive time stamping is currently not
possible. This patch series adds yet another hook (a wrapper around
netif_rx) for such drivers.
The first two patches make minor changes in the stack in support of
MAC/PHY time stamping. 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
each and every Ethernet MAC driver, so that SO_TIMESTAMPING using SW
time stamps will be supported across the board. 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 (11):
net: export time stamp utility function for Ethernet MAC drivers
net: introduce time stamping wrapper for netif_rx.
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 | 4 +++-
drivers/net/r6040.c | 2 ++
drivers/net/smsc9420.c | 2 ++
drivers/net/stmmac/stmmac_main.c | 2 ++
drivers/net/tg3.c | 2 ++
include/linux/netdevice.h | 21 +++++++++++++++++++++
net/core/timestamping.c | 1 +
10 files changed, 39 insertions(+), 3 deletions(-)
next reply other threads:[~2011-06-10 15:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-10 15:24 Richard Cochran [this message]
2011-06-10 15:24 ` [PATCH V2 01/11] net: export time stamp utility function for Ethernet MAC drivers Richard Cochran
2011-06-10 15:24 ` [PATCH V2 02/11] net: introduce time stamping wrapper for netif_rx Richard Cochran
2011-06-10 15:24 ` [PATCH V2 03/11] fec: enable transmit and receive time stamping Richard Cochran
2011-06-10 15:24 ` [PATCH V2 04/11] davinci_emac: pass ioctls through to phy device Richard Cochran
2011-06-10 15:24 ` [PATCH V2 05/11] davinci_emac: enable transmit time stamping Richard Cochran
2011-06-10 15:24 ` [PATCH V2 06/11] tg3: " Richard Cochran
2011-06-10 15:24 ` [PATCH V2 07/11] dnet: " Richard Cochran
2011-06-10 15:24 ` [PATCH V2 08/11] ethoc: " Richard Cochran
2011-06-10 15:24 ` [PATCH V2 09/11] r6040: " Richard Cochran
2011-06-10 15:24 ` [PATCH V2 10/11] stmmac: " Richard Cochran
2011-06-10 15:24 ` [PATCH V2 11/11] smsc9420: " Richard Cochran
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.1307719258.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;
as well as URLs for NNTP newsgroup(s).