Commit 4ff75b7c authored by Richard Cochran's avatar Richard Cochran Committed by David S. Miller

net: correct comment on where to place transmit time stamp hook.

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: default avatarRichard Cochran <richard.cochran@omicron.at>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fd112f2e
...@@ -2023,8 +2023,7 @@ static inline void sw_tx_timestamp(struct sk_buff *skb) ...@@ -2023,8 +2023,7 @@ static inline void sw_tx_timestamp(struct sk_buff *skb)
* skb_tx_timestamp() - Driver hook for transmit timestamping * skb_tx_timestamp() - Driver hook for transmit timestamping
* *
* Ethernet MAC Drivers should call this function in their hard_xmit() * Ethernet MAC Drivers should call this function in their hard_xmit()
* function as soon as possible after giving the sk_buff to the MAC * function immediately before giving the sk_buff to the MAC hardware.
* hardware, but before freeing the sk_buff.
* *
* @skb: A socket buffer. * @skb: A socket buffer.
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment