All of lore.kernel.org
 help / color / mirror / Atom feed
* assembly of packets
@ 2013-06-03  9:18 Varun Sharma
  2013-06-03 16:02 ` Valdis.Kletnieks at vt.edu
  0 siblings, 1 reply; 6+ messages in thread
From: Varun Sharma @ 2013-06-03  9:18 UTC (permalink / raw)
  To: kernelnewbies

Hi,
If TSO(tcp segmentation offload ) is enabled then nic card handle
segmentation then where is assembly of packets happens ? Is it
tcp_rcv_established function ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130603/f41762cd/attachment.html 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* assembly of packets
  2013-06-03  9:18 assembly of packets Varun Sharma
@ 2013-06-03 16:02 ` Valdis.Kletnieks at vt.edu
  2013-06-03 16:15   ` Craig Jackson
  0 siblings, 1 reply; 6+ messages in thread
From: Valdis.Kletnieks at vt.edu @ 2013-06-03 16:02 UTC (permalink / raw)
  To: kernelnewbies

On Mon, 03 Jun 2013 14:48:41 +0530, Varun Sharma said:

> If TSO(tcp segmentation offload ) is enabled then nic card handle
> segmentation then where is assembly of packets happens ? Is it
> tcp_rcv_established function ?

The whole *point* of TSO is so the NIC does all the segmentation
reassembly and DMA, and wake the kernel up when all the data is already
stashed in buffers fully processed.

Incidentally, this is why if you run tcpdump on an interface that has TSO
enabled, you'll only see the first 3 handshaking packets and the final
FIN packets - the other packets wake up the TCP stack at a point after
where tcpdump's tap would have seen the packet.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130603/63f1dd08/attachment.bin 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* assembly of packets
  2013-06-03 16:02 ` Valdis.Kletnieks at vt.edu
@ 2013-06-03 16:15   ` Craig Jackson
  2013-06-04  6:44     ` Varun Sharma
  0 siblings, 1 reply; 6+ messages in thread
From: Craig Jackson @ 2013-06-03 16:15 UTC (permalink / raw)
  To: kernelnewbies

In my experience, the second paragraph isn't quite true. What you see with TSO is the pre-segmentation "packet", up to 65k. (By this I mean the set of data which is given to the offload hardware to segment.) So you need to make sure that your "-s" value is big enough to see everything.

(Speaking as someone who was bitten by bugs in the early versions of TSO.)

Craig

-----Original Message-----
From: kernelnewbies-bounces+cjackson=ebscohost.com@kernelnewbies.org [mailto:kernelnewbies-bounces+cjackson=ebscohost.com at kernelnewbies.org] On Behalf Of Valdis.Kletnieks at vt.edu
Sent: Monday, June 03, 2013 12:03 PM
To: Varun Sharma
Cc: kernelnewbies at kernelnewbies.org
Subject: Re: assembly of packets

On Mon, 03 Jun 2013 14:48:41 +0530, Varun Sharma said:

> If TSO(tcp segmentation offload ) is enabled then nic card handle 
> segmentation then where is assembly of packets happens ? Is it 
> tcp_rcv_established function ?

The whole *point* of TSO is so the NIC does all the segmentation reassembly and DMA, and wake the kernel up when all the data is already stashed in buffers fully processed.

Incidentally, this is why if you run tcpdump on an interface that has TSO enabled, you'll only see the first 3 handshaking packets and the final FIN packets - the other packets wake up the TCP stack at a point after where tcpdump's tap would have seen the packet.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* assembly of packets
  2013-06-03 16:15   ` Craig Jackson
@ 2013-06-04  6:44     ` Varun Sharma
  2013-06-04 13:54       ` Craig Jackson
  0 siblings, 1 reply; 6+ messages in thread
From: Varun Sharma @ 2013-06-04  6:44 UTC (permalink / raw)
  To: kernelnewbies

On receving side upto tcp layer skb->len=1480 now where is packet assembled
on tcp layer ?
or it is directly copies into user space buffer.

I am sending len = 10000 in send system call.


On Mon, Jun 3, 2013 at 9:45 PM, Craig Jackson <cjackson@ebscohost.com>wrote:

> In my experience, the second paragraph isn't quite true. What you see with
> TSO is the pre-segmentation "packet", up to 65k. (By this I mean the set of
> data which is given to the offload hardware to segment.) So you need to
> make sure that your "-s" value is big enough to see everything.
>
> (Speaking as someone who was bitten by bugs in the early versions of TSO.)
>
> Craig
>
> -----Original Message-----
> From: kernelnewbies-bounces+cjackson=ebscohost.com at kernelnewbies.org[mailto:
> kernelnewbies-bounces+cjackson=ebscohost.com at kernelnewbies.org] On Behalf
> Of Valdis.Kletnieks at vt.edu
> Sent: Monday, June 03, 2013 12:03 PM
> To: Varun Sharma
> Cc: kernelnewbies at kernelnewbies.org
> Subject: Re: assembly of packets
>
> On Mon, 03 Jun 2013 14:48:41 +0530, Varun Sharma said:
>
> > If TSO(tcp segmentation offload ) is enabled then nic card handle
> > segmentation then where is assembly of packets happens ? Is it
> > tcp_rcv_established function ?
>
> The whole *point* of TSO is so the NIC does all the segmentation
> reassembly and DMA, and wake the kernel up when all the data is already
> stashed in buffers fully processed.
>
> Incidentally, this is why if you run tcpdump on an interface that has TSO
> enabled, you'll only see the first 3 handshaking packets and the final FIN
> packets - the other packets wake up the TCP stack at a point after where
> tcpdump's tap would have seen the packet.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130604/d8681ce5/attachment-0001.html 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* assembly of packets
  2013-06-04  6:44     ` Varun Sharma
@ 2013-06-04 13:54       ` Craig Jackson
  2013-06-04 14:27         ` Varun Sharma
  0 siblings, 1 reply; 6+ messages in thread
From: Craig Jackson @ 2013-06-04 13:54 UTC (permalink / raw)
  To: kernelnewbies

> -----Original Message-----
> From: Varun Sharma [mailto:vsdssd at gmail.com]
> Sent: Tuesday, June 04, 2013 2:45 AM
> To: Craig Jackson; kernelnewbies at kernelnewbies.org;
> Valdis.Kletnieks at vt.edu
> Subject: Re: assembly of packets
> 
> On receving side upto tcp layer skb->len=1480 now where is packet
> assembled on tcp layer ?
> or it is directly copies into user space buffer.
> 
> I am sending len = 10000 in send system call.
> 
>> On Mon, Jun 3, 2013 at 9:45 PM, Craig Jackson <cjackson@ebscohost.com>
>> wrote:
>> In my experience, the second paragraph isn't quite true. What you see
>> with TSO is the pre-segmentation "packet", up to 65k. (By this I mean
>> the set of data which is given to the offload hardware to segment.) So
>> you need to make sure that your "-s" value is big enough to see
>> everything.
>> 
>> (Speaking as someone who was bitten by bugs in the early versions of
>> TSO.)
>> 
>> Craig
> 
>>> -----Original Message-----
>>> From: kernelnewbies-bounces+cjackson=ebscohost.com at kernelnewbies.org
>>> [mailto:kernelnewbies-bounces+cjackson=ebscohost.com at kernelnewbies.org]
>>> On Behalf Of Valdis.Kletnieks at vt.edu
>>> Sent: Monday, June 03, 2013 12:03 PM
>>> To: Varun Sharma
>>> Cc: kernelnewbies at kernelnewbies.org
>>> Subject: Re: assembly of packets
>>> 
>>> On Mon, 03 Jun 2013 14:48:41 +0530, Varun Sharma said:
>>> 
>>> > If TSO(tcp segmentation offload ) is enabled then nic card handle
>>> > segmentation then where is assembly of packets happens ? Is it
>>> > tcp_rcv_established function ?
> 
>>> The whole *point* of TSO is so the NIC does all the segmentation
>>> reassembly and DMA, and wake the kernel up when all the data is already
>>> stashed in buffers fully processed.
> 
>>> Incidentally, this is why if you run tcpdump on an interface that has
>>> TSO enabled, you'll only see the first 3 handshaking packets and the
>>> final FIN packets - the other packets wake up the TCP stack at a point
>>> after where tcpdump's tap would have seen the packet.

Sorry for top-posting before. It's incredibly hard to get Outlook 2007 to do things right.

Varun, I now see we may not have answered the question you have. TSO (TCP Segementation Offload)
is associated with sending packets, not receiving them. They are re-assembled at the receiving
end in the standard manner.

Are you actually thinking of GRO (Generic Receive Offload)?

Craig

^ permalink raw reply	[flat|nested] 6+ messages in thread

* assembly of packets
  2013-06-04 13:54       ` Craig Jackson
@ 2013-06-04 14:27         ` Varun Sharma
  0 siblings, 0 replies; 6+ messages in thread
From: Varun Sharma @ 2013-06-04 14:27 UTC (permalink / raw)
  To: kernelnewbies

I see the receiving side also .Packets are not assembled by ip-defrag . now
where packets are assembled at transport layer ?
if yes then how they are assembled ?




On Tue, Jun 4, 2013 at 7:24 PM, Craig Jackson <cjackson@ebscohost.com>wrote:

> > -----Original Message-----
> > From: Varun Sharma [mailto:vsdssd at gmail.com]
> > Sent: Tuesday, June 04, 2013 2:45 AM
> > To: Craig Jackson; kernelnewbies at kernelnewbies.org;
> > Valdis.Kletnieks at vt.edu
> > Subject: Re: assembly of packets
> >
> > On receving side upto tcp layer skb->len=1480 now where is packet
> > assembled on tcp layer ?
> > or it is directly copies into user space buffer.
> >
> > I am sending len = 10000 in send system call.
> >
> >> On Mon, Jun 3, 2013 at 9:45 PM, Craig Jackson <cjackson@ebscohost.com>
> >> wrote:
> >> In my experience, the second paragraph isn't quite true. What you see
> >> with TSO is the pre-segmentation "packet", up to 65k. (By this I mean
> >> the set of data which is given to the offload hardware to segment.) So
> >> you need to make sure that your "-s" value is big enough to see
> >> everything.
> >>
> >> (Speaking as someone who was bitten by bugs in the early versions of
> >> TSO.)
> >>
> >> Craig
> >
> >>> -----Original Message-----
> >>> From: kernelnewbies-bounces+cjackson=ebscohost.com at kernelnewbies.org
> >>> [mailto:kernelnewbies-bounces+cjackson=ebscohost.com at kernelnewbies.org
> ]
> >>> On Behalf Of Valdis.Kletnieks at vt.edu
> >>> Sent: Monday, June 03, 2013 12:03 PM
> >>> To: Varun Sharma
> >>> Cc: kernelnewbies at kernelnewbies.org
> >>> Subject: Re: assembly of packets
> >>>
> >>> On Mon, 03 Jun 2013 14:48:41 +0530, Varun Sharma said:
> >>>
> >>> > If TSO(tcp segmentation offload ) is enabled then nic card handle
> >>> > segmentation then where is assembly of packets happens ? Is it
> >>> > tcp_rcv_established function ?
> >
> >>> The whole *point* of TSO is so the NIC does all the segmentation
> >>> reassembly and DMA, and wake the kernel up when all the data is already
> >>> stashed in buffers fully processed.
> >
> >>> Incidentally, this is why if you run tcpdump on an interface that has
> >>> TSO enabled, you'll only see the first 3 handshaking packets and the
> >>> final FIN packets - the other packets wake up the TCP stack at a point
> >>> after where tcpdump's tap would have seen the packet.
>
> Sorry for top-posting before. It's incredibly hard to get Outlook 2007 to
> do things right.
>
> Varun, I now see we may not have answered the question you have. TSO (TCP
> Segementation Offload)
> is associated with sending packets, not receiving them. They are
> re-assembled at the receiving
> end in the standard manner.
>
> Are you actually thinking of GRO (Generic Receive Offload)?
>
> Craig
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130604/d074d53e/attachment.html 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-06-04 14:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-03  9:18 assembly of packets Varun Sharma
2013-06-03 16:02 ` Valdis.Kletnieks at vt.edu
2013-06-03 16:15   ` Craig Jackson
2013-06-04  6:44     ` Varun Sharma
2013-06-04 13:54       ` Craig Jackson
2013-06-04 14:27         ` Varun Sharma

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.