OSDN Git Service

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)
commitb38b7f2bb418510397714c7fb3bed64b6fd024e5
treed359eb078ef5608f6dd23709b8ea31cc96603172
parentfb3612840d4f587a0af9511a11d7989d1fa48206
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: 87324e747fde ("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