qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] virtio-net: Correctly store multicast filter en


From: Vlad Yasevich
Subject: Re: [Qemu-devel] [PATCH] virtio-net: Correctly store multicast filter entries
Date: Fri, 08 Nov 2013 12:39:02 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0

On 11/08/2013 11:07 AM, Vlad Yasevich wrote:
Commit 921ac5d0f3a0df869db5ce4edf752f51d8b1596a
         virtio-net: remove layout assumptions for ctrl vq
introduced a regression where the multicast address filter
entries are written to the beginning of the mac table array,
thus overwriting any unicast addresses that may have been
programmed in the filter.
The multicast addresses should be written after all the
unicast addresses.

Signed-off-by: Vlad Yasevich <address@hidden>

Please ignore.  Just saw pull pull request with similar patch.

-vlad

---
  hw/net/virtio-net.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 22dbd05..94e8b68 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -657,7 +657,8 @@ static int virtio_net_handle_mac(VirtIONet *n, uint8_t cmd,
      }

      if (n->mac_table.in_use + mac_data.entries <= MAC_TABLE_ENTRIES) {
-        s = iov_to_buf(iov, iov_cnt, 0, n->mac_table.macs,
+        s = iov_to_buf(iov, iov_cnt, 0,
+                       n->mac_table.macs + (n->mac_table.in_use * ETH_ALEN),
                         mac_data.entries * ETH_ALEN);
          if (s != mac_data.entries * ETH_ALEN) {
              goto error;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]