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.
This commit is contained in:
Artur Rojek 2021-08-12 10:34:26 +02:00 committed by Marcin Wojtas
parent 433ab9b698
commit 77160654a1
2 changed files with 7 additions and 0 deletions

View File

@ -2079,6 +2079,10 @@ create_queues_with_size_backoff(struct ena_adapter *adapter)
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);
}
}

View File

@ -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");