Thread (8 messages) 8 messages, 5 authors, 2011-09-13

Re: pskb_copy() in tcp_transmit_skb()

flat view

From: Eric Dumazet <hidden>
Date: 2011-09-13 12:09:17

Le 13 septembre 2011 12:55, Christoph Paasch
[off-list ref] a écrit :
Hi,

On Tuesday 13 September 2011 wrote Gaofeng:
quoted
quoted
I'm trying to understand the reason for the possible call to pskb_copy()
in tcp_transmit_skb().
I don't find, where we may have a cloned skb entering tcp_transmit_skb().

The original pskb_copy() came from tcp_retransmit_skb() (commit
dfb4b9dceb35c567a595ae5e9d035cfda044a103).
But from that point, the git-history does not show where the pskb_copy()
is coming from.


Does somebody has an idea, how a cloned skb can be passed to
tcp_transmit_skb() and thus trigger this call to pskb_copy().
maybe nat,nat can change the tcp packet header
although NAT may change the TCP header, it is not doing an skb_clone() - (at
least I don't find it).
Thus, we will not call pskb_copy() in tcp_transmit_skb() due to NAT.
I suggest you read dev_queue_xmit_nit() : Every xmit packet can be
cloned right here.

By the time tcp_retransmit_skb() is called, cloned skb might still be
in a AF_PACKET queue (or even a device TX queue)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help