]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
i40e: drop useless bitmap_weight() call in i40e_set_rxfh_fields()
authorYury Norov (NVIDIA) <yury.norov@gmail.com>
Thu, 18 Dec 2025 01:57:57 +0000 (20:57 -0500)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 3 Mar 2026 16:56:05 +0000 (08:56 -0800)
commit1f3d49734820fdc30655b9ee4e51aede2bf86d45
tree6d0025caad61076ba9d137faa0645df2b5a93ef8
parentdc0cdb7ff3b1e1ff2faf594640724c2771a8b2c6
i40e: drop useless bitmap_weight() call in i40e_set_rxfh_fields()

bitmap_weight() is O(N) and useless here, because the following
for_each_set_bit() returns immediately in case of empty flow_pctypes.

Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/i40e/i40e_ethtool.c