]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: ena: Add debug prints for invalid req_id resets
authorArthur Kiyanovski <akiyano@amazon.com>
Fri, 7 Jan 2022 20:23:44 +0000 (20:23 +0000)
committerJakub Kicinski <kuba@kernel.org>
Sat, 8 Jan 2022 03:25:51 +0000 (19:25 -0800)
Add qid and req_id to error prints when ENA_REGS_RESET_INV_TX_REQ_ID
reset occurs.

Switch from %hu to %u, since u16 should be printed with %u, as
explained in [1].

[1] - https://www.kernel.org/doc/html/latest/core-api/printk-formats.html

Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/amazon/ena/ena_netdev.c

index 4ad0c602d76cfe6c3d35a0b44385e36bf2af106f..33e414dbf7a13c928a228d6acbf478d24b13a3ce 100644 (file)
@@ -1269,14 +1269,14 @@ static int handle_invalid_req_id(struct ena_ring *ring, u16 req_id,
                netif_err(ring->adapter,
                          tx_done,
                          ring->netdev,
-                         "tx_info doesn't have valid %s",
-                          is_xdp ? "xdp frame" : "skb");
+                         "tx_info doesn't have valid %s. qid %u req_id %u",
+                          is_xdp ? "xdp frame" : "skb", ring->qid, req_id);
        else
                netif_err(ring->adapter,
                          tx_done,
                          ring->netdev,
-                         "Invalid req_id: %hu\n",
-                         req_id);
+                         "Invalid req_id %u in qid %u\n",
+                         req_id, ring->qid);
 
        ena_increase_stat(&ring->tx_stats.bad_req_id, 1, &ring->syncp);