lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 7 Dec 2011 16:27:12 +0000
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Mark Lord <kernel@...savvy.com>
CC:	David Miller <davem@...emloft.net>, <netdev@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drivers/net/usb/asix:  resync from vendor's copy

On Wed, 2011-12-07 at 11:21 -0500, Mark Lord wrote:
> On 11-12-06 12:45 PM, Ben Hutchings wrote:
> > On Tue, 2011-12-06 at 07:44 -0500, Mark Lord wrote:
> >> On 11-12-05 10:18 AM, Ben Hutchings wrote:
> >>> On Mon, 2011-12-05 at 09:41 -0500, Mark Lord wrote:
> ..
> >>> 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.
> >>
> >> Yeah, the hardware seems to understand quite a few protocol formats.
> >> Okay, so I'll claim the protocol-specific flags in net->hw_features.
> >>
> >> But what do I use in net->features?
> >> The exact same protocol flags,
> >> or the generic NETIF_F_HW_CSUM | NETIF_F_RXCSUM ones?
> > 
> > You set the flags for features that are actually being implemented!
> > 
> > But do set NETIF_F_RXCSUM in both places.  The network stack doesn't
> > know or care exactly what protocols you can do RX checksum validation
> > for, so there is only one flag for this.  Only the TX checksum
> > generation features have to be distinguished.
> > 
> >> The set_features() function also has to test for flags
> >> to know what to do.  Should it test specific protocol flags,
> >> or just the generic two ?
> > 
> > Think it through.
> ..
> 
> Heh.. my thinking side says to use the exact same protocol-specific flags
> in both "hw_features" and "features", and therefore check for those flags
> inside the "set_features()" function.

Right.

> But that's not what earlier versions of this driver did,
> and nor what the vendor's driver does.
> Those versions all mix the protocol-specific and generic flags.

The in-tree driver doesn't seem to have ever enabled checksum offload
features.

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.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ