* [PATCH] Do not name control queue for virtio-net
@ 2022-09-17 9:28 junbo4242
2022-09-18 6:56 ` Michael S. Tsirkin
0 siblings, 1 reply; 11+ messages in thread
From: junbo4242 @ 2022-09-17 9:28 UTC (permalink / raw)
To: Michael S. Tsirkin, Jason Wang, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Alexei Starovoitov, Daniel Borkmann,
Jesper Dangaard Brouer, John Fastabend, virtualization, netdev,
linux-kernel, bpf
Cc: Junbo
From: Junbo <junbo4242@gmail.com>
In virtio drivers, the control queue always named <virtioX>-config.
Signed-off-by: Junbo <junbo4242@gmail.com>
---
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
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] Do not name control queue for virtio-net
2022-09-17 9:28 [PATCH] Do not name control queue for virtio-net junbo4242
@ 2022-09-18 6:56 ` Michael S. Tsirkin
0 siblings, 0 replies; 11+ messages in thread
From: Michael S. Tsirkin @ 2022-09-18 6:56 UTC (permalink / raw)
To: junbo4242
Cc: Jason Wang, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Alexei Starovoitov, Daniel Borkmann,
Jesper Dangaard Brouer, John Fastabend, virtualization, netdev,
linux-kernel, bpf
On Sat, Sep 17, 2022 at 09:28:57AM +0000, junbo4242@gmail.com wrote:
> From: Junbo <junbo4242@gmail.com>
>
> In virtio drivers, the control queue always named <virtioX>-config.
>
> Signed-off-by: Junbo <junbo4242@gmail.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
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Do not name control queue for virtio-net
@ 2022-09-18 6:56 ` Michael S. Tsirkin
0 siblings, 0 replies; 11+ messages in thread
From: Michael S. Tsirkin @ 2022-09-18 6:56 UTC (permalink / raw)
To: junbo4242
Cc: Jesper Dangaard Brouer, Daniel Borkmann, netdev, John Fastabend,
Alexei Starovoitov, virtualization, Eric Dumazet, Jakub Kicinski,
bpf, Paolo Abeni, David S. Miller, linux-kernel
On Sat, Sep 17, 2022 at 09:28:57AM +0000, junbo4242@gmail.com wrote:
> From: Junbo <junbo4242@gmail.com>
>
> In virtio drivers, the control queue always named <virtioX>-config.
>
> Signed-off-by: Junbo <junbo4242@gmail.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
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Do not name control queue for virtio-net
[not found] ` <CACvn-oGUj0mDxBO2yV1mwvz4PzhN3rDnVpUh12NA5jLKTqRT3A@mail.gmail.com>
@ 2022-09-18 12:17 ` Michael S. Tsirkin
2022-09-22 9:16 ` Michael S. Tsirkin
1 sibling, 0 replies; 11+ messages in thread
From: Michael S. Tsirkin @ 2022-09-18 12:17 UTC (permalink / raw)
To: Junbo
Cc: Jason Wang, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Alexei Starovoitov, Daniel Borkmann,
Jesper Dangaard Brouer, John Fastabend, virtualization, netdev,
linux-kernel, bpf
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@redhat.com> 于2022年9月18日周日 14:56写道:
>
> On Sat, Sep 17, 2022 at 09:28:57AM +0000, junbo4242@gmail.com wrote:
> > From: Junbo <junbo4242@gmail.com>
> >
> > In virtio drivers, the control queue always named <virtioX>-config.
> >
> > Signed-off-by: Junbo <junbo4242@gmail.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
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Do not name control queue for virtio-net
@ 2022-09-18 12:17 ` Michael S. Tsirkin
0 siblings, 0 replies; 11+ messages in thread
From: Michael S. Tsirkin @ 2022-09-18 12:17 UTC (permalink / raw)
To: Junbo
Cc: Jesper Dangaard Brouer, Daniel Borkmann, netdev, John Fastabend,
Alexei Starovoitov, virtualization, Eric Dumazet, Jakub Kicinski,
bpf, Paolo Abeni, David S. Miller, linux-kernel
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@redhat.com> 于2022年9月18日周日 14:56写道:
>
> On Sat, Sep 17, 2022 at 09:28:57AM +0000, junbo4242@gmail.com wrote:
> > From: Junbo <junbo4242@gmail.com>
> >
> > In virtio drivers, the control queue always named <virtioX>-config.
> >
> > Signed-off-by: Junbo <junbo4242@gmail.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
>
>
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Do not name control queue for virtio-net
2022-09-18 12:17 ` Michael S. Tsirkin
@ 2022-09-22 9:10 ` Paolo Abeni
-1 siblings, 0 replies; 11+ messages in thread
From: Paolo Abeni @ 2022-09-22 9:10 UTC (permalink / raw)
To: Michael S. Tsirkin, Junbo
Cc: Jesper Dangaard Brouer, Daniel Borkmann, netdev, John Fastabend,
Alexei Starovoitov, virtualization, Eric Dumazet, Jakub Kicinski,
bpf, David S. Miller, linux-kernel
On Sun, 2022-09-18 at 08:17 -0400, Michael S. Tsirkin wrote:
> 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?
I believe 'the Author' refers to the author of the current code, not to
the author of the patch.
@Junbo: the control queue is created only if the VIRTIO_NET_F_CTRL_VQ
feature is set, please check that in your setup.
Thanks
Paolo
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Do not name control queue for virtio-net
@ 2022-09-22 9:10 ` Paolo Abeni
0 siblings, 0 replies; 11+ messages in thread
From: Paolo Abeni @ 2022-09-22 9:10 UTC (permalink / raw)
To: Michael S. Tsirkin, Junbo
Cc: Jesper Dangaard Brouer, Daniel Borkmann, netdev, John Fastabend,
Alexei Starovoitov, virtualization, Eric Dumazet, Jakub Kicinski,
bpf, David S. Miller, linux-kernel
On Sun, 2022-09-18 at 08:17 -0400, Michael S. Tsirkin wrote:
> 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?
I believe 'the Author' refers to the author of the current code, not to
the author of the patch.
@Junbo: the control queue is created only if the VIRTIO_NET_F_CTRL_VQ
feature is set, please check that in your setup.
Thanks
Paolo
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Do not name control queue for virtio-net
[not found] ` <CACvn-oGUj0mDxBO2yV1mwvz4PzhN3rDnVpUh12NA5jLKTqRT3A@mail.gmail.com>
@ 2022-09-22 9:16 ` Michael S. Tsirkin
2022-09-22 9:16 ` Michael S. Tsirkin
1 sibling, 0 replies; 11+ messages in thread
From: Michael S. Tsirkin @ 2022-09-22 9:16 UTC (permalink / raw)
To: Junbo
Cc: Jason Wang, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Alexei Starovoitov, Daniel Borkmann,
Jesper Dangaard Brouer, John Fastabend, virtualization, netdev,
linux-kernel, bpf
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 maybe want to name the control queue to
> 'virtioX-control',
That would be me I suspect ;)
> but it never worked, we can see the name still be
> 'virtioX-config' in /proc/interrupts,
Nope, what you see in /proc/interrupts are the interrupts, not the queue
name.
> 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.
Oh yes, we can fix that. The result will be this line disappearing for
devices without a config interrupt. Not for net though, that
generally uses a config interrupt for things like link
state detection.
> 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...
it's used for debugging.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Do not name control queue for virtio-net
@ 2022-09-22 9:16 ` Michael S. Tsirkin
0 siblings, 0 replies; 11+ messages in thread
From: Michael S. Tsirkin @ 2022-09-22 9:16 UTC (permalink / raw)
To: Junbo
Cc: Jesper Dangaard Brouer, Daniel Borkmann, netdev, John Fastabend,
Alexei Starovoitov, virtualization, Eric Dumazet, Jakub Kicinski,
bpf, Paolo Abeni, David S. Miller, linux-kernel
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 maybe want to name the control queue to
> 'virtioX-control',
That would be me I suspect ;)
> but it never worked, we can see the name still be
> 'virtioX-config' in /proc/interrupts,
Nope, what you see in /proc/interrupts are the interrupts, not the queue
name.
> 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.
Oh yes, we can fix that. The result will be this line disappearing for
devices without a config interrupt. Not for net though, that
generally uses a config interrupt for things like link
state detection.
> 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...
it's used for debugging.
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Do not name control queue for virtio-net
2022-09-22 9:10 ` Paolo Abeni
@ 2022-09-22 9:17 ` Michael S. Tsirkin
-1 siblings, 0 replies; 11+ messages in thread
From: Michael S. Tsirkin @ 2022-09-22 9:17 UTC (permalink / raw)
To: Paolo Abeni
Cc: Junbo, Jesper Dangaard Brouer, Daniel Borkmann, netdev,
John Fastabend, Alexei Starovoitov, virtualization, Eric Dumazet,
Jakub Kicinski, bpf, David S. Miller, linux-kernel
On Thu, Sep 22, 2022 at 11:10:37AM +0200, Paolo Abeni wrote:
> On Sun, 2022-09-18 at 08:17 -0400, Michael S. Tsirkin wrote:
> > 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?
>
> I believe 'the Author' refers to the author of the current code, not to
> the author of the patch.
Oh I see. Responded.
> @Junbo: the control queue is created only if the VIRTIO_NET_F_CTRL_VQ
> feature is set, please check that in your setup.
>
> Thanks
>
> Paolo
--
MST
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Do not name control queue for virtio-net
@ 2022-09-22 9:17 ` Michael S. Tsirkin
0 siblings, 0 replies; 11+ messages in thread
From: Michael S. Tsirkin @ 2022-09-22 9:17 UTC (permalink / raw)
To: Paolo Abeni
Cc: linux-kernel, Jesper Dangaard Brouer, Daniel Borkmann, netdev,
John Fastabend, Alexei Starovoitov, virtualization, Junbo,
Jakub Kicinski, bpf, David S. Miller, Eric Dumazet
On Thu, Sep 22, 2022 at 11:10:37AM +0200, Paolo Abeni wrote:
> On Sun, 2022-09-18 at 08:17 -0400, Michael S. Tsirkin wrote:
> > 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?
>
> I believe 'the Author' refers to the author of the current code, not to
> the author of the patch.
Oh I see. Responded.
> @Junbo: the control queue is created only if the VIRTIO_NET_F_CTRL_VQ
> feature is set, please check that in your setup.
>
> Thanks
>
> Paolo
--
MST
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2022-09-22 9:17 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-17 9:28 [PATCH] Do not name control queue for virtio-net junbo4242
2022-09-18 6:56 ` Michael S. Tsirkin
2022-09-18 6:56 ` Michael S. Tsirkin
[not found] ` <CACvn-oGUj0mDxBO2yV1mwvz4PzhN3rDnVpUh12NA5jLKTqRT3A@mail.gmail.com>
2022-09-18 12:17 ` Michael S. Tsirkin
2022-09-18 12:17 ` Michael S. Tsirkin
2022-09-22 9:10 ` Paolo Abeni
2022-09-22 9:10 ` Paolo Abeni
2022-09-22 9:17 ` Michael S. Tsirkin
2022-09-22 9:17 ` Michael S. Tsirkin
2022-09-22 9:16 ` Michael S. Tsirkin
2022-09-22 9:16 ` Michael S. Tsirkin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.