All of lore.kernel.org
 help / color / mirror / Atom feed
* question about UFO behavior for bridge device
@ 2011-05-13  9:21 Shan Wei
  2011-05-13 13:06 ` Ben Hutchings
  0 siblings, 1 reply; 4+ messages in thread
From: Shan Wei @ 2011-05-13  9:21 UTC (permalink / raw)
  To: 单卫, Herbert Xu, Ben Hutchings, netdev

UDP protocol creates a big packet(skb) in which the data length is greater than MTU.

If device(eth0, lo) does not supports UFO, This big skb will be fragmented to
many fragments in IP protocol, and fragments are sent one by one by device.

But, if device(eth0, lo) supports UFO, IP protocol don't fragment it, and
device directly sends it out.

For bridge device which enable UFO, and Ethernet device(eth0) which not 
support UFO, IP protocol also doesn't fragment it, and bridge forwards original
skb to eth0. For this UFO disabled eth0, kernel needs to perform segmentation
on so big skb in dev_gso_segment(), and link segmented skbs to next field
of original skb. Then device sends segmented skbs out, but not original skb.

But, actually, i saw original big skb in eth0's tcpdump file, but not segmented skbs.
The behavior is right or what we want?
Is there anything missed about my analysis?

-- 
Best Regards
-----
Shan Wei

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

* Re: question about UFO behavior for bridge device
  2011-05-13  9:21 question about UFO behavior for bridge device Shan Wei
@ 2011-05-13 13:06 ` Ben Hutchings
  2011-05-13 14:36   ` Herbert Xu
  0 siblings, 1 reply; 4+ messages in thread
From: Ben Hutchings @ 2011-05-13 13:06 UTC (permalink / raw)
  To: Shan Wei; +Cc: Herbert Xu, netdev

On Fri, 2011-05-13 at 17:21 +0800, Shan Wei wrote:
> UDP protocol creates a big packet(skb) in which the data length is greater than MTU.
> 
> If device(eth0, lo) does not supports UFO, This big skb will be fragmented to
> many fragments in IP protocol, and fragments are sent one by one by device.
> 
> But, if device(eth0, lo) supports UFO, IP protocol don't fragment it, and
> device directly sends it out.
> 
> For bridge device which enable UFO, and Ethernet device(eth0) which not 
> support UFO, IP protocol also doesn't fragment it, and bridge forwards original
> skb to eth0. For this UFO disabled eth0, kernel needs to perform segmentation
> on so big skb in dev_gso_segment(), and link segmented skbs to next field
> of original skb. Then device sends segmented skbs out, but not original skb.

Right, it does that just before calling the driver's ndo_start_xmit().

> But, actually, i saw original big skb in eth0's tcpdump file, but not segmented skbs.
> The behavior is right or what we want?
> Is there anything missed about my analysis?

I assume that packet capturing is handled earlier in the transmit path.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.


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

* Re: question about UFO behavior for bridge device
  2011-05-13 13:06 ` Ben Hutchings
@ 2011-05-13 14:36   ` Herbert Xu
  2011-05-14  9:54     ` Shan Wei
  0 siblings, 1 reply; 4+ messages in thread
From: Herbert Xu @ 2011-05-13 14:36 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: Shan Wei, netdev

On Fri, May 13, 2011 at 02:06:52PM +0100, Ben Hutchings wrote:
>
> > But, actually, i saw original big skb in eth0's tcpdump file, but not segmented skbs.
> > The behavior is right or what we want?
> > Is there anything missed about my analysis?
> 
> I assume that packet capturing is handled earlier in the transmit path.

Yes it is.  It's the same with TSO.

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

* Re: question about UFO behavior for bridge device
  2011-05-13 14:36   ` Herbert Xu
@ 2011-05-14  9:54     ` Shan Wei
  0 siblings, 0 replies; 4+ messages in thread
From: Shan Wei @ 2011-05-14  9:54 UTC (permalink / raw)
  To: Herbert Xu, Ben Hutchings; +Cc: netdev

Herbert Xu wrote, at 05/13/2011 10:36 PM:
> On Fri, May 13, 2011 at 02:06:52PM +0100, Ben Hutchings wrote:
>>
>>> But, actually, i saw original big skb in eth0's tcpdump file, but not segmented skbs.
>>> The behavior is right or what we want?
>>> Is there anything missed about my analysis?
>>
>> I assume that packet capturing is handled earlier in the transmit path.
> 
> Yes it is.  It's the same with TSO.

Be cheated by tcpdump. :-(
dev_queue_xmit_nit(skb, dev) which dumps packet to user is called before handling GSO segments.

Thanks very much.

-- 
Best Regards
-----
Shan Wei

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

end of thread, other threads:[~2011-05-14  9:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-13  9:21 question about UFO behavior for bridge device Shan Wei
2011-05-13 13:06 ` Ben Hutchings
2011-05-13 14:36   ` Herbert Xu
2011-05-14  9:54     ` Shan Wei

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.