[dpdk-dev] [PATCH v3 6/7] net/ena: add check for missing Tx completions

Ferruh Yigit ferruh.yigit at intel.com
Tue Oct 19 14:40:45 CEST 2021


On 10/19/2021 11:56 AM, Michal Krawczyk wrote:
> +static int check_for_tx_completion_in_queue(struct ena_adapter *adapter,
> +					    struct ena_ring *tx_ring)
> +{
> +	struct ena_tx_buffer *tx_buf;
> +	uint64_t timestamp;
> +	uint64_t completion_delay;
> +	uint32_t missed_tx = 0;
> +	unsigned int i;
> +	int rc = 0;
> +
> +	for (i = 0; i < tx_ring->ring_size; ++i) {
> +		tx_buf = &tx_ring->tx_buffer_info[i];
> +		timestamp = tx_buf->timestamp;
> +
> +		if (timestamp == 0)
> +			continue;
> +
> +		completion_delay = rte_get_timer_cycles() - timestamp;
> +		if (completion_delay > adapter->missing_tx_completion_to) {
> +			if (unlikely(!tx_buf->print_once)) {
> +				PMD_TX_LOG(WARNING,
> +					"Found a Tx that wasn't completed on time, qid %d, index %d. Missing Tx outstanding for %" PRIu64 " msecs.\n",

This line is too long, normally we allow long line for logs, but the
intention there is to enable user to search a log message in the code;
when line is broken search fails.
But when there is a format specifier in the log, it already break the
search and there is no point to keep the string in single line, which
reduces code readability.

I will break the line while merging.


More information about the dev mailing list