Skip to content
Snippets Groups Projects
Commit 266a1646 authored by Jean Sacren's avatar Jean Sacren Committed by David S. Miller
Browse files

ethtool: exit the loop when invalid index occurs


The commit 3de0b592 ("ethtool: Support for configurable RSS hash
key") introduced a new function ethtool_copy_validate_indir() with
full iteration of the loop to validate the ring indices, which could
be an overkill. To minimize the impact, we ought to exit the loop as
soon as the invalid index occurs for the very first time. The
remaining loop simply doesn't serve any more purpose.

Signed-off-by: default avatarJean Sacren <sakiwit@gmail.com>
Cc: Venkata Duvvuru <VenkatKumar.Duvvuru@Emulex.Com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a49eb42a
No related branches found
No related tags found
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment