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
| ||
|
Date: Wed, 17 Apr 2013 15:43:04 +0100 From: Jim Baxter <jim_baxter@...tor.com> To: Ben Hutchings <bhutchings@...arflare.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 16/04/13 23:41, Ben Hutchings wrote: > 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. > Thanks for that information Ben, that is good to know. Has anyone used ping6 or iperf -V, whilst debugging I have found that the packets being sent are of protocol 0x0800 when using those commands. Jim -- 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