svn commit: r348391 - head/sys/dev/ena
Marcin Wojtas
mw at FreeBSD.org
Thu May 30 13:14:59 UTC 2019
Author: mw
Date: Thu May 30 13:14:58 2019
New Revision: 348391
URL: https://svnweb.freebsd.org/changeset/base/348391
Log:
Print ENA Tx error conditionally
Information about Tx error should be only displayed, if packet
preparation failed due to error other than out of memory.
Submitted by: Michal Krawczyk <mk at semihalf.com>
Obtained from: Semihalf
Sponsored by: Amazon, Inc.
Modified:
head/sys/dev/ena/ena.c
Modified: head/sys/dev/ena/ena.c
==============================================================================
--- head/sys/dev/ena/ena.c Thu May 30 13:13:15 2019 (r348390)
+++ head/sys/dev/ena/ena.c Thu May 30 13:14:58 2019 (r348391)
@@ -2786,7 +2786,13 @@ ena_xmit_mbuf(struct ena_ring *tx_ring, struct mbuf **
/* Prepare the packet's descriptors and send them to device */
rc = ena_com_prepare_tx(io_sq, &ena_tx_ctx, &nb_hw_desc);
if (unlikely(rc != 0)) {
- ena_trace(ENA_DBG | ENA_TXPTH, "failed to prepare tx bufs\n");
+ if (likely(rc == ENA_COM_NO_MEM)) {
+ ena_trace(ENA_DBG | ENA_TXPTH,
+ "tx ring[%d] if out of space\n", tx_ring->que->id);
+ } else {
+ device_printf(adapter->pdev,
+ "failed to prepare tx bufs\n");
+ }
counter_u64_add(tx_ring->tx_stats.prepare_ctx_err, 1);
goto dma_error;
}
More information about the svn-src-head
mailing list