lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6632eeb7ee528_37f3af2946e@willemb.c.googlers.com.notmuch>
Date: Wed, 01 May 2024 21:39:03 -0400
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Shailend Chand <shailend@...gle.com>, 
 Willem de Bruijn <willemdebruijn.kernel@...il.com>
Cc: netdev@...r.kernel.org, 
 almasrymina@...gle.com, 
 davem@...emloft.net, 
 edumazet@...gle.com, 
 hramamurthy@...gle.com, 
 jeroendb@...gle.com, 
 kuba@...nel.org, 
 pabeni@...hat.com, 
 pkaligineedi@...gle.com, 
 willemb@...gle.com
Subject: Re: [PATCH net-next 03/10] gve: Add adminq funcs to add/remove a
 single Rx queue

Shailend Chand wrote:
> On Wed, May 1, 2024 at 6:50 AM Willem de Bruijn
> <willemdebruijn.kernel@...il.com> wrote:
> >
> > Shailend Chand wrote:
> > > This allows for implementing future ndo hooks that act on a single
> > > queue.
> > >
> > > Tested-by: Mina Almasry <almasrymina@...gle.com>
> > > Reviewed-by: Praveen Kaligineedi <pkaligineedi@...gle.com>
> > > Reviewed-by: Harshitha Ramamurthy <hramamurthy@...gle.com>
> > > Signed-off-by: Shailend Chand <shailend@...gle.com>
> >
> > > +static int gve_adminq_create_rx_queue(struct gve_priv *priv, u32 queue_index)
> > > +{
> > > +     union gve_adminq_command cmd;
> > > +
> > > +     gve_adminq_get_create_rx_queue_cmd(priv, &cmd, queue_index);
> > >       return gve_adminq_issue_cmd(priv, &cmd);
> > >  }
> > >
> > > +int gve_adminq_create_single_rx_queue(struct gve_priv *priv, u32 queue_index)
> > > +{
> > > +     union gve_adminq_command cmd;
> > > +
> > > +     gve_adminq_get_create_rx_queue_cmd(priv, &cmd, queue_index);
> > > +     return gve_adminq_execute_cmd(priv, &cmd);
> > > +}
> > > +
> > >  int gve_adminq_create_rx_queues(struct gve_priv *priv, u32 num_queues)
> > >  {
> > >       int err;
> > > @@ -727,17 +742,22 @@ int gve_adminq_destroy_tx_queues(struct gve_priv *priv, u32 start_id, u32 num_qu
> > >       return gve_adminq_kick_and_wait(priv);
> > >  }
> > >
> > > +static void gve_adminq_make_destroy_rx_queue_cmd(union gve_adminq_command *cmd,
> > > +                                              u32 queue_index)
> > > +{
> > > +     memset(cmd, 0, sizeof(*cmd));
> > > +     cmd->opcode = cpu_to_be32(GVE_ADMINQ_DESTROY_RX_QUEUE);
> > > +     cmd->destroy_rx_queue = (struct gve_adminq_destroy_rx_queue) {
> > > +             .queue_id = cpu_to_be32(queue_index),
> > > +     };
> > > +}
> > > +
> > >  static int gve_adminq_destroy_rx_queue(struct gve_priv *priv, u32 queue_index)
> > >  {
> > >       union gve_adminq_command cmd;
> > >       int err;
> > >
> > > -     memset(&cmd, 0, sizeof(cmd));
> > > -     cmd.opcode = cpu_to_be32(GVE_ADMINQ_DESTROY_RX_QUEUE);
> > > -     cmd.destroy_rx_queue = (struct gve_adminq_destroy_rx_queue) {
> > > -             .queue_id = cpu_to_be32(queue_index),
> > > -     };
> > > -
> > > +     gve_adminq_make_destroy_rx_queue_cmd(&cmd, queue_index);
> > >       err = gve_adminq_issue_cmd(priv, &cmd);
> > >       if (err)
> > >               return err;
> > > @@ -745,6 +765,19 @@ static int gve_adminq_destroy_rx_queue(struct gve_priv *priv, u32 queue_index)
> > >       return 0;
> > >  }
> > >
> > > +int gve_adminq_destroy_single_rx_queue(struct gve_priv *priv, u32 queue_index)
> > > +{
> > > +     union gve_adminq_command cmd;
> > > +     int err;
> > > +
> > > +     gve_adminq_make_destroy_rx_queue_cmd(&cmd, queue_index);
> > > +     err = gve_adminq_execute_cmd(priv, &cmd);
> > > +     if (err)
> > > +             return err;
> > > +
> > > +     return 0;
> > > +}
> >
> > This is identical to gve_adminq_destroy_rx_queue, bar for removing the
> > file scope?
> >
> > Same for gve_adminq_create_rx_queue.
> 
> One doesn't immediately ring the doorbell, added a comment in v2
> clarifying this.

Thanks! I clearly totally missed the issue vs execute distinction.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ