Public bug reported:

[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 <hns3-dev>
  Ring parameters for <hns3-dev>:
  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> combined 4
And noticed that the channel parameters are now back at their defaults:
  $ sudo ethtool -g <hns3-dev>
  Ring parameters for <hns3-dev>:
  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 <linyunsh...@huawei.com>
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.

** Affects: linux (Ubuntu)
     Importance: Undecided
     Assignee: dann frazier (dannf)
         Status: In Progress

** Affects: linux (Ubuntu Bionic)
     Importance: Undecided
     Assignee: dann frazier (dannf)
         Status: In Progress

** Also affects: linux (Ubuntu Bionic)
   Importance: Undecided
       Status: New

** Changed in: linux (Ubuntu Bionic)
       Status: New => In Progress

** Changed in: linux (Ubuntu Bionic)
     Assignee: (unassigned) => dann frazier (dannf)

** Description changed:

  [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
+   $ 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
+   $ sudo ethtool -g <hns3-dev>
+   Ring parameters for <hns3-dev>:
+   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
+   sudo ethtool -L <hns3-dev> 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
+   $ sudo ethtool -g <hns3-dev>
+   Ring parameters for <hns3-dev>:
+   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 <linyunsh...@huawei.com>
  Date:   Tue Aug 14 17:13:16 2018 +0100
  
-     net: hns3: Fix desc num set to default when setting channel
+     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.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1793404

Title:
  hns3: Modifying channel parameters will reset ring parameters back to
  defaults

Status in linux package in Ubuntu:
  In Progress
Status in linux source package in Bionic:
  In Progress

Bug description:
  [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 <hns3-dev>
    Ring parameters for <hns3-dev>:
    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> combined 4
  And noticed that the channel parameters are now back at their defaults:
    $ sudo ethtool -g <hns3-dev>
    Ring parameters for <hns3-dev>:
    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 <linyunsh...@huawei.com>
  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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1793404/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to