From: David Miller <davem@davemloft.net>
To: richardcochran@gmail.com
Cc: netdev@vger.kernel.org, devicetree-discuss@lists.ozlabs.org,
linuxppc-dev@lists.ozlabs.org,
linux-arm-kernel@lists.infradead.org, khc@pm.waw.pl
Subject: Re: [PATCH 04/12] phylib: add a way to make PHY time stamps possible.
Date: Wed, 16 Jun 2010 18:03:41 -0700 (PDT) [thread overview]
Message-ID: <20100616.180341.242128217.davem@davemloft.net> (raw)
In-Reply-To: <27c0ad283f025c2bb71e7ceb71be07f969939429.1276615626.git.richard.cochran@omicron.at>
From: Richard Cochran <richardcochran@gmail.com>
Date: Tue, 15 Jun 2010 18:08:20 +0200
> +static inline void skb_tx_timetamp(struct phy_device *phy, struct sk_buff *skb)
> +{
> + union skb_shared_tx *shtx = skb_tx(skb);
> +
> + if (shtx->hardware && phy && phy->drv->txtstamp)
> + phy->drv->txtstamp(phy, skb);
> +
> + if (shtx->software && !shtx->in_progress)
> + skb_tstamp_tx(skb, NULL);
> +}
> +
> +static inline void skb_rx_timetamp(struct phy_device *phy, struct sk_buff *skb)
> +{
> + if (phy && phy->drv->rxtstamp)
> + phy->drv->rxtstamp(phy, skb);
> +}
Since, as you say, this can provide a way to deal with the sw TX
timestamping sequencing problem we have right now, I'd rather
you implement this from the inside out instead of from the
outside in.
By this I mean you should provide these inline helpers by default
then we can begin to put them into the drivers.
You could also split the SW tstamp handling into a seperate inline
function, which drivers call immediately once they know they will
actually give the packet to the hardware for sending.
next prev parent reply other threads:[~2010-06-17 1:03 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-15 16:06 [PATCH v4 00/12] ptp: IEEE 1588 clock support Richard Cochran
2010-06-15 16:07 ` [PATCH 01/12] phylib: preserve ifreq parameter when calling generic phy_mii_ioctl() Richard Cochran
2010-06-15 16:07 ` [PATCH 02/12] phylib: do not filter phy_mii_ioctl() Richard Cochran
2010-06-15 16:26 ` Grant Likely
2010-06-15 16:08 ` [PATCH 03/12] phylib: add a driver method for the SIOCSHWTSTAMP ioctl Richard Cochran
2010-06-15 16:27 ` Grant Likely
2010-06-15 16:34 ` Richard Cochran
2010-06-15 16:49 ` Grant Likely
2010-06-15 16:53 ` Grant Likely
2010-06-15 16:08 ` [PATCH 04/12] phylib: add a way to make PHY time stamps possible Richard Cochran
2010-06-15 16:33 ` Grant Likely
2010-06-16 5:40 ` Richard Cochran
2010-06-16 6:29 ` Richard Cochran
2010-06-17 1:03 ` David Miller [this message]
2010-06-15 16:08 ` [PATCH 05/12] phylib: Allow reading and writing a mii bus from atomic context Richard Cochran
2010-06-15 16:43 ` Grant Likely
2010-06-15 17:08 ` Richard Cochran
2010-06-15 18:29 ` Grant Likely
2010-06-16 6:20 ` Richard Cochran
2010-06-15 16:09 ` [PATCH 06/12] ptp: add a BPF to help drivers detect PTP packets Richard Cochran
2010-06-15 16:09 ` [PATCH 07/12] phylib: support the National Semiconductor DP83640 PHY Richard Cochran
2010-06-15 16:09 ` [PATCH 08/12] ptp: Added a brand new class driver for ptp clocks Richard Cochran
2010-06-15 17:00 ` Grant Likely
2010-06-16 14:22 ` Richard Cochran
2010-06-15 19:11 ` Grant Likely
2010-08-13 9:34 ` Richard Cochran
2010-08-13 23:54 ` Grant Likely
2010-06-15 16:09 ` [PATCH 09/12] ptp: Added a clock that uses the Linux system time Richard Cochran
2010-06-15 16:10 ` [PATCH 10/12] ptp: Added a clock that uses the eTSEC found on the MPC85xx Richard Cochran
2010-06-15 17:20 ` Grant Likely
2010-06-16 6:45 ` Richard Cochran
2010-06-15 16:10 ` [PATCH 11/12] ptp: Added a clock driver for the IXP46x Richard Cochran
2010-06-15 18:41 ` Grant Likely
2010-06-16 6:54 ` Richard Cochran
2010-06-15 16:10 ` [PATCH 12/12] ptp: Added a clock driver for the National Semiconductor PHYTER Richard Cochran
2010-06-15 18:49 ` Grant Likely
2010-06-16 10:05 ` Richard Cochran
2010-06-16 15:10 ` Grant Likely
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=20100616.180341.242128217.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=khc@pm.waw.pl \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--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 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).