From: Andi Kleen <ak@suse.de>
To: harish.vasudeva@amd.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: Need some help with IP/TCP Checksum Offload
Date: Sat, 23 Feb 2002 08:34:16 +0100 [thread overview]
Message-ID: <20020223083416.A22421@wotan.suse.de> (raw)
In-Reply-To: <CB35231B9D59D311B18600508B0EDF2F04F280E6@caexmta9.amd.com>
In-Reply-To: <CB35231B9D59D311B18600508B0EDF2F04F280E6@caexmta9.amd.com>
On Fri, Feb 22, 2002 at 02:57:22PM -0800, harish.vasudeva@amd.com wrote:
> 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?
For TX the checksum is only offloaded when you set and support NETIF_F_SG
as well. Otherwise the stack has to copy anyways and can compute the
checksum during the copy operation. Then with NETIF_F_SG the TX checksumming
will only be used with sendfile(), because that is the only way to do zero
copy for now.
For RX you should set skb->ip_summed and skb->csum. The hardware checksum
is more useful in this case.
-Andi
next prev parent reply other threads:[~2002-02-23 7:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-22 22:57 harish.vasudeva
2002-02-22 23:52 ` Benjamin LaHaise
2002-02-23 0:00 ` Ion Badulescu
2002-02-23 7:34 ` Andi Kleen [this message]
2002-02-24 17:48 ` Marek Zawadzki
2002-02-23 0:56 harish.vasudeva
2002-02-25 16:22 ` Ion Badulescu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020223083416.A22421@wotan.suse.de \
--to=ak@suse.de \
--cc=harish.vasudeva@amd.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®