Skip to content

Commit

Permalink
net: hns3: add dql info when tx timeout
Browse files Browse the repository at this point in the history
When tx timeout occurs, the info of dql maybe helpful, so print
these info to hns3_get_tx_timeo_queue_info().

Signed-off-by: Yufeng Mo <moyufeng@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Yufeng Mo authored and David S. Miller committed Nov 24, 2021
1 parent 8488e3c commit db59629
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
Original file line number Diff line number Diff line change
Expand Up @@ -2683,6 +2683,13 @@ static bool hns3_get_tx_timeo_queue_info(struct net_device *ndev)
if (netif_xmit_stopped(q) &&
time_after(jiffies,
(trans_start + ndev->watchdog_timeo))) {
#ifdef CONFIG_BQL
struct dql *dql = &q->dql;

netdev_info(ndev, "DQL info last_cnt: %u, queued: %u, adj_limit: %u, completed: %u\n",
dql->last_obj_cnt, dql->num_queued,
dql->adj_limit, dql->num_completed);
#endif
timeout_queue = i;
netdev_info(ndev, "queue state: 0x%lx, delta msecs: %u\n",
q->state,
Expand Down

0 comments on commit db59629

Please sign in to comment.