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] [day] [month] [year] [list]
Date:   Mon, 5 Dec 2016 15:43:48 +0000
From:   Salil Mehta <salil.mehta@...wei.com>
To:     David Miller <davem@...emloft.net>
CC:     "Zhuangyuzeng (Yisen)" <yisen.zhuang@...wei.com>,
        "mehta.salil.lnk@...il.com" <mehta.salil.lnk@...il.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Linuxarm <linuxarm@...wei.com>
Subject: RE: [PATCH V2 net-next] net: hns: Fix to conditionally convey RX
 checksum flag to stack

> -----Original Message-----
> From: David Miller [mailto:davem@...emloft.net]
> Sent: Saturday, December 03, 2016 8:09 PM
> To: Salil Mehta
> Cc: Zhuangyuzeng (Yisen); mehta.salil.lnk@...il.com;
> netdev@...r.kernel.org; linux-kernel@...r.kernel.org; Linuxarm
> Subject: Re: [PATCH V2 net-next] net: hns: Fix to conditionally convey
> RX checksum flag to stack
> 
> From: Salil Mehta <salil.mehta@...wei.com>
> Date: Thu, 1 Dec 2016 12:09:22 +0000
> 
> > But maybe now since we don't have any method to de-multiplex the kind
> of
> > checksum error (cannot depend upon register) we can have below code
> > re-arrangement:
> >
> > hns_nic_rx_checksum() {
> >       /* check supported L3 protocol */
> > 	if (l3 != IPV4 && l3 != IPV6)
> > 		return;
> >       /* check if L3 protocols error */
> >       if (l3e)
> > 	 	return;
> >
> >       /* check if the packets are fragmented */
> > 	If (l3frags)
> > 		Return;
> >
> >       /* check supported L4 protocol */
> >  	if (l4 != UDP && l4 != TCP && l4 != SCTP)
> >  		return;
> >       /* check if any L4 protocol error */
> >       if (l3e)
> > 	 	return;
> >
> >       /* packet with valid checksum - covey to stack */
> >       skb->ip_summed = CHECKSUM_UNNECESSARY
> > }
> 
> This looks a lot cleaner and easier to understand.
Sure, floated Patch V3. Please have a look. Thanks!

Best regards
Salil

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ