Skip to contentSkip to conversation

vmxnet3: fix msix vectors unuse

PATCH Applied Jiri Pirko 3 participants 3 messages May 19, 2014 – May 20, 2014

lore
Share & tools
lore

Jiri Pirko

author
#0 lore raw

PATCH 1/1 vmxnet3: fix msix vectors unuse

In vmxnet3_cleanup_msix(), there is called msix_vector_unuse() with VMXNET3_MAX_INTRS. That is not correct since vector of value VMXNET3_MAX_INTRS was never used. Also all the used vectors are not un-used. So call vmxnet3_unuse_msix_vectors() instead which does the correct job.

---
 hw/net/vmxnet3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/net/vmxnet3.c +1 -1
index 1bb9259..f3be494 100644
@@ -2050,7 +2050,7 @@ vmxnet3_cleanup_msix(VMXNET3State *s)
     PCIDevice *d = PCI_DEVICE(s);
 
     if (s->msix_used) {
-        msix_vector_unuse(d, VMXNET3_MAX_INTRS);
+        vmxnet3_unuse_msix_vectors(s, VMXNET3_MAX_INTRS);
         msix_uninit(d, &s->msix_bar, &s->msix_bar);
     }
 }
Signature · 1 line
1.9.0
#1 lore raw

ACK

Thanks for fixing.

Quoted 27 lines · Jiri Pirko

In vmxnet3_cleanup_msix(), there is called msix_vector_unuse() with VMXNET3_MAX_INTRS. That is not correct since vector of value VMXNET3_MAX_INTRS was never used. Also all the used vectors are not un-used. So call vmxnet3_unuse_msix_vectors() instead which does the correct job.

---
hw/net/vmxnet3.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
hw/net/vmxnet3.c +1 -1
index 1bb9259..f3be494 100644
@@ -2050,7 +2050,7 @@ vmxnet3_cleanup_msix(VMXNET3State *s)
    PCIDevice *d = PCI_DEVICE(s);
 
    if (s->msix_used) {
-        msix_vector_unuse(d, VMXNET3_MAX_INTRS);
+        vmxnet3_unuse_msix_vectors(s, VMXNET3_MAX_INTRS);
        msix_uninit(d, &s->msix_bar, &s->msix_bar);
    }
 }
Signature · 1 line
1.9.0
#2 lore raw
In reply to Jiri Pirko
Quoted 10 lines · Jiri Pirko

In vmxnet3_cleanup_msix(), there is called msix_vector_unuse() with VMXNET3_MAX_INTRS. That is not correct since vector of value VMXNET3_MAX_INTRS was never used. Also all the used vectors are not un-used. So call vmxnet3_unuse_msix_vectors() instead which does the correct job.

---
 hw/net/vmxnet3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Thanks, applied to my net tree:
https://github.com/stefanha/qemu/commits/net

Stefan