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 <m...@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; } _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"