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, pabeni@redhat.com,
willemb@google.com
Subject: Re: [RFC PATCH net-next 9/9] gve: Implement queue api
Date: Thu, 18 Apr 2024 18:48:51 -0700 [thread overview]
Message-ID: <20240418184851.5cc11647@kernel.org> (raw)
In-Reply-To: <20240418195159.3461151-10-shailend@google.com>
On Thu, 18 Apr 2024 19:51:59 +0000 Shailend Chand wrote:
> +static int gve_rx_queue_stop(struct net_device *dev, int idx,
> + void **out_per_q_mem)
> +{
> + struct gve_priv *priv = netdev_priv(dev);
> + struct gve_rx_ring *rx;
> + int err;
> +
> + if (!priv->rx)
> + return -EAGAIN;
> + if (idx < 0 || idx >= priv->rx_cfg.max_queues)
> + return -ERANGE;
A little too defensive? Core should not issue these > current real num
queues.
> + /* Destroying queue 0 while other queues exist is not supported in DQO */
> + if (!gve_is_gqi(priv) && idx == 0)
> + return -ERANGE;
> +
> + rx = kvzalloc(sizeof(*rx), GFP_KERNEL);
Why allocate in the driver rather than let the core allocate based on
the declared size ?
next prev parent reply other threads:[~2024-04-19 1:48 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-18 19:51 [RFC PATCH net-next 0/9] gve: Implement netdev queue api Shailend Chand
2024-04-18 19:51 ` [RFC PATCH net-next 1/9] queue_api: define " Shailend Chand
2024-04-18 19:51 ` [RFC PATCH net-next 2/9] gve: Make the RX free queue funcs idempotent Shailend Chand
2024-04-18 19:51 ` [RFC PATCH net-next 3/9] gve: Add adminq funcs to add/remove a single Rx queue Shailend Chand
2024-04-18 19:51 ` [RFC PATCH net-next 4/9] gve: Make gve_turn(up|down) ignore stopped queues Shailend Chand
2024-04-18 19:51 ` [RFC PATCH net-next 5/9] gve: Make gve_turnup work for nonempty queues Shailend Chand
2024-04-18 19:51 ` [RFC PATCH net-next 6/9] gve: Avoid rescheduling napi if on wrong cpu Shailend Chand
2024-04-18 19:51 ` [RFC PATCH net-next 7/9] gve: Reset Rx ring state in the ring-stop funcs Shailend Chand
2024-04-18 19:51 ` [RFC PATCH net-next 8/9] gve: Account for stopped queues when reading NIC stats Shailend Chand
2024-04-18 19:51 ` [RFC PATCH net-next 9/9] gve: Implement queue api Shailend Chand
2024-04-19 1:48 ` Jakub Kicinski [this message]
2024-04-19 16:10 ` Mina Almasry
2024-04-20 3:25 ` Jakub Kicinski
2024-04-22 16:58 ` Mina Almasry
2024-04-22 18:41 ` Jakub Kicinski
2024-04-19 22:23 ` Shailend Chand
2024-04-23 17:55 ` David Wei
2024-04-23 17:33 ` David Wei
2024-04-18 21:55 ` [RFC PATCH net-next 0/9] gve: Implement netdev " Mina Almasry
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=20240418184851.5cc11647@kernel.org \
--to=kuba@kernel.org \
--cc=almasrymina@google.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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).