diff options
author | Huazhong Tan <tanhuazhong@huawei.com> | 2020-11-16 16:20:53 +0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-11-17 11:39:20 -0800 |
commit | 5ac84b02d372ff45bce48c78beedbffe7c9158c0 (patch) | |
tree | 80ab04d87b079a8042262e2119fc38e07a2575d1 /drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | |
parent | net: hns3: add support for querying maximum value of GL (diff) | |
download | linux-dev-5ac84b02d372ff45bce48c78beedbffe7c9158c0.tar.xz linux-dev-5ac84b02d372ff45bce48c78beedbffe7c9158c0.zip |
net: hns3: add support for 1us unit GL configuration
For device whose version is above V3(include V3), the GL
configuration can set as 1us unit, so adds support for
configuring this field.
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c index 49d3061ec42c..09aa608c14c3 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c @@ -1148,6 +1148,12 @@ static int hns3_check_gl_coalesce_para(struct net_device *netdev, return -EINVAL; } + /* device version above V3(include V3), GL uses 1us unit, + * so the round down is not needed. + */ + if (ae_dev->dev_version >= HNAE3_DEVICE_VERSION_V3) + return 0; + rx_gl = hns3_gl_round_down(cmd->rx_coalesce_usecs); if (rx_gl != cmd->rx_coalesce_usecs) { netdev_info(netdev, |