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:	Wed, 30 May 2007 18:13:24 +0200
From:	Patrick McHardy <kaber@...sh.net>
To:	Stephen Hemminger <shemminger@...ux-foundation.org>
CC:	Herbert Xu <herbert.xu@...hat.com>,
	"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
	Michael Chan <mchan@...adcom.com>
Subject: Re: [RFC] IPV6 checksum offloading in network devices

Stephen Hemminger wrote:
> Here is a proposed change to address hardware that can do IPV6 checksum
> offload, but doesn't truly do generic hw checksumming.  The bnx2 and tg3
> are like this for some revisions, and upcoming Marvell 88e8071 is similar.
> 
> 
> --- a/include/linux/netdevice.h	2007-05-30 08:26:18.000000000 -0700
> +++ b/include/linux/netdevice.h	2007-05-30 08:30:20.000000000 -0700
> @@ -314,9 +314,10 @@ struct net_device
>  	/* Net device features */
>  	unsigned long		features;
>  #define NETIF_F_SG		1	/* Scatter/gather IO. */
> -#define NETIF_F_IP_CSUM		2	/* Can checksum only TCP/UDP over IPv4. */
> +#define NETIF_F_IP_CSUM		2	/* Can checksum TCP/UDP over IPv4. */
>  #define NETIF_F_NO_CSUM		4	/* Does not require checksum. F.e. loopack. */
>  #define NETIF_F_HW_CSUM		8	/* Can checksum all the packets. */
> +#define NETIF_F_IPV6_CSUM	16	/* Can checksum TCP/UDP over IPV6 */
>  #define NETIF_F_HIGHDMA		32	/* Can DMA to high memory. */
>  #define NETIF_F_FRAGLIST	64	/* Scatter/gather IO. */
>  #define NETIF_F_HW_VLAN_TX	128	/* Transmit VLAN hw acceleration */
> @@ -339,7 +340,8 @@ struct net_device
>  #define NETIF_F_GSO_SOFTWARE	(NETIF_F_TSO | NETIF_F_TSO_ECN | NETIF_F_TSO6)
>  
>  #define NETIF_F_GEN_CSUM	(NETIF_F_NO_CSUM | NETIF_F_HW_CSUM)
> -#define NETIF_F_ALL_CSUM	(NETIF_F_IP_CSUM | NETIF_F_GEN_CSUM)
> +#define NETIF_F_ALL_CSUM	(NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM \
> +				 | NETIF_F_GEN_CSUM)


This might confuse some of the existing IPv4 code that
checks for NETIF_F_ALL_CSUM if we ever get a device that
has NETIF_F_IPV6_CSUM but not NETIF_F_IP_CSUM.

-
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