]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: ethtool: account for RSS+RXNFC add semantics when checking channel count
authorEdward Cree <ecree.xilinx@gmail.com>
Wed, 13 Nov 2024 12:13:10 +0000 (12:13 +0000)
committerJakub Kicinski <kuba@kernel.org>
Fri, 15 Nov 2024 03:53:42 +0000 (19:53 -0800)
commita64499f618b2e3ace083727237f8802aabc73008
treef97c5fcf4d73671dab451d38df150d9ac2e078de
parent9e43ad7a1edef268acac603e1975c8f50a20d02f
net: ethtool: account for RSS+RXNFC add semantics when checking channel count

In ethtool_check_max_channel(), the new RX count must not only cover the
 max queue indices in RSS indirection tables and RXNFC destinations
 separately, but must also, for RXNFC rules with FLOW_RSS, cover the sum
 of the destination queue and the maximum index in the associated RSS
 context's indirection table, since that is the highest queue that the
 rule can actually deliver traffic to.
It could be argued that the max queue across all custom RSS contexts
 (ethtool_get_max_rss_ctx_channel()) need no longer be considered, since
 any context to which packets can actually be delivered will be targeted
 by some RXNFC rule and its max will thus be allowed for by
 ethtool_get_max_rxnfc_channel().  For simplicity we keep both checks, so
 even RSS contexts unused by any RXNFC rule must fit the channel count.

Signed-off-by: Edward Cree <ecree.xilinx@gmail.com>
Link: https://patch.msgid.link/43257d375434bef388e36181492aa4c458b88336.1731499022.git.ecree.xilinx@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ethtool/common.c