Skip to content

Commit

Permalink
net: correct comment on where to place transmit time stamp hook.
Browse files Browse the repository at this point in the history
The comment for the skb_tx_timestamp() function suggests calling it just
after a buffer is released to the hardware for transmission. However,
for drivers that free the buffer in an ISR, this produces a race between
the time stamp code and the ISR. This commit changes the comment to advise
placing the call just before handing the buffer over to the hardware.

Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Richard Cochran authored and David S. Miller committed Jun 19, 2011
1 parent fd112f2 commit 4ff75b7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions include/linux/skbuff.h
Original file line number Diff line number Diff line change
Expand Up @@ -2023,8 +2023,7 @@ static inline void sw_tx_timestamp(struct sk_buff *skb)
* skb_tx_timestamp() - Driver hook for transmit timestamping
*
* Ethernet MAC Drivers should call this function in their hard_xmit()
* function as soon as possible after giving the sk_buff to the MAC
* hardware, but before freeing the sk_buff.
* function immediately before giving the sk_buff to the MAC hardware.
*
* @skb: A socket buffer.
*/
Expand Down

0 comments on commit 4ff75b7

Please sign in to comment.