netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* GSO / TSO offload dependency
@ 2010-02-28 17:00 raj ravi
  2010-02-28 19:30 ` Ben Hutchings
  0 siblings, 1 reply; 3+ messages in thread
From: raj ravi @ 2010-02-28 17:00 UTC (permalink / raw)
  To: netdev

Hi,
I m currently working on TSO feature in Linux network driver.

Please correct my understanding.

GSO - Generic segmentation offload - does not require any hardware support.

TSO - TCP segmentation offload  - does require hardward support


Does TSO needs GSO to be turned on?  OR in other words,  can I have
GSO disabled and TSO Enabled ?
I beleive the code is tied between both offload...but not sure about
the above possibility... please clarify.


Just before handing over the packets to the Network driver,
segmentation is carried out a call to dev_gso_segment ( ) function.
Given GSO is enabled, It will take care about creating TCP and other
protocol  segments  too,  even if TSO is disabled.. ..correct ?

If hardware supports TSO, and  If TSO and GSO are both enabled, ...
what will happen to segmentation assembly by means of GSO ...
GSO will not do any segmentatoin assembly for TCP alone and will do
for other protocols ??  bit confused here? Please clarify.

Thx!
Kavi

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

* Re: GSO / TSO offload dependency
  2010-02-28 17:00 GSO / TSO offload dependency raj ravi
@ 2010-02-28 19:30 ` Ben Hutchings
  2013-06-05  9:28   ` Deepak
  0 siblings, 1 reply; 3+ messages in thread
From: Ben Hutchings @ 2010-02-28 19:30 UTC (permalink / raw)
  To: raj ravi; +Cc: netdev

On Sun, 2010-02-28 at 22:30 +0530, raj ravi wrote:
> Hi,
> I m currently working on TSO feature in Linux network driver.
> 
> Please correct my understanding.
> 
> GSO - Generic segmentation offload - does not require any hardware support.
> 
> TSO - TCP segmentation offload  - does require hardward support
> 
> 
> Does TSO needs GSO to be turned on?  OR in other words,  can I have
> GSO disabled and TSO Enabled ?
> I beleive the code is tied between both offload...but not sure about
> the above possibility... please clarify.

Segmentation/fragmentation can be done in one of three places:
1. By the transport protocol, when constructing skbs to be queued
2. By the transport protocol, when an skb is about to be passed to the
device (enabled by NETIF_F_GSO)
3. By the device driver and hardware (enabled by NETIF_F_TSO,
NETIF_F_UFO, etc.)

Depending on the context, 'GSO' can refer either to case 2, or to both
cases 2 and 3.  TSO does not need the NETIF_F_GSO feature to be turned
on, but in some contexts it is considered to be included in GSO.

> Just before handing over the packets to the Network driver,
> segmentation is carried out a call to dev_gso_segment ( ) function.
> Given GSO is enabled, It will take care about creating TCP and other
> protocol  segments  too,  even if TSO is disabled.. ..correct ?

Correct.

> If hardware supports TSO, and  If TSO and GSO are both enabled, ...
> what will happen to segmentation assembly by means of GSO ...
> GSO will not do any segmentatoin assembly for TCP alone and will do
> for other protocols ??  bit confused here? Please clarify.

Your understanding is correct.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
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] 3+ messages in thread

* Re: GSO / TSO offload dependency
  2010-02-28 19:30 ` Ben Hutchings
@ 2013-06-05  9:28   ` Deepak
  0 siblings, 0 replies; 3+ messages in thread
From: Deepak @ 2013-06-05  9:28 UTC (permalink / raw)
  To: netdev


> > If hardware supports TSO, and  If TSO and GSO are both enabled, ...
> > what will happen to segmentation assembly by means of GSO ...
> > GSO will not do any segmentatoin assembly for TCP alone and will do
> > for other protocols ??  bit confused here? Please clarify.
> 
> Your understanding is correct.
> 
> Ben.
> 


I havn't understood this one, In case of TCP Protocol (Hardware support TSO 
and TSO & GSO are enabled), will it go through the GSO  segmentation assembly 
code ??

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

end of thread, other threads:[~2013-06-06  4:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-28 17:00 GSO / TSO offload dependency raj ravi
2010-02-28 19:30 ` Ben Hutchings
2013-06-05  9:28   ` Deepak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).