]> 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)
commit7fe64eeea88b160ad85dbf9d80baf7f34ca3617b
treed359eb078ef5608f6dd23709b8ea31cc96603172
parentd4443fc1b8deace1a857bd88b54f91162364fc27
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: b13396ff6434 ("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