svn commit: r250802 - user/bryanv/vtnetmq/sys/dev/virtio/network

Bryan Venteicher bryanv at FreeBSD.org
Sun May 19 03:02:42 UTC 2013


Author: bryanv
Date: Sun May 19 03:02:41 2013
New Revision: 250802
URL: http://svnweb.freebsd.org/changeset/base/250802

Log:
  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.

Modified:
  user/bryanv/vtnetmq/sys/dev/virtio/network/if_vtnet.c

Modified: user/bryanv/vtnetmq/sys/dev/virtio/network/if_vtnet.c
==============================================================================
--- user/bryanv/vtnetmq/sys/dev/virtio/network/if_vtnet.c	Sun May 19 03:01:33 2013	(r250801)
+++ user/bryanv/vtnetmq/sys/dev/virtio/network/if_vtnet.c	Sun May 19 03:02:41 2013	(r250802)
@@ -3218,9 +3218,9 @@ vtnet_rx_filter_mac(struct vtnet_softc *
 	error = 0;
 	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,
 	    ("%s: error %d adding MAC filter msg to sglist", __func__, error));


More information about the svn-src-user mailing list