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]
Message-ID: <1331764214.2564.33.camel@bwh-desktop.uk.solarflarecom.com>
Date:	Wed, 14 Mar 2012 22:30:14 +0000
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	"Zou, Yi" <yi.zou@...el.com>
CC:	"Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>,
	"davem@...emloft.net" <davem@...emloft.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"gospo@...hat.com" <gospo@...hat.com>,
	"sassmann@...hat.com" <sassmann@...hat.com>
Subject: RE: [net 2/2] net: fix a bug of dropping FCoE frames when disabling
 tx ip checksum

On Wed, 2012-03-14 at 20:48 +0000, Zou, Yi wrote:
> > 
> > On Wed, 2012-03-14 at 00:01 -0700, Jeff Kirsher wrote:
> > > From: Yi Zou <yi.zou@...el.com>
> > >
> > > Fix a bug when using 'ethtool -K ethx tx off' to turn off tx ip
> > checksum,
> > > FCoE CRC offload should not be impacte. The skb_checksum_help() is
> > needed
> > > only if it's not FCoE traffic for ip checksum, regardless of ethtool
> > toggling
> > > the tx ip checksum on or off.
> > [...]
> > 
> > I think the bug is more fundamental, and it's not just a problem for
> > FCoE.  For the transmit path, the ip_summed values are specified as:
> > 
> > [forwarding]
> >  *	COMPLETE: the most generic way. Device supplied checksum of _all_
> >  *	    the packet as seen by netif_rx in skb->csum.
> >  *	    NOTE: Even if device supports only some protocols, but
> >  *	    is able to produce some skb->csum, it MUST use COMPLETE,
> >  *	    not UNNECESSARY.
> > 
> > [locally-generated]
> >  *	NONE: skb is checksummed by protocol or csum is not required.
> >  *
> >  *	PARTIAL: device is required to csum packet as seen by
> > hard_start_xmit
> >  *	from skb->csum_start to the end and to record the checksum
> >  *	at skb->csum_start + skb->csum_offset.
> > 
> > It's implicit that the checksum algorithm for CHECKSUM_PARTIAL is as
> > specified for TCP/IP.  So none of those is correct when a different
> > algorithm is to be used.
> > 
> > It seems like we may need another ip_summed value for FCoE, SCTP or any
> > other protocol with a different checksum algorithm that will be
> > offloaded.  Maybe allow CHECKSUM_UNNECESSARY to be used on output in
> > that case?
> > 
> > Ben.
> 
> CHECKSUM_UNNECESSARY sounds good to me, if it's ok to be used on the tx path
> as well,

I don't believe it is yet.

> I think so but I am not 100% sure, it'd resolve this for fcoe and sctp
> like, downside is it's a bigger change that requires corresponding changes in
> these protocol driver stacks as well.

Yes, but this should be done properly rather than patched up with a
bunch of checks for specific protocols.

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 netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ