aboutsummaryrefslogtreecommitdiff
path: root/fs/sysv
diff options
context:
space:
mode:
authorEdward Cree <ecree.xilinx@gmail.com>2024-08-07 17:06:12 +0100
committerJakub Kicinski <kuba@kernel.org>2024-08-08 08:54:33 -0700
commitb54de55990b0467538c6bb33523b28816384958a (patch)
tree22dfd137cf6326d2af9e6386baad788cb3b41e9f /fs/sysv
parenta70b637db15b4de25af3c5946c4399144b3bc241 (diff)
net: ethtool: fix off-by-one error in max RSS context IDs
Both ethtool_ops.rxfh_max_context_id and the default value used when it's not specified are supposed to be exclusive maxima (the former is documented as such; the latter, U32_MAX, cannot be used as an ID since it equals ETH_RXFH_CONTEXT_ALLOC), but xa_alloc() expects an inclusive maximum. Subtract one from 'limit' to produce an inclusive maximum, and pass that to xa_alloc(). Increase bnxt's max by one to prevent a (very minor) regression, as BNXT_MAX_ETH_RSS_CTX is an inclusive max. This is safe since bnxt is not actually hard-limited; BNXT_MAX_ETH_RSS_CTX is just a leftover from old driver code that managed context IDs itself. Rename rxfh_max_context_id to rxfh_max_num_contexts to make its semantics (hopefully) more obvious. Fixes: 847a8ab18676 ("net: ethtool: let the core choose RSS context IDs") Signed-off-by: Edward Cree <ecree.xilinx@gmail.com> Link: https://patch.msgid.link/5a2d11a599aa5b0cc6141072c01accfb7758650c.1723045898.git.ecree.xilinx@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'fs/sysv')
0 files changed, 0 insertions, 0 deletions