提交 c68cf821 编写于 作者: H Hao Chen 提交者: Zheng Zengkai

net: hns3: add log for setting tx spare buf size

mainline inclusion
from mainline-origin
commit 2373b35c
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I56XHY
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2373b35c24ff

----------------------------------------------------------------------

For the active tx spare buffer size maybe changed according
to the page size, so add log to notice it.
Signed-off-by: NHao Chen <chenhao288@hisilicon.com>
Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NJiantao Xiao <xiaojiantao1@h-partners.com>
Reviewed-by: NYue Haibing <yuehaibing@huawei.com>
Reviewed-by: NJian Shen <shenjian15@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 b5ab2ae6
...@@ -1885,6 +1885,8 @@ static int hns3_set_tunable(struct net_device *netdev, ...@@ -1885,6 +1885,8 @@ static int hns3_set_tunable(struct net_device *netdev,
case ETHTOOL_TX_COPYBREAK_BUF_SIZE: case ETHTOOL_TX_COPYBREAK_BUF_SIZE:
old_tx_spare_buf_size = h->kinfo.tx_spare_buf_size; old_tx_spare_buf_size = h->kinfo.tx_spare_buf_size;
new_tx_spare_buf_size = *(u32 *)data; new_tx_spare_buf_size = *(u32 *)data;
netdev_info(netdev, "request to set tx spare buf size from %u to %u\n",
old_tx_spare_buf_size, new_tx_spare_buf_size);
ret = hns3_set_tx_spare_buf_size(netdev, new_tx_spare_buf_size); ret = hns3_set_tx_spare_buf_size(netdev, new_tx_spare_buf_size);
if (ret || if (ret ||
(!priv->ring->tx_spare && new_tx_spare_buf_size != 0)) { (!priv->ring->tx_spare && new_tx_spare_buf_size != 0)) {
...@@ -1902,6 +1904,10 @@ static int hns3_set_tunable(struct net_device *netdev, ...@@ -1902,6 +1904,10 @@ static int hns3_set_tunable(struct net_device *netdev,
return ret; return ret;
} }
netdev_info(netdev, "the actvie tx spare buf size is %u, due to page order\n",
priv->ring->tx_spare->len);
break; break;
default: default:
ret = -EOPNOTSUPP; ret = -EOPNOTSUPP;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册