All of lore.kernel.org
 help / color / mirror / Atom feed
* Need some help with IP/TCP Checksum Offload
@ 2002-02-22 22:57 harish.vasudeva
  2002-02-22 23:52 ` Benjamin LaHaise
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: harish.vasudeva @ 2002-02-22 22:57 UTC (permalink / raw)
  To: linux-kernel

Hi All,

 I am trying to offload checksum calculation to my hardware. What i am doing in my driver (kernel 2.4.6) is :

 dev->features = NETIF_F_IP_CHECKSUM;

 Then, in my start_xmit( ) routine, i am parsing for the right headers & when i get the IP/TCP header, i print out the checksum & it is already the right checksum. When does the OS/Protocol offload this task? Am i missing something here?

thanx for your help
HARISH V
Enterprise Connectivity Solutions, AMD
(408) 749-3324 (Work) 
* Knowledge becomes wisdom only after it has been put to practical use.  *



^ permalink raw reply	[flat|nested] 7+ messages in thread
* RE: Need some help with IP/TCP Checksum Offload
@ 2002-02-23  0:56 harish.vasudeva
  2002-02-25 16:22 ` Ion Badulescu
  0 siblings, 1 reply; 7+ messages in thread
From: harish.vasudeva @ 2002-02-23  0:56 UTC (permalink / raw)
  To: ionut; +Cc: linux-kernel

i tried setting the NETIF_F_SG flag, but the stack still gives the right checksum. 

Now, i have this 1 more question. If @ all the stack does offload chksum to the hardware, how will the driver come to know about this? Is there a per packet indication from the stack asking the driver TO-DO/OR-NOT-TO-DO chksum offloading?

thanx again
HV

-----Original Message-----
From: Ion Badulescu [mailto:ionut@cs.columbia.edu]
Sent: Friday, February 22, 2002 4:01 PM
To: Vasudeva, Harish
Cc: linux-kernel@vger.kernel.org
Subject: Re: Need some help with IP/TCP Checksum Offload


On Fri, 22 Feb 2002 14:57:22 -0800, harish.vasudeva@amd.com wrote:
> 
> I am trying to offload checksum calculation to my hardware. What i am doing in my driver (kernel 2.4.6) is :
> 
> dev->features = NETIF_F_IP_CHECKSUM;
> 
> Then, in my start_xmit( ) routine, i am parsing for the right headers & when i get the IP/TCP header, i print out the checksum & it is already the right checksum. When does the OS/Protocol offload this task? Am i missing something here?

I haven't looked at this in a long time, but at the time the checksum
offloading support was introduced, the IP stack needed both NETIF_F_SG
and NETIF_F_IP_CSUM in dev->features before it would start offloading.

The idea was that cksum support without scatter-gather support is useless,
because the csum gets calculated essentially for free while copying the data
to linearize the skbuf.

Ion

-- 
  It is better to keep your mouth shut and be thought a fool,
            than to open it and remove all doubt.


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

end of thread, other threads:[~2002-02-25 16:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-02-22 22:57 Need some help with IP/TCP Checksum Offload harish.vasudeva
2002-02-22 23:52 ` Benjamin LaHaise
2002-02-23  0:00 ` Ion Badulescu
2002-02-23  7:34 ` Andi Kleen
2002-02-24 17:48 ` Marek Zawadzki
  -- strict thread matches above, loose matches on Subject: below --
2002-02-23  0:56 harish.vasudeva
2002-02-25 16:22 ` Ion Badulescu

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.