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-next>] [day] [month] [year] [list]
Message-ID: <20220918081713-mutt-send-email-mst@kernel.org>
Date:   Sun, 18 Sep 2022 08:17:36 -0400
From:   "Michael S. Tsirkin" <mst@...hat.com>
To:     Junbo <junbo4242@...il.com>
Cc:     Jason Wang <jasowang@...hat.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Jesper Dangaard Brouer <hawk@...nel.org>,
        John Fastabend <john.fastabend@...il.com>,
        virtualization@...ts.linux-foundation.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, bpf@...r.kernel.org
Subject: Re: [PATCH] Do not name control queue for virtio-net

On Sun, Sep 18, 2022 at 05:00:20PM +0800, Junbo wrote:
> hi Michael
> 
> in virtio-net.c
>     /* Parameters for control virtqueue, if any */
>     if (vi->has_cvq) {
>         callbacks[total_vqs - 1] = NULL;
>         names[total_vqs - 1] = "control";
>     }
> 
> I think the Author who write the code

wait, that was not you?

> maybe want to name the control queue to
> 'virtioX-control', but it never worked, we can see the name still be
> 'virtioX-config' in /proc/interrupts, for example 
>  43:          0          0          0          0          0          0        
>  0          0   PCI-MSI-edge      virtio0-config
>  44:         64          0          0          0          0          0      
> 1845          0   PCI-MSI-edge      virtio0-input.0
>  45:          1          0          0          0          0          0        
>  0          0   PCI-MSI-edge      virtio0-output.0
> 
> Because in function vp_request_msix_vectors, it just allocate 'xxxx-config' to
> every virtio devices, even the virtio device do not need it. in /proc/
> interrupts, we can see that each virtio device's first interrupt always named
> 'virtioX-config'.
> 
> So I think it's better to not explicitly give the "control" here, it's
> useless...  
> 
> 
> Michael S. Tsirkin <mst@...hat.com> 于2022年9月18日周日 14:56写道:
> 
>     On Sat, Sep 17, 2022 at 09:28:57AM +0000, junbo4242@...il.com wrote:
>     > From: Junbo <junbo4242@...il.com>
>     >
>     > In virtio drivers, the control queue always named <virtioX>-config.
>     >
>     > Signed-off-by: Junbo <junbo4242@...il.com>
> 
>     I don't think that's right. config is the config interrupt.
> 
> 
> 
>     > ---
>     >  drivers/net/virtio_net.c | 3 ++-
>     >  1 file changed, 2 insertions(+), 1 deletion(-)
>     >
>     > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
>     > index 9cce7dec7366..0b3e74cfe201 100644
>     > --- a/drivers/net/virtio_net.c
>     > +++ b/drivers/net/virtio_net.c
>     > @@ -3469,7 +3469,8 @@ static int virtnet_find_vqs(struct virtnet_info
>     *vi)
>     >       /* Parameters for control virtqueue, if any */
>     >       if (vi->has_cvq) {
>     >               callbacks[total_vqs - 1] = NULL;
>     > -             names[total_vqs - 1] = "control";
>     > +             /* control virtqueue always named <virtioX>-config */
>     > +             names[total_vqs - 1] = "";
>     >       }
>     > 
>     >       /* Allocate/initialize parameters for send/receive virtqueues */
>     > --
>     > 2.31.1
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ