Date: Wed, 1 Sep 2021 23:07:35 GMT From: Marcin Wojtas <mw@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 77160654a162 - main - ena: Add extra log messages Message-ID: <202109012307.181N7Zlk020850@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=77160654a162b5faa8ad7a02e18d2bef2589f868 commit 77160654a162b5faa8ad7a02e18d2bef2589f868 Author: Artur Rojek <ar@semihalf.com> AuthorDate: 2021-08-12 08:34:26 +0000 Commit: Marcin Wojtas <mw@FreeBSD.org> CommitDate: 2021-09-01 23:06:12 +0000 ena: Add extra log messages Stay aligned with the Linux driver by adding the following logs: * inform the user about retrying queue creation * warn on non-empty ena_tx_buffer.mbuf prior to ena_tx_map_mbuf Obtained from: Semihalf MFC after: 2 weeks Sponsored by: Amazon, Inc. --- sys/dev/ena/ena.c | 4 ++++ sys/dev/ena/ena_datapath.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index 7615bf4d7cc0..dbe5b9f785a9 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -2079,6 +2079,10 @@ err_setup_tx: return (rc); } + ena_log(pdev, INFO, + "Retrying queue creation with sizes TX=%d, RX=%d\n", + new_tx_ring_size, new_rx_ring_size); + set_io_rings_size(adapter, new_tx_ring_size, new_rx_ring_size); } } diff --git a/sys/dev/ena/ena_datapath.c b/sys/dev/ena/ena_datapath.c index 1581bc2db87c..e6286ebfc25f 100644 --- a/sys/dev/ena/ena_datapath.c +++ b/sys/dev/ena/ena_datapath.c @@ -967,6 +967,9 @@ ena_xmit_mbuf(struct ena_ring *tx_ring, struct mbuf **mbuf) tx_info = &tx_ring->tx_buffer_info[req_id]; tx_info->num_of_bufs = 0; + ENA_WARN(tx_info->mbuf != NULL, adapter->ena_dev, + "mbuf isn't NULL for req_id %d\n", req_id); + rc = ena_tx_map_mbuf(tx_ring, tx_info, *mbuf, &push_hdr, &header_len); if (unlikely(rc != 0)) { ena_log_io(pdev, WARN, "Failed to map TX mbuf\n");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109012307.181N7Zlk020850>