Re: [PATCH] gve: add missing NULL check for gve_alloc_pending_packet() in TX DQO

From: Bailey Forrest
Date: Tue Jun 03 2025 - 14:02:41 EST


On Tue, Jun 3, 2025 at 3:50 AM Paolo Abeni <pabeni@xxxxxxxxxx> wrote:
> 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.

It's probably not harmful to go ahead with this patch, I agree this
will make it easier for readers.

My point was it's not technically a bug, so it doesn't need (Fixes ...)

If we do make this change we can now remove the comment on gve_tx_add_skb_dqo()

* Before this function is called, the caller must ensure
* gve_has_pending_packet(tx) returns true.
*/

Reviewed-by: Bailey Forrest <bcf@xxxxxxxxxx>