Re: [PATCH] gve: add missing NULL check for gve_alloc_pending_packet() in TX DQO
From: Paolo Abeni
Date: Tue Jun 03 2025 - 06:51:50 EST
On 6/3/25 11:03 AM, ALOK TIWARI wrote:
> On 03-06-2025 00:54, Bailey Forrest wrote:
>> I think this patch isn't needed. gve_tx_add_skb_dqo() is only called
>> after checking gve_maybe_stop_tx_dqo(), which checks that
>> gve_alloc_pending_packet() will not return NULL.
>
> Thank you for the clarification,
>
> Even so, I felt it could be a bit misleading for developers and tools.
> But if you believe the patch isn't required,I completely understand.
> In that case, I kindly request you to provide your NACK on the [PATCH
> net v2] mail thread for formal tracking,
> so that other developers can also be aware of the reasoning and
> understand the context.
IMHO it's indeed confusing that the same condition is checked in
gve_alloc_pending_packet() and ignored by gve_tx_add_skb_dqo().
Even gve_alloc_pending_packet() is only called after the
gve_maybe_stop_tx_dqo().
Either always ignore the NULL condition it in both places (possibly with
a comment) or always check it.
/P