[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAEAWyHenoS_JBXPzX3cRCZMsT63CxTCn9NTQPD2SMM=TWFc3QA@mail.gmail.com>
Date: Tue, 3 Jun 2025 12:52:15 -0700
From: Harshitha Ramamurthy <hramamurthy@...gle.com>
To: Paolo Abeni <pabeni@...hat.com>
Cc: Alok Tiwari <alok.a.tiwari@...cle.com>, almasrymina@...gle.com, bcf@...gle.com,
joshwash@...gle.com, willemb@...gle.com, pkaligineedi@...gle.com,
kuba@...nel.org, jeroendb@...gle.com, andrew+netdev@...n.ch,
davem@...emloft.net, edumazet@...gle.com, netdev@...r.kernel.org
Subject: Re: [QUERY] gve: gve_tx_free_rings_dqo() uses num_xdp_queues instead
of num_xdp_rings
On Tue, Jun 3, 2025 at 3:34 AM Paolo Abeni <pabeni@...hat.com> wrote:
>
> On 6/1/25 9:52 PM, Alok Tiwari wrote:
> > drivers/net/ethernet/google/gve/gve_tx_dqo.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ethernet/google/gve/gve_tx_dqo.c b/drivers/net/ethernet/google/gve/gve_tx_dqo.c
> > index 9d705d94b065..e7ee4fa7089c 100644
> > --- a/drivers/net/ethernet/google/gve/gve_tx_dqo.c
> > +++ b/drivers/net/ethernet/google/gve/gve_tx_dqo.c
> > @@ -424,7 +424,7 @@ void gve_tx_free_rings_dqo(struct gve_priv *priv,
> > if (!tx)
> > return;
> >
> > - for (i = 0; i < cfg->qcfg->num_queues + cfg->qcfg->num_xdp_queues; i++)
> > + for (i = 0; i < cfg->qcfg->num_queues + cfg->qcfg->num_xdp_rings; i++)
>
> Please note that num_xdp_rings has been moved elsewhere by commit
> 346fb86ddd86 ("gve: update XDP allocation path support RX buffer posting")
>
> /P
Hi Alok,
It's appropriate for the free methods to free based on cfg->qcfg
parameters since struct gve_tx_queue_config is supposed to track
'allowed and current' tx queue parameters as documented.
Also, like Paolo has pointed out, cfg->qcfg->num_xdp_rings does not
exist. 'cfg->num_xdp_rings' does exist but should not be used to free
since during gve_adjust_config(), this field tracks what has to be
allocated in the future, not what is current.
cfg->qcfg->num_xdp_queues is the correct parameter that tracks what is
currently in use and should be used in the free methods.
Thanks,
Harshitha
>
Powered by blists - more mailing lists