* pskb_copy() in tcp_transmit_skb()
@ 2011-09-13 9:21 Christoph Paasch
2011-09-13 9:29 ` Gaofeng
0 siblings, 1 reply; 8+ messages in thread
From: Christoph Paasch @ 2011-09-13 9:21 UTC (permalink / raw)
To: netdev
Hi,
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().
Thanks for your help,
Christoph
--
Christoph Paasch
PhD Student
IP Networking Lab --- http://inl.info.ucl.ac.be
MultiPath TCP in the Linux Kernel --- http://inl.info.ucl.ac.be/mptcp
Université Catholique de Louvain
www.rollerbulls.be
--
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: pskb_copy() in tcp_transmit_skb()
2011-09-13 9:21 pskb_copy() in tcp_transmit_skb() Christoph Paasch
@ 2011-09-13 9:29 ` Gaofeng
2011-09-13 10:55 ` Christoph Paasch
0 siblings, 1 reply; 8+ messages in thread
From: Gaofeng @ 2011-09-13 9:29 UTC (permalink / raw)
To: christoph.paasch; +Cc: netdev
于 2011年09月13日 17:21, Christoph Paasch 写道:
> Hi,
>
> 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().
>
>
> Thanks for your help,
> Christoph
>
>
> --
> Christoph Paasch
> PhD Student
>
> IP Networking Lab --- http://inl.info.ucl.ac.be
> MultiPath TCP in the Linux Kernel --- http://inl.info.ucl.ac.be/mptcp
> Université Catholique de Louvain
>
> www.rollerbulls.be
> --
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
maybe nat,nat can change the tcp packet header
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: pskb_copy() in tcp_transmit_skb()
2011-09-13 9:29 ` Gaofeng
@ 2011-09-13 10:55 ` Christoph Paasch
2011-09-13 12:00 ` Gao feng
2011-09-13 12:02 ` Eric Dumazet
0 siblings, 2 replies; 8+ messages in thread
From: Christoph Paasch @ 2011-09-13 10:55 UTC (permalink / raw)
To: Gaofeng; +Cc: netdev
Hi,
On Tuesday 13 September 2011 wrote Gaofeng:
> > 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.
Christoph
--
Christoph Paasch
PhD Student
IP Networking Lab --- http://inl.info.ucl.ac.be
MultiPath TCP in the Linux Kernel --- http://inl.info.ucl.ac.be/mptcp
Université Catholique de Louvain
www.rollerbulls.be
--
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: pskb_copy() in tcp_transmit_skb()
2011-09-13 10:55 ` Christoph Paasch
@ 2011-09-13 12:00 ` Gao feng
2011-09-13 12:02 ` Eric Dumazet
1 sibling, 0 replies; 8+ messages in thread
From: Gao feng @ 2011-09-13 12:00 UTC (permalink / raw)
To: christoph.paasch; +Cc: netdev
于 11-9-13 下午6:55, Christoph Paasch 写道:
> Hi,
>
> On Tuesday 13 September 2011 wrote Gaofeng:
>>> 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.
>
> Christoph
>
> --
> Christoph Paasch
> PhD Student
>
> IP Networking Lab --- http://inl.info.ucl.ac.be
> MultiPath TCP in the Linux Kernel --- http://inl.info.ucl.ac.be/mptcp
> Université Catholique de Louvain
>
> www.rollerbulls.be
> --
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
maybe this.
if the nic driver has not transmit the cloned skb to the network yet.
then tcp_retransmit_skb is called by some logical.
if dont use pskb_copy here,it will make the nat or some header operation
error.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: pskb_copy() in tcp_transmit_skb()
2011-09-13 10:55 ` Christoph Paasch
2011-09-13 12:00 ` Gao feng
@ 2011-09-13 12:02 ` Eric Dumazet
2011-09-13 12:41 ` Christoph Paasch
2011-09-13 16:34 ` David Miller
1 sibling, 2 replies; 8+ messages in thread
From: Eric Dumazet @ 2011-09-13 12:02 UTC (permalink / raw)
To: christoph.paasch; +Cc: Gaofeng, netdev
Le 13 septembre 2011 12:55, Christoph Paasch
<christoph.paasch@uclouvain.be> a écrit :
>
> Hi,
>
> On Tuesday 13 September 2011 wrote Gaofeng:
> > > 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)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: pskb_copy() in tcp_transmit_skb()
2011-09-13 12:02 ` Eric Dumazet
@ 2011-09-13 12:41 ` Christoph Paasch
2011-09-13 12:51 ` Eric Dumazet
2011-09-13 16:34 ` David Miller
1 sibling, 1 reply; 8+ messages in thread
From: Christoph Paasch @ 2011-09-13 12:41 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Gaofeng, netdev
Eric,
On Tuesday 13 September 2011 wrote Eric Dumazet:
> 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)
Thanks for the clear answer.
So, basically every call to tcp_retransmit_skb on an skb that is also still
hold in an AF_PACKET queue will end up in pskb_copy, because:
1. it has been cloned previously in tcp_transmit_skb()
2. The data_ref > 1 because it's clone is still in an AF_PACKET queue.
Please correct me, if I'm wrong.
Christoph
--
Christoph Paasch
PhD Student
IP Networking Lab --- http://inl.info.ucl.ac.be
MultiPath TCP in the Linux Kernel --- http://inl.info.ucl.ac.be/mptcp
Université Catholique de Louvain
www.rollerbulls.be
--
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: pskb_copy() in tcp_transmit_skb()
2011-09-13 12:41 ` Christoph Paasch
@ 2011-09-13 12:51 ` Eric Dumazet
0 siblings, 0 replies; 8+ messages in thread
From: Eric Dumazet @ 2011-09-13 12:51 UTC (permalink / raw)
To: christoph.paasch; +Cc: Gaofeng, netdev
Le 13 septembre 2011 14:41, Christoph Paasch
<christoph.paasch@uclouvain.be> a écrit :
> Eric,
>
> On Tuesday 13 September 2011 wrote Eric Dumazet:
>> 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)
>
> Thanks for the clear answer.
>
> So, basically every call to tcp_retransmit_skb on an skb that is also still
> hold in an AF_PACKET queue will end up in pskb_copy, because:
> 1. it has been cloned previously in tcp_transmit_skb()
> 2. The data_ref > 1 because it's clone is still in an AF_PACKET queue.
>
> Please correct me, if I'm wrong.
Thats correct.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: pskb_copy() in tcp_transmit_skb()
2011-09-13 12:02 ` Eric Dumazet
2011-09-13 12:41 ` Christoph Paasch
@ 2011-09-13 16:34 ` David Miller
1 sibling, 0 replies; 8+ messages in thread
From: David Miller @ 2011-09-13 16:34 UTC (permalink / raw)
To: eric.dumazet; +Cc: christoph.paasch, gaofeng, netdev
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 13 Sep 2011 14:02:17 +0200
> I suggest you read dev_queue_xmit_nit() : Every xmit packet can be
> cloned right here.
Right, any packet that has been sent in the past might now be
cloned.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-09-13 16:35 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-13 9:21 pskb_copy() in tcp_transmit_skb() Christoph Paasch
2011-09-13 9:29 ` Gaofeng
2011-09-13 10:55 ` Christoph Paasch
2011-09-13 12:00 ` Gao feng
2011-09-13 12:02 ` Eric Dumazet
2011-09-13 12:41 ` Christoph Paasch
2011-09-13 12:51 ` Eric Dumazet
2011-09-13 16:34 ` David Miller
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.