lkml.org 
[lkml]   [2011]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] drivers/net/usb/asix: resync from vendor's copy
From
Date
On Mon, 2011-12-05 at 09:41 -0500, Mark Lord wrote:
[...]
> static int ax88772b_bind(struct usbnet *dev, struct usb_interface *intf)
> {
> ...
> /* register support for hardware checksums */
> dev->net->hw_features |= NETIF_F_HW_CSUM | NETIF_F_RXCSUM;
>
> /* enable hardware checksums */
> dev->net->features |= NETIF_F_HW_CSUM | NETIF_F_RXCSUM;
> ax88772b_set_features(dev->net, dev->net->features);
> ...
> }
> -------------------------------snip-----------------------------------
>
> Does this look correct -- any improvements/fixes to suggest?
[...]

NETIF_F_HW_CSUM means the hardware implements generic IP-style
checksumming: the stack specifies the offset at which to start
checksumming and the offset at which to store the checksum, and the
hardware does not attempt to parse the headers.

If this hardware recognises specific protocols and works out the offsets
itself, then you must claim NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM instead.

Ben.

--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.



\
 
 \ /
  Last update: 2011-12-05 16:21    [W:1.926 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site