]> git.baikalelectronics.ru Git - kernel.git/commit
ice: Re-organizes reqstd/avail {R, T}XQ check/code for efficiency
authorSalil Mehta <salil.mehta@huawei.com>
Fri, 23 Apr 2021 00:00:18 +0000 (01:00 +0100)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Mon, 7 Jun 2021 15:59:01 +0000 (08:59 -0700)
commitacb035dd613ec6c99d2ea84612944b1532a4bfd8
treed359eb078ef5608f6dd23709b8ea31cc96603172
parent4997b28097c2860415dffd2c3aac87a66ce1da51
ice: Re-organizes reqstd/avail {R, T}XQ check/code for efficiency

If user has explicitly requested the number of {R,T}XQs, then it is
unnecessary to get the count of already available {R,T}XQs from the
PF avail_{r,t}xqs bitmap. This value will get overridden by user specified
value in any case.

Re-organize this code for improving the flow, readability and efficiency.
This scope of improvement was found during the review of the ICE driver
code.

Fixes: 8eb7488e93ca ("ice: Implement ethtool ops for channels")
Cc: intel-wired-lan@lists.osuosl.org
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_lib.c