ethtool: Centralise validation of ETHTOOL_{G, S}RXFHINDIR parameters
authorBen Hutchings <bhutchings@solarflare.com>
Thu, 15 Dec 2011 13:55:01 +0000 (13:55 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 16 Dec 2011 18:52:47 +0000 (13:52 -0500)
Add a new ethtool operation (get_rxfh_indir_size) to get the
indirectional table size.  Use this to validate the user buffer size
before calling get_rxfh_indir or set_rxfh_indir.  Use get_rxnfc to get
the number of RX rings, and validate the contents of the new
indirection table before calling set_rxfh_indir.  Remove this
validation from drivers.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Acked-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

No differences found