[PATCH v1 4/4] net/ntnic: add warning when sending on a stopped queue

Stephen Hemminger stephen at networkplumber.org
Sun Jun 29 19:53:00 CEST 2025


On Fri, 20 Jun 2025 13:27:07 +0200
Oleksandr Kolomeiets <okl-plv at napatech.com> wrote:

> When sending a burst of output packets on a stopped transmit queue,
> the packets are written to a memory mapped address.
> On queue start the packets are processed and transmitted by the NIC.
> 
> Signed-off-by: Oleksandr Kolomeiets <okl-plv at napatech.com>
> ---
>  drivers/net/ntnic/ntnic_ethdev.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/net/ntnic/ntnic_ethdev.c b/drivers/net/ntnic/ntnic_ethdev.c
> index 79ef9e7e7c..4145128d11 100644
> --- a/drivers/net/ntnic/ntnic_ethdev.c
> +++ b/drivers/net/ntnic/ntnic_ethdev.c
> @@ -694,6 +694,10 @@ static uint16_t eth_dev_tx_scg(void *queue, struct rte_mbuf **bufs, uint16_t nb_
>  	int pkts_sent = 0;
>  	uint16_t nb_segs_arr[MAX_TX_PACKETS];
>  
> +	if (!tx_q->enabled)
> +		NT_LOG(WRN, NTNIC, "Trying to send a burst of output packets "
> +					"on a stopped transmit queue of an Ethernet device");
> +
>  	if (nb_pkts > MAX_TX_PACKETS)
>  		nb_pkts = MAX_TX_PACKETS;
>  

This may result in log spam if application is sending a lot.
And the message is too long and split across lines.

But best to not do this at all; no other driver does it.


More information about the dev mailing list