Comment 0 for bug 1793404

Revision history for this message
dann frazier (dannf) wrote :

[Impact]
Changing the channel parameters of an hns3 device (ethtool -L) has an unintended side-effect of resetting the ring parameters back to their defaults. If a user has applied custom ring parameters (ethtool -G), they will be lost.

[Test Case]
Set custom ring parameters:
  $ sudo ethtool -G <hns3-dev> rx 512 tx 512
Verify the change:
  $ sudo ethtool -g enp125s0f2
  Ring parameters for enp125s0f2:
  Pre-set maximums:
  RX: 32768
  RX Mini: 0
  RX Jumbo: 0
  TX: 32768
  Current hardware settings:
  RX: 512
  RX Mini: 0
  RX Jumbo: 0
  TX: 512
Now modify the ring parameters:
  sudo ethtool -L <hns3-dev> enp124s0f2 combined 4
And noticed that the channel parameters are now back at their defaults:
  $ sudo ethtool -g enp125s0f2
  Ring parameters for enp125s0f2:
  Pre-set maximums:
  RX: 32768
  RX Mini: 0
  RX Jumbo: 0
  TX: 32768
  Current hardware settings:
  RX: 1024
  RX Mini: 0
  RX Jumbo: 0
  TX: 1024

[Fix]
commit 128b900de7df567ca7ca063bf5da4ed0f357db8c
Author: Yunsheng Lin <email address hidden>
Date: Tue Aug 14 17:13:16 2018 +0100

    net: hns3: Fix desc num set to default when setting channel

[Regression Risk]
Localized to a single driver, tested on the one SoC that includes this device.