From: Ben Hutchings Date: Thu, 15 Dec 2011 13:51:16 +0000 (+0000) Subject: ethtool: Clarify use of size field for ETHTOOL_GRXFHINDIR X-Git-Tag: v2.6.39-400.9.0~338^2~185 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=f1d8afeebc3694ebc9b7b141591c63940fc3abc4;p=users%2Fjedix%2Flinux-maple.git ethtool: Clarify use of size field for ETHTOOL_GRXFHINDIR In order to find out the device's RX flow hash table size, ethtool initially uses ETHTOOL_GRXFHINDIR with a buffer size of zero. This must be supported, but it is not necessary to support any other user buffer size less than the device table size. (cherry picked from commit 14596f7006297b67516e2b6a2b26bcb11fe08fb3) Signed-off-by: Ben Hutchings Signed-off-by: David S. Miller Signed-off-by: Joe Jin --- diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index a6a5156c9e4cf..802707584223e 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h @@ -542,8 +542,9 @@ struct compat_ethtool_rxnfc { /** * struct ethtool_rxfh_indir - command to get or set RX flow hash indirection * @cmd: Specific command number - %ETHTOOL_GRXFHINDIR or %ETHTOOL_SRXFHINDIR - * @size: On entry, the array size of the user buffer. On return from - * %ETHTOOL_GRXFHINDIR, the array size of the hardware indirection table. + * @size: On entry, the array size of the user buffer, which may be zero + * for %ETHTOOL_GRXFHINDIR. On return from %ETHTOOL_GRXFHINDIR, the + * array size of the hardware indirection table. * @ring_index: RX ring/queue index for each hash value */ struct ethtool_rxfh_indir {