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: <1366152097.2645.63.camel@bwh-desktop.uk.solarflarecom.com>
Date:	Tue, 16 Apr 2013 23:41:37 +0100
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Jim Baxter <jim_baxter@...tor.com>
CC:	"David S. Miller" <davem@...emloft.net>,
	Frank Li <Frank.Li@...escale.com>,
	Fugang Duan <B38611@...escale.com>, <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next v2 1/1] net: fec: Enable imx6 enet checksum
 acceleration.

On Tue, 2013-04-16 at 23:15 +0100, Jim Baxter wrote:
> On 16/04/13 16:39, Ben Hutchings wrote:
[...]
> >> @@ -818,6 +890,19 @@ fec_enet_rx(struct net_device *ndev, int budget)
> >>  				spin_unlock_irqrestore(&fep->tmreg_lock, flags);
> >>  			}
> >>  
> >> +			if (fep->bufdesc_ex &&
> >> +				(fep->csum_flags & FLAG_RX_CSUM_ENABLED)) {
> >> +				struct bufdesc_ex *ebdp =
> >> +					(struct bufdesc_ex *)bdp;
> >> +				if (!(ebdp->cbd_esc & FLAG_RX_CSUM_ENABLED)) {
> >> +					/* don't check it */
> >> +					skb->ip_summed = CHECKSUM_UNNECESSARY;
> > 
> > This looks very strange.  Presumably the RX_ICE and RX_PCR flags
> > indicate checksum errors, and therefore !(ebdp->cbd_esc &
> > FLAG_RX_CSUM_ENABLED) means the checksum(s) are good?  This would be
> > clearer if you defined FLAG_RX_CSUM_ERROR as well (with the same numeric
> > value).
> >
> Agreed, that would be clearer.
> >> +				} else {
> >> +					ndev->stats.rx_errors++;
> > 
> > Layer 3 and 4 errors should not be counted in the net device stats.
> > 
> Ok, are they just for Levls 1 and  2?
[...]

Right, that's my understanding.  Our job as driver writers is to
validate at layer 1 and 2 (FCS error, length error, MAC filtering).
Checksum validation at layers 3 and 4 is an optimisation and the kernel
stack takes care of counting checksum errors.

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