All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/1] net: skip virtio-net config of deleted nic's peers
@ 2016-10-31 22:01 yuri.benditovich
  2016-10-31 22:42 ` Michael S. Tsirkin
  0 siblings, 1 reply; 3+ messages in thread
From: yuri.benditovich @ 2016-10-31 22:01 UTC (permalink / raw)
  To: Michael S . Tsirkin, Jason Wang, qemu-devel; +Cc: dmitry, yan

From: Yuri Benditovich <yuri.benditovich@daynix.com>

https://bugzilla.redhat.com/show_bug.cgi?id=1373816
qemu core dump happens during repetitive unpug-plug
with multiple queues and Windows RSS-capable guest.
If back-end delete requested during virtio-net device
initialization, driver still can try configure the device
for multiple queues. The virtio-net device is expected
to be removed as soon as the initialization is done.

Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
---
 hw/net/virtio-net.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 06bfe4b..77a4fae 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -508,6 +508,10 @@ static void virtio_net_set_queues(VirtIONet *n)
     int i;
     int r;
 
+    if (n->nic->peer_deleted) {
+        return;
+    }
+
     for (i = 0; i < n->max_queues; i++) {
         if (i < n->curr_queues) {
             r = peer_attach(n, i);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH 1/1] net: skip virtio-net config of deleted nic's peers
  2016-10-31 22:01 [Qemu-devel] [PATCH 1/1] net: skip virtio-net config of deleted nic's peers yuri.benditovich
@ 2016-10-31 22:42 ` Michael S. Tsirkin
  2016-11-02  2:58   ` Jason Wang
  0 siblings, 1 reply; 3+ messages in thread
From: Michael S. Tsirkin @ 2016-10-31 22:42 UTC (permalink / raw)
  To: yuri.benditovich; +Cc: Jason Wang, qemu-devel, dmitry, yan

On Tue, Nov 01, 2016 at 12:01:17AM +0200, yuri.benditovich@daynix.com wrote:
> From: Yuri Benditovich <yuri.benditovich@daynix.com>
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1373816
> qemu core dump happens during repetitive unpug-plug
> with multiple queues and Windows RSS-capable guest.
> If back-end delete requested during virtio-net device
> initialization, driver still can try configure the device
> for multiple queues. The virtio-net device is expected
> to be removed as soon as the initialization is done.
> 
> Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>

Reviewed-by: Michael S. Tsirkin <mst@redhat.com>

> ---
>  hw/net/virtio-net.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
> index 06bfe4b..77a4fae 100644
> --- a/hw/net/virtio-net.c
> +++ b/hw/net/virtio-net.c
> @@ -508,6 +508,10 @@ static void virtio_net_set_queues(VirtIONet *n)
>      int i;
>      int r;
>  
> +    if (n->nic->peer_deleted) {
> +        return;
> +    }
> +
>      for (i = 0; i < n->max_queues; i++) {
>          if (i < n->curr_queues) {
>              r = peer_attach(n, i);
> -- 
> 1.9.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH 1/1] net: skip virtio-net config of deleted nic's peers
  2016-10-31 22:42 ` Michael S. Tsirkin
@ 2016-11-02  2:58   ` Jason Wang
  0 siblings, 0 replies; 3+ messages in thread
From: Jason Wang @ 2016-11-02  2:58 UTC (permalink / raw)
  To: Michael S. Tsirkin, yuri.benditovich; +Cc: qemu-devel, dmitry, yan



On 2016年11月01日 06:42, Michael S. Tsirkin wrote:
> On Tue, Nov 01, 2016 at 12:01:17AM +0200, yuri.benditovich@daynix.com wrote:
>> From: Yuri Benditovich <yuri.benditovich@daynix.com>
>>
>> https://bugzilla.redhat.com/show_bug.cgi?id=1373816
>> qemu core dump happens during repetitive unpug-plug
>> with multiple queues and Windows RSS-capable guest.
>> If back-end delete requested during virtio-net device
>> initialization, driver still can try configure the device
>> for multiple queues. The virtio-net device is expected
>> to be removed as soon as the initialization is done.
>>
>> Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
> Reviewed-by: Michael S. Tsirkin <mst@redhat.com>

Applied to -net, thanks.

>
>> ---
>>   hw/net/virtio-net.c | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
>> index 06bfe4b..77a4fae 100644
>> --- a/hw/net/virtio-net.c
>> +++ b/hw/net/virtio-net.c
>> @@ -508,6 +508,10 @@ static void virtio_net_set_queues(VirtIONet *n)
>>       int i;
>>       int r;
>>   
>> +    if (n->nic->peer_deleted) {
>> +        return;
>> +    }
>> +
>>       for (i = 0; i < n->max_queues; i++) {
>>           if (i < n->curr_queues) {
>>               r = peer_attach(n, i);
>> -- 
>> 1.9.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-11-02  2:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-31 22:01 [Qemu-devel] [PATCH 1/1] net: skip virtio-net config of deleted nic's peers yuri.benditovich
2016-10-31 22:42 ` Michael S. Tsirkin
2016-11-02  2:58   ` Jason Wang

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.