From: Jakub Kicinski <kuba@kernel.org>
To: Shailend Chand <shailend@google.com>
Cc: netdev@vger.kernel.org, almasrymina@google.com,
davem@davemloft.net, edumazet@google.com, hramamurthy@google.com,
jeroendb@google.com, pabeni@redhat.com, pkaligineedi@google.com,
willemb@google.com
Subject: Re: [PATCH net-next 09/10] gve: Alloc and free QPLs with the rings
Date: Wed, 1 May 2024 08:31:32 -0700 [thread overview]
Message-ID: <20240501083132.1ba34a02@kernel.org> (raw)
In-Reply-To: <20240430231420.699177-10-shailend@google.com>
On Tue, 30 Apr 2024 23:14:18 +0000 Shailend Chand wrote:
> Every tx and rx ring has its own queue-page-list (QPL) that serves as
> the bounce buffer. Previously we were allocating QPLs for all queues
> before the queues themselves were allocated and later associating a QPL
> with a queue. This is avoidable complexity: it is much more natural for
> each queue to allocate and free its own QPL.
>
> Moreover, the advent of new queue-manipulating ndo hooks make it hard to
> keep things as is: we would need to transfer a QPL from an old queue to
> a new queue, and that is unpleasant.
Some compiler unhappiness here:
drivers/net/ethernet/google/gve/gve_rx.c:315:7: warning: variable 'err' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
315 | if (!rx->data.qpl)
| ^~~~~~~~~~~~~
drivers/net/ethernet/google/gve/gve_rx.c:376:9: note: uninitialized use occurs here
376 | return err;
| ^~~
drivers/net/ethernet/google/gve/gve_rx.c:315:3: note: remove the 'if' if its condition is always false
315 | if (!rx->data.qpl)
| ^~~~~~~~~~~~~~~~~~
316 | goto abort_with_copy_pool;
| ~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/google/gve/gve_rx.c:278:9: note: initialize the variable 'err' to silence this warning
278 | int err;
| ^
| = 0
1 warning generated.
drivers/net/ethernet/google/gve/gve_main.c:1432:6: warning: variable 'qpl_start_id' set but not used [-Wunused-but-set-variable]
1432 | int qpl_start_id;
| ^
drivers/net/ethernet/google/gve/gve_main.c:1454:6: warning: variable 'start_id' set but not used [-Wunused-but-set-variable]
1454 | int start_id;
| ^
--
pw-bot: cr
next prev parent reply other threads:[~2024-05-01 15:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-30 23:14 [PATCH net-next 00/10] gve: Implement queue api Shailend Chand
2024-04-30 23:14 ` [PATCH net-next 01/10] queue_api: define " Shailend Chand
2024-04-30 23:14 ` [PATCH net-next 02/10] gve: Make the GQ RX free queue funcs idempotent Shailend Chand
2024-04-30 23:14 ` [PATCH net-next 03/10] gve: Add adminq funcs to add/remove a single Rx queue Shailend Chand
2024-05-01 4:19 ` Ratheesh Kannoth
2024-05-01 13:50 ` Willem de Bruijn
2024-05-01 23:27 ` Shailend Chand
2024-05-02 1:39 ` Willem de Bruijn
2024-04-30 23:14 ` [PATCH net-next 04/10] gve: Make gve_turn(up|down) ignore stopped queues Shailend Chand
2024-04-30 23:14 ` [PATCH net-next 05/10] gve: Make gve_turnup work for nonempty queues Shailend Chand
2024-04-30 23:14 ` [PATCH net-next 06/10] gve: Avoid rescheduling napi if on wrong cpu Shailend Chand
2024-04-30 23:14 ` [PATCH net-next 07/10] gve: Reset Rx ring state in the ring-stop funcs Shailend Chand
2024-04-30 23:14 ` [PATCH net-next 08/10] gve: Account for stopped queues when reading NIC stats Shailend Chand
2024-04-30 23:14 ` [PATCH net-next 09/10] gve: Alloc and free QPLs with the rings Shailend Chand
2024-05-01 15:31 ` Jakub Kicinski [this message]
2024-04-30 23:14 ` [PATCH net-next 10/10] gve: Implement queue api Shailend Chand
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=20240501083132.1ba34a02@kernel.org \
--to=kuba@kernel.org \
--cc=almasrymina@google.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hramamurthy@google.com \
--cc=jeroendb@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pkaligineedi@google.com \
--cc=shailend@google.com \
--cc=willemb@google.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).