Author: bryanv
Date: Sat Jun 15 03:55:04 2013
New Revision: 251769
URL: http://svnweb.freebsd.org/changeset/base/251769

Log:
  Merge r250802 from bryanv/vtnetmq - Fix setting of the Rx filters
  
  QEMU 1.4 made the descriptor requirement stricter - the size of buffer
  descriptor must exactly match the number of MAC addresses provided.
  
  PR:           kern/178955
  MFC after:    5 days

Modified:
  head/sys/dev/virtio/network/if_vtnet.c

Modified: head/sys/dev/virtio/network/if_vtnet.c
==============================================================================
--- head/sys/dev/virtio/network/if_vtnet.c      Sat Jun 15 01:35:52 2013        
(r251768)
+++ head/sys/dev/virtio/network/if_vtnet.c      Sat Jun 15 03:55:04 2013        
(r251769)
@@ -2470,9 +2470,9 @@ vtnet_rx_filter_mac(struct vtnet_softc *
        sglist_init(&sg, 4, segs);
        error |= sglist_append(&sg, &hdr, sizeof(struct virtio_net_ctrl_hdr));
        error |= sglist_append(&sg, &filter->vmf_unicast,
-           sizeof(struct vtnet_mac_table));
+           sizeof(uint32_t) + filter->vmf_unicast.nentries * ETHER_ADDR_LEN);
        error |= sglist_append(&sg, &filter->vmf_multicast,
-           sizeof(struct vtnet_mac_table));
+           sizeof(uint32_t) + filter->vmf_multicast.nentries * ETHER_ADDR_LEN);
        error |= sglist_append(&sg, &ack, sizeof(uint8_t));
        KASSERT(error == 0 && sg.sg_nseg == 4,
            ("error adding MAC filtering message to sglist"));
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to