Skip to contentSkip to conversation

net: macb driver, check for SKBTX_HW_TSTAMP

PATCH Superseded Paul Thomas 2 participants 3 messages Apr 8, 2019

Subsystems (3)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 net: macb driver, check for SKBTX_HW_TSTAMP

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.

---
Fix subject and patch formatting from v2

 drivers/net/ethernet/cadence/macb_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/cadence/macb_main.c +2 -1
index ad099fd01b45..48fc45ab514f 100644
@@ -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
 					 */
Signature · 1 line
2.17.1
maintainer
#1 lore raw

From: Paul Thomas <[email protected]>
Date: Mon, 8 Apr 2019 09:20:47 -0400

drivers/net/ethernet/cadence/macb_main.c static void macb_tx_interrupt(struct macb_queue *queue) · line 902

Quoted 2 lines
drivers/net/ethernet/cadence/macb_main.c +2 -0
+				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.

#2 lore raw
Quoted 4 lines · David Miller

From: Paul Thomas <[email protected]>
Date: Mon, 8 Apr 2019 09:20:47 -0400

Quoted 8 lines

drivers/net/ethernet/cadence/macb_main.c static void macb_tx_interrupt(struct macb_queue *queue) · line 902

Quoted 2 lines
drivers/net/ethernet/cadence/macb_main.c +2 -0
+                             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