• Huazhong Tan's avatar
    net: hns3: fix user configuration loss for ethtool -L · 672ad0ed
    Huazhong Tan authored
    Ethtool -L option with the combined parameter is for changing the number of
    multi-purpose channels of the specified network device. Under the current
    scheme, the user configuration information will be lost after the reset or
    TC information changed.
    
    This patch fixes this issue. By default, this configuration is set to the
    minimum between the number of queues for each enabled TCs and the maximum
    number support available in the hardware. When there is a user
    configuration, regardless of the reset or TC information change, it should
    keep the user's configuration while it is under the hardware limits,
    otherwise set to the maximum number support available in the hardware.
    
    Fixes: 09f2af64 ("net: hns3: add support to modify tqps number")
    Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
    Signed-off-by: default avatarYunsheng Lin <linyunsheng@huawei.com>
    Signed-off-by: default avatarPeng Li <lipeng321@huawei.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    672ad0ed
hclge_tm.c 30.7 KB