Skip to content

Commit

Permalink
net: hns3: add log for setting tx spare buf size
Browse files Browse the repository at this point in the history
For the active tx spare buffer size maybe changed according
to the page size, so add log to notice it.

Signed-off-by: Hao Chen <chenhao288@hisilicon.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Hao Chen authored and David S. Miller committed Apr 20, 2022
1 parent bcc7a98 commit 2373b35
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -1898,6 +1898,8 @@ static int hns3_set_tunable(struct net_device *netdev,
case ETHTOOL_TX_COPYBREAK_BUF_SIZE:
old_tx_spare_buf_size = h->kinfo.tx_spare_buf_size;
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);
if (ret ||
(!priv->ring->tx_spare && new_tx_spare_buf_size != 0)) {
Expand All @@ -1915,6 +1917,10 @@ static int hns3_set_tunable(struct net_device *netdev,

return ret;
}

netdev_info(netdev, "the actvie tx spare buf size is %u, due to page order\n",
priv->ring->tx_spare->len);

break;
default:
ret = -EOPNOTSUPP;
Expand Down

0 comments on commit 2373b35

Please sign in to comment.