Commit 8ad88e37 authored by Josh Hay's avatar Josh Hay Committed by Jeff Kirsher

ixgbe: Reformat output of ixgbe_dump

Reformats the output of the Tx/Rx descriptor dumps to more
appropriately align the output of the ixgbe_dump and improve readability.
Prevents empty Tx descriptors from being displayed to decrease the size
of the dump and make it more manageable.
Signed-off-by: default avatarJosh Hay <joshua.a.hay@intel.com>
Tested-by: default avatarPhil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 76e0d67a
...@@ -336,11 +336,13 @@ static void ixgbe_dump(struct ixgbe_adapter *adapter) ...@@ -336,11 +336,13 @@ static void ixgbe_dump(struct ixgbe_adapter *adapter)
goto exit; goto exit;
dev_info(&adapter->pdev->dev, "TX Rings Summary\n"); dev_info(&adapter->pdev->dev, "TX Rings Summary\n");
pr_info("Queue [NTU] [NTC] [bi(ntc)->dma ] leng ntw timestamp\n"); pr_info(" %s %s %s %s\n",
"Queue [NTU] [NTC] [bi(ntc)->dma ]",
"leng", "ntw", "timestamp");
for (n = 0; n < adapter->num_tx_queues; n++) { for (n = 0; n < adapter->num_tx_queues; n++) {
tx_ring = adapter->tx_ring[n]; tx_ring = adapter->tx_ring[n];
tx_buffer = &tx_ring->tx_buffer_info[tx_ring->next_to_clean]; tx_buffer = &tx_ring->tx_buffer_info[tx_ring->next_to_clean];
pr_info(" %5d %5X %5X %016llX %04X %p %016llX\n", pr_info(" %5d %5X %5X %016llX %08X %p %016llX\n",
n, tx_ring->next_to_use, tx_ring->next_to_clean, n, tx_ring->next_to_use, tx_ring->next_to_clean,
(u64)dma_unmap_addr(tx_buffer, dma), (u64)dma_unmap_addr(tx_buffer, dma),
dma_unmap_len(tx_buffer, len), dma_unmap_len(tx_buffer, len),
...@@ -394,16 +396,18 @@ static void ixgbe_dump(struct ixgbe_adapter *adapter) ...@@ -394,16 +396,18 @@ static void ixgbe_dump(struct ixgbe_adapter *adapter)
pr_info("------------------------------------\n"); pr_info("------------------------------------\n");
pr_info("TX QUEUE INDEX = %d\n", tx_ring->queue_index); pr_info("TX QUEUE INDEX = %d\n", tx_ring->queue_index);
pr_info("------------------------------------\n"); pr_info("------------------------------------\n");
pr_info("T [desc] [address 63:0 ] " pr_info("%s%s %s %s %s %s\n",
"[PlPOIdStDDt Ln] [bi->dma ] " "T [desc] [address 63:0 ] ",
"leng ntw timestamp bi->skb\n"); "[PlPOIdStDDt Ln] [bi->dma ] ",
"leng", "ntw", "timestamp", "bi->skb");
for (i = 0; tx_ring->desc && (i < tx_ring->count); i++) { for (i = 0; tx_ring->desc && (i < tx_ring->count); i++) {
tx_desc = IXGBE_TX_DESC(tx_ring, i); tx_desc = IXGBE_TX_DESC(tx_ring, i);
tx_buffer = &tx_ring->tx_buffer_info[i]; tx_buffer = &tx_ring->tx_buffer_info[i];
u0 = (struct my_u0 *)tx_desc; u0 = (struct my_u0 *)tx_desc;
pr_info("T [0x%03X] %016llX %016llX %016llX" if (dma_unmap_len(tx_buffer, len) > 0) {
" %04X %p %016llX %p", i, pr_info("T [0x%03X] %016llX %016llX %016llX %08X %p %016llX %p",
i,
le64_to_cpu(u0->a), le64_to_cpu(u0->a),
le64_to_cpu(u0->b), le64_to_cpu(u0->b),
(u64)dma_unmap_addr(tx_buffer, dma), (u64)dma_unmap_addr(tx_buffer, dma),
...@@ -430,6 +434,7 @@ static void ixgbe_dump(struct ixgbe_adapter *adapter) ...@@ -430,6 +434,7 @@ static void ixgbe_dump(struct ixgbe_adapter *adapter)
true); true);
} }
} }
}
/* Print RX Rings Summary */ /* Print RX Rings Summary */
rx_ring_summary: rx_ring_summary:
...@@ -497,11 +502,13 @@ static void ixgbe_dump(struct ixgbe_adapter *adapter) ...@@ -497,11 +502,13 @@ static void ixgbe_dump(struct ixgbe_adapter *adapter)
pr_info("------------------------------------\n"); pr_info("------------------------------------\n");
pr_info("RX QUEUE INDEX = %d\n", rx_ring->queue_index); pr_info("RX QUEUE INDEX = %d\n", rx_ring->queue_index);
pr_info("------------------------------------\n"); pr_info("------------------------------------\n");
pr_info("R [desc] [ PktBuf A0] " pr_info("%s%s%s",
"[ HeadBuf DD] [bi->dma ] [bi->skb] " "R [desc] [ PktBuf A0] ",
"[ HeadBuf DD] [bi->dma ] [bi->skb ] ",
"<-- Adv Rx Read format\n"); "<-- Adv Rx Read format\n");
pr_info("RWB[desc] [PcsmIpSHl PtRs] " pr_info("%s%s%s",
"[vl er S cks ln] ---------------- [bi->skb] " "RWB[desc] [PcsmIpSHl PtRs] ",
"[vl er S cks ln] ---------------- [bi->skb ] ",
"<-- Adv Rx Write-Back format\n"); "<-- Adv Rx Write-Back format\n");
for (i = 0; i < rx_ring->count; i++) { for (i = 0; i < rx_ring->count; i++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment