<div dir="auto"><div>These are very useful insights Ferruh. I think RTE_LOG_DP() is something that would have been more suitable here.</div><div dir="auto">Also, the DEBUG statement combined with a statistic will be more useful than ERR from developer perspective if they see a potential memory leak in their program.<br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Mon, Feb 19, 2024, 3:03 PM Ferruh Yigit <<a href="mailto:ferruh.yigit@amd.com" target="_blank" rel="noreferrer">ferruh.yigit@amd.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 2/19/2024 2:44 AM, Rushil Gupta wrote:<br>
> This was causing failure for testpmd runs (for queues >=15)<br>
> presumably due to flooding of logs due to descriptor ring being<br>
> overwritten.<br>
> <br>
> Fixes: a01854 ("net/gve: fix dqo bug for chained descriptors")<br>
> Cc: <a href="mailto:stable@dpdk.org" rel="noreferrer noreferrer" target="_blank">stable@dpdk.org</a><br>
> <br>
> Signed-off-by: Rushil Gupta <<a href="mailto:rushilg@google.com" rel="noreferrer noreferrer" target="_blank">rushilg@google.com</a>><br>
> Reviewed-by: Joshua Washington <<a href="mailto:joshwash@google.com" rel="noreferrer noreferrer" target="_blank">joshwash@google.com</a>><br>
> ---<br>
>  drivers/net/gve/gve_tx_dqo.c | 2 +-<br>
>  1 file changed, 1 insertion(+), 1 deletion(-)<br>
> <br>
> diff --git a/drivers/net/gve/gve_tx_dqo.c b/drivers/net/gve/gve_tx_dqo.c<br>
> index 1a8eb96ea9..30a1455b20 100644<br>
> --- a/drivers/net/gve/gve_tx_dqo.c<br>
> +++ b/drivers/net/gve/gve_tx_dqo.c<br>
> @@ -116,7 +116,7 @@ gve_tx_burst_dqo(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)<br>
>               first_sw_id = sw_id;<br>
>               do {<br>
>                       if (sw_ring[sw_id] != NULL)<br>
> -                             PMD_DRV_LOG(ERR, "Overwriting an entry in sw_ring");<br>
> +                             PMD_DRV_LOG(DEBUG, "Overwriting an entry in sw_ring");<br>
>  <br>
>                       txd = &txr[tx_id];<br>
>                       sw_ring[sw_id] = tx_pkt;<br>
<br>
Hi Rushil,<br>
<br>
I will continue with this patch, BUT<br>
logging in the datapath has potential problems like this, also it may<br>
have performance impact even log is not printed, because of additional<br>
check in the log function.<br>
<br>
For datapath, you can prefer:<br>
- Add log macros controlled by RTE_ETHDEV_DEBUG_RX & RTE_ETHDEV_DEBUG_TX<br>
flags<br>
- Or use RTE_LOG_DP() macro which is compiled out if default log level<br>
is less than the log uses<br>
<br>
<br>
Also another perspective for the logs, when end-user observes this bloat<br>
of logs, what she can do?<br>
Can she change some driver arguments or environment variables to fix the<br>
issue, if not what is the point of the log?<br>
If this is a condition that can occur dynamically based on received<br>
traffic and user doesn't have control on it, maybe driver should handle<br>
the error without log?<br>
And if this is a log for driver developer, perhaps it should be assert<br>
or similar that is disabled in the release build?<br>
</blockquote></div></div></div>