From 6b49a53e47a66548ee389a03a556a4467b0191f1 Mon Sep 17 00:00:00 2001 From: Jakub Kicinski Date: Fri, 26 Mar 2021 13:22:21 -0700 Subject: [PATCH] ethtool: fec: add note about reuse of reserved struct ethtool_fecparam::reserved can't be used in SET, because ethtool user space doesn't zero-initialize the structure. Make this clear. Suggested-by: Andrew Lunn Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller Signed-off-by: hongrongxuan --- include/uapi/linux/ethtool.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h index 7d5ee0bb5faf..7d6f02283401 100644 --- a/include/uapi/linux/ethtool.h +++ b/include/uapi/linux/ethtool.h @@ -1380,6 +1380,10 @@ struct ethtool_per_queue_op { * @fec: Bitmask of configured FEC modes. * @reserved: Reserved for future extensions, ignore on GET, write 0 for SET. * + * Note that @reserved was never validated on input and ethtool user space + * left it uninitialized when calling SET. Hence going forward it can only be + * used to return a value to userspace with GET. + * * FEC modes supported by the device can be read via %ETHTOOL_GLINKSETTINGS. * FEC settings are configured by link autonegotiation whenever it's enabled. * With autoneg on %ETHTOOL_GFECPARAM can be used to read the current mode.