* question regarding hw tx csum for IPv6
@ 2010-03-16 9:11 Blaschka
2010-03-16 19:37 ` Ben Hutchings
0 siblings, 1 reply; 3+ messages in thread
From: Blaschka @ 2010-03-16 9:11 UTC (permalink / raw)
To: netdev
Hi,
for me it looks like many network drivers exclude IPv6 frames from
tx hw csum in case they have extended IPv6 headers.
Does the stack generates the csum for this kind of frames anyhow
the device claims to do NETIF_F_HW_CSUM?
Thanks for any help
Frank
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: question regarding hw tx csum for IPv6
2010-03-16 9:11 question regarding hw tx csum for IPv6 Blaschka
@ 2010-03-16 19:37 ` Ben Hutchings
2010-03-16 19:44 ` Ben Hutchings
0 siblings, 1 reply; 3+ messages in thread
From: Ben Hutchings @ 2010-03-16 19:37 UTC (permalink / raw)
To: Blaschka; +Cc: netdev
On Tue, 2010-03-16 at 10:11 +0100, Blaschka wrote:
> Hi,
>
> for me it looks like many network drivers exclude IPv6 frames from
> tx hw csum in case they have extended IPv6 headers.
> Does the stack generates the csum for this kind of frames anyhow
> the device claims to do NETIF_F_HW_CSUM?
The NETIF_F_*_CSUM flags are for checksum generation, not checksum
validation. The networking stack does not need to know about the
device's checksum validation capabilities but only needs to know whether
individual skbs have been validated. If the device reports the
checksum(s) as invalid or if it cannot parse the packet you set
skb->ip_summed = CHECKSUM_NONE and it will be verified in software if
necessary.
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: question regarding hw tx csum for IPv6
2010-03-16 19:37 ` Ben Hutchings
@ 2010-03-16 19:44 ` Ben Hutchings
0 siblings, 0 replies; 3+ messages in thread
From: Ben Hutchings @ 2010-03-16 19:44 UTC (permalink / raw)
To: Blaschka; +Cc: netdev
On Tue, 2010-03-16 at 19:37 +0000, Ben Hutchings wrote:
> On Tue, 2010-03-16 at 10:11 +0100, Blaschka wrote:
> > Hi,
> >
> > for me it looks like many network drivers exclude IPv6 frames from
> > tx hw csum in case they have extended IPv6 headers.
> > Does the stack generates the csum for this kind of frames anyhow
> > the device claims to do NETIF_F_HW_CSUM?
>
> The NETIF_F_*_CSUM flags are for checksum generation, not checksum
> validation.
[...]
Sorry, I misread your question.
NETIF_F_IPV6_CSUM means the device can generate checksums for all
TCP/IPv6 and UDP/IPv6 packets.
NETIF_F_HW_CSUM is different; it means the hardware can generate a
16-bit checksum of the whole packet starting with a given seed value and
place it at a specified offset before transmitting the packet. The
hardware does not have to parse specific protocols in this case.
If your hardware parses specific protocols then the driver could use
skb_linearize() and the checksum helper functions in the cases that the
hardware doesn't handle. Then you would still have the benefit of
checksum generation offload in the normal case.
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
end of thread, other threads:[~2010-03-16 19:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-16 9:11 question regarding hw tx csum for IPv6 Blaschka
2010-03-16 19:37 ` Ben Hutchings
2010-03-16 19:44 ` Ben Hutchings
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).