From: Stephen Hemminger <stephen@networkplumber.org>
To: Oleksandr Kolomeiets <okl-plv@napatech.com>
Cc: dev@dpdk.org, mko-plv@napatech.com, sil-plv@napatech.com,
ckm@napatech.com
Subject: Re: [PATCH v1 4/4] net/ntnic: add warning when sending on a stopped queue
Date: Sun, 29 Jun 2025 10:53:00 -0700 [thread overview]
Message-ID: <20250629105300.153b53d5@hermes.local> (raw)
In-Reply-To: <20250620112707.294596-5-okl-plv@napatech.com>
On Fri, 20 Jun 2025 13:27:07 +0200
Oleksandr Kolomeiets <okl-plv@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@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.
next prev parent reply other threads:[~2025-06-29 17:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-20 11:27 [PATCH v1 0/4] net/ntnic: implement start, stop and deferred start for Rx/Tx queues Oleksandr Kolomeiets
2025-06-20 11:27 ` [PATCH v1 1/4] net/ntnic: implement start/stop " Oleksandr Kolomeiets
2025-06-29 17:50 ` Stephen Hemminger
2025-06-20 11:27 ` [PATCH v1 2/4] net/ntnic: implement deferred start " Oleksandr Kolomeiets
2025-06-20 11:27 ` [PATCH v1 3/4] net/ntnic: unmap DMA during queue release Oleksandr Kolomeiets
2025-06-20 11:27 ` [PATCH v1 4/4] net/ntnic: add warning when sending on a stopped queue Oleksandr Kolomeiets
2025-06-29 17:53 ` Stephen Hemminger [this message]
2025-06-28 22:20 ` [PATCH v1 0/4] net/ntnic: implement start, stop and deferred start for Rx/Tx queues Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250629105300.153b53d5@hermes.local \
--to=stephen@networkplumber.org \
--cc=ckm@napatech.com \
--cc=dev@dpdk.org \
--cc=mko-plv@napatech.com \
--cc=okl-plv@napatech.com \
--cc=sil-plv@napatech.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).