]> git.baikalelectronics.ru Git - kernel.git/commit
iavf: Fix reporting when setting descriptor count
authorMichal Maloszewski <michal.maloszewski@intel.com>
Tue, 26 Oct 2021 12:59:09 +0000 (12:59 +0000)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Mon, 6 Dec 2021 16:27:50 +0000 (08:27 -0800)
commit0db4ac949234711c0b8726b4b2b0049bbf542b40
treed0f7a6f4451645a82b9787d4ce882808ffd77ddb
parentbbfbae645df7b09de3e1d06234b3c305efc8ddb9
iavf: Fix reporting when setting descriptor count

iavf_set_ringparams doesn't communicate to the user that

1. The user requested descriptor count is out of range. Instead it
   just quietly sets descriptors to the "clamped" value and calls it
   done. This makes it look an invalid value was successfully set as
   the descriptor count when this isn't actually true.

2. The user provided descriptor count needs to be inflated for alignment
   reasons.

This behavior is confusing. The ice driver has already addressed this
by rejecting invalid values for descriptor count and
messaging for alignment adjustments.
Do the same thing here by adding the error and info messages.

Fixes: 2af418dd870b ("i40evf: core ethtool functionality")
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Signed-off-by: Michal Maloszewski <michal.maloszewski@intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/iavf/iavf_ethtool.c