Thread (5 messages) flat view 5 messages, 2 authors, 2016-02-05

Re: [PATCH net-next 1/2] ethtool: add IPv6 to the NFC API

From: Ben Hutchings <hidden>
Date: 2016-02-05 01:33:06

On Tue, 2016-02-02 at 18:49 +0000, Edward Cree wrote:
quoted hunk ↗ jump to hunk
Signed-off-by: Edward Cree <redacted>
---
 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

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help