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, 05 Feb 2016 01:32:52 +0000
From:	Ben Hutchings <ben@...adent.org.uk>
To:	Edward Cree <ecree@...arflare.com>,
	David Miller <davem@...emloft.net>
Cc:	netdev@...r.kernel.org,
	linux-net-drivers <linux-net-drivers@...arflare.com>
Subject: Re: [PATCH net-next 1/2] ethtool: add IPv6 to the NFC API

On Tue, 2016-02-02 at 18:49 +0000, Edward Cree wrote:
> Signed-off-by: Edward Cree <ecree@...arflare.com>
> ---
>  include/uapi/linux/ethtool.h | 70 ++++++++++++++++++++++++++++++++++++++++----
>  1 file changed, 64 insertions(+), 6 deletions(-)
> 
> diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
> index 57fa390..3b6af3e 100644
> --- a/include/uapi/linux/ethtool.h
> +++ b/include/uapi/linux/ethtool.h
> @@ -748,6 +748,56 @@ struct ethtool_usrip4_spec {
>  	__u8    proto;
>  };
>  
> +/**
> + * struct ethtool_tcpip6_spec - flow specification for TCP/IPv6 etc.
> + * @ip6src: Source host
> + * @ip6dst: Destination host
> + * @psrc: Source port
> + * @pdst: Destination port
> + * @tos: Type-of-service
> + *
> + * This can be used to specify a TCP/IPv6, UDP/IPv6 or SCTP/IPv6 flow.
> + */
> +struct ethtool_tcpip6_spec {
> +	__be32	ip6src[4];
> +	__be32	ip6dst[4];
> +	__be16	psrc;
> +	__be16	pdst;
> +	__u8    tos;
[...]

IPv6 has 'Traffic Class' instead of 'Type of Service'.  At least the
kernel-doc comments should use the proper name, and perhaps you should
rename the 'tos' fields to something like 'tclass'.  (Definitely not
just 'class' as UAPI headers have to be C++ compatible.)

Ben.

-- 
Ben Hutchings
It is a miracle that curiosity survives formal education. - Albert Einstein
Download attachment "signature.asc" of type "application/pgp-signature" (812 bytes)

Powered by blists - more mailing lists