All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] net: macb driver, check for SKBTX_HW_TSTAMP
@ 2019-04-08 13:20 Paul Thomas
  2019-04-08 17:04 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Thomas @ 2019-04-08 13:20 UTC (permalink / raw)
  To: netdev; +Cc: Paul Thomas

Make sure SKBTX_HW_TSTAMP (i.e. SOF_TIMESTAMPING_TX_HARDWARE) has been
enabled for this skb. It does fix the issue where normal socks that
aren't expecting a timestamp will not wake up on select, but when a
user does want a SOF_TIMESTAMPING_TX_HARDWARE it does work.

Signed-off-by: Paul Thomas <pthomas8589@gmail.com>
---
 Fix subject and patch formatting from v2

 drivers/net/ethernet/cadence/macb_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index ad099fd01b45..48fc45ab514f 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -898,7 +898,8 @@ static void macb_tx_interrupt(struct macb_queue *queue)
 
 			/* First, update TX stats if needed */
 			if (skb) {
-				if (gem_ptp_do_txstamp(queue, skb, desc) == 0) {
+				if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) &&
+					gem_ptp_do_txstamp(queue, skb, desc) == 0) {
 					/* skb now belongs to timestamp buffer
 					 * and will be removed later
 					 */
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] net: macb driver, check for SKBTX_HW_TSTAMP
  2019-04-08 13:20 [PATCH v3] net: macb driver, check for SKBTX_HW_TSTAMP Paul Thomas
@ 2019-04-08 17:04 ` David Miller
  2019-04-08 19:39   ` Paul Thomas
  0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2019-04-08 17:04 UTC (permalink / raw)
  To: pthomas8589; +Cc: netdev

From: Paul Thomas <pthomas8589@gmail.com>
Date: Mon,  8 Apr 2019 09:20:47 -0400

> +				if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) &&
> +					gem_ptp_do_txstamp(queue, skb, desc) == 0) {

The second line should start precisely at the first column after the openning
parenthesis of the first line.

You must use the appropriate number of TAB then SPACE characters necessary to
achieve this.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] net: macb driver, check for SKBTX_HW_TSTAMP
  2019-04-08 17:04 ` David Miller
@ 2019-04-08 19:39   ` Paul Thomas
  0 siblings, 0 replies; 3+ messages in thread
From: Paul Thomas @ 2019-04-08 19:39 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

On Mon, Apr 8, 2019 at 1:04 PM David Miller <davem@davemloft.net> wrote:
>
> From: Paul Thomas <pthomas8589@gmail.com>
> Date: Mon,  8 Apr 2019 09:20:47 -0400
>
> > +                             if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) &&
> > +                                     gem_ptp_do_txstamp(queue, skb, desc) == 0) {
>
> The second line should start precisely at the first column after the openning
> parenthesis of the first line.
>
> You must use the appropriate number of TAB then SPACE characters necessary to
> achieve this.

Thanks David

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-04-08 19:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-08 13:20 [PATCH v3] net: macb driver, check for SKBTX_HW_TSTAMP Paul Thomas
2019-04-08 17:04 ` David Miller
2019-04-08 19:39   ` Paul Thomas

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.