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
This commit is contained in:
Bryan Venteicher 2013-06-15 03:55:04 +00:00
parent a8f6ac0573
commit b059b01e74
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=251769

View File

@ -2470,9 +2470,9 @@ vtnet_rx_filter_mac(struct vtnet_softc *sc)
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"));