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:	Fri, 19 Apr 2013 16:55:07 +0100
From:	Jim Baxter <jim_baxter@...tor.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
CC:	"David S. Miller" <davem@...emloft.net>,
	Fabio Estevam <fabio.estevam@...escale.com>,
	Frank Li <Frank.Li@...escale.com>,
	Fugang Duan <B38611@...escale.com>, <netdev@...r.kernel.org>,
	Ben Hutchings <bhutchings@...arflare.com>
Subject: Re: [PATCH net-next v4 1/1] net: fec: Enable imx6 enet checksum acceleration.

On 19/04/13 16:29, Eric Dumazet wrote:
> On Fri, 2013-04-19 at 16:10 +0100, Jim Baxter wrote:
>>  
>> +static int
>> +fec_enet_clear_csum(struct sk_buff *skb, struct net_device *ndev)
>> +{
>> +	/* Only run for packets requiring a checksum. */
>> +	if (skb->ip_summed != CHECKSUM_PARTIAL)
>> +		return 0;
>> +
>> +	if (unlikely(skb_cow_head(skb, 0)))
>> +		return -1;
>> +
>> +	*(__sum16 *)(skb->head + skb->csum_start + skb->csum_offset) = 0;
>> +
>> +	return 0;
>> +}
> 
> 
>  
>> +	/* HW acceleration for ICMP TCP UDP checksum */
>> +	if (fec_enet_clear_csum(skb, ndev))
>> +		return NETDEV_TX_BUSY;
> 
> No : You must drop the packet and return NETDEV_TX_OK
> 
> 
> 

I have no issue with changing it, but I am curious, by returning OK will
the kernel not regard it a sent packet and it will be lost?

Thank you,
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ