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: <5491EB06.2060803@redhat.com>
Date:	Wed, 17 Dec 2014 15:43:50 -0500
From:	Vlad Yasevich <vyasevic@...hat.com>
To:	Ben Hutchings <ben@...adent.org.uk>,
	Vladislav Yasevich <vyasevich@...il.com>
CC:	netdev@...r.kernel.org, virtualization@...ts.linux-foundation.org,
	mst@...hat.com, stefanha@...hat.com
Subject: Re: [PATCH 01/10] core: Split out UFO6 support

On 12/17/2014 03:10 PM, Ben Hutchings wrote:
> On Wed, 2014-12-17 at 13:20 -0500, Vladislav Yasevich wrote:
>> Split IPv6 support for UFO into its own feature similiar to TSO.
>> This will later allow us to re-enable UFO support for virtio-net
>> devices.
> [...]
>> diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
>> index 6c8b6f6..8538b67 100644
>> --- a/include/linux/skbuff.h
>> +++ b/include/linux/skbuff.h
>> @@ -372,6 +372,7 @@ enum {
>>  
>>  	SKB_GSO_MPLS = 1 << 12,
>>  
>> +	SKB_GSO_UDP6 = 1 << 13
> 
> It seems like it would be cleaner to use the names SKB_GSO_UDPV{4,6},
> similarly to SKB_GSO_TCPV{4,6}.

I wanted to try to avoid touched ipv4 paths if I could.  I could use
GSO_UDPV6 though.

> 
>>  };
>>  
>>  #if BITS_PER_LONG > 32
>> diff --git a/net/core/dev.c b/net/core/dev.c
>> index 945bbd0..fa4d2ee 100644
>> --- a/net/core/dev.c
>> +++ b/net/core/dev.c
> [...]
>> @@ -5952,24 +5958,21 @@ static netdev_features_t netdev_fix_features(struct net_device *dev,
> [...]
>> +	/* UFO also needs checksumming */
>> +	if ((features & NETIF_F_UFO) && !(features & NETIF_F_GEN_CSUM) &&
>> +					!(features & NETIF_F_IP_CSUM)) {
> 
> You can use !(features & NETIF_F_V4_CSUM) instead of the last two terms.
> 
>> +		netdev_dbg(dev,
>> +			   "Dropping NETIF_F_UFO since no checksum offload features.\n");
>> +		features &= ~NETIF_F_UFO;
>> +	}
>> +	if ((features & NETIF_F_UFO6) && !(features & NETIF_F_GEN_CSUM) &&
>> +					 !(features & NETIF_F_IPV6_CSUM)) {
> [...]
> 
> Similarly you can use !(features & NETIF_F_V6_CSUM) instead of the last
> two terms.

I made those to look the same as the TSO checks for consistency, but I can change
these to be shorter like above.

-vlad

> 
> Aside from those minor points, this looks fine.
> 
> Ben.
> 

--
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