2001-11-15 01:21:23

by harish.vasudeva

[permalink] [raw]
Subject: Need Info on Checksum Offloading

Hi All,

Could any1 pls direct me wherein i could find some documentation about implementing checksum offloading for my ethernet LAN driver?

thanx
HARISH V


2001-11-15 01:42:31

by Jeff Garzik

[permalink] [raw]
Subject: Re: Need Info on Checksum Offloading

[email protected] wrote:
>
> Hi All,
>
> Could any1 pls direct me wherein i could find some documentation about implementing checksum offloading for my ethernet LAN driver?


There is not good documentation. Feel free to ask me questions, I am
the Linux network driver maintainer.

First, search the source code in linux/drivers/net/* for
NETIF_F_IP_CSUM, NETIF_F_HW_CSUM, skb->csum, and nr_frags.

Can I expect an ethernet driver submitted to me, soon?

Jeff

--
Jeff Garzik | Only so many songs can be sung
Building 1024 | with two lips, two lungs, and one tongue.
MandrakeSoft | - nomeansno

2001-11-21 18:32:58

by Andi Kleen

[permalink] [raw]
Subject: Re: Need Info on Checksum Offloading

[email protected] writes:

> Hi All,
>
> Could any1 pls direct me wherein i could find some documentation about implementing checksum offloading for my ethernet LAN driver?

include/linux/skbuff.h has a big fat comment describing checksums handling.
Just read it.

For RX checksums you just set ip_summed of the incoming skb
to CHECKSUM_UNNCESSARY (you did a complete check of the checksum;
not recommended as you're unlikely to support all weird protocols) or
CHECKSUM_HW (you put a checksum of the TCP/UDP data area minus pseudo header
and ip header into skb->csum) or CHECKSUM_NONE for sw checksum.

-Andi