net/virtio-user: fix setting filters

As doc mentioned, Rx/Mac/vlan filters are all supported by best effort.
These control commands should return success.

Fixes: f9b9d1a557 ("net/virtio-user: add multiple queues in device emulation")
Cc: stable@dpdk.org

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
This commit is contained in:
Marvin Liu 2019-11-06 17:02:50 +08:00 committed by Ferruh Yigit
parent bc42ca1787
commit a76552d48f

View File

@ -613,6 +613,10 @@ virtio_user_handle_ctrl_msg(struct virtio_user_dev *dev, struct vring *vring,
queues = *(uint16_t *)(uintptr_t)vring->desc[idx_data].addr;
status = virtio_user_handle_mq(dev, queues);
} else if (hdr->class == VIRTIO_NET_CTRL_RX ||
hdr->class == VIRTIO_NET_CTRL_MAC ||
hdr->class == VIRTIO_NET_CTRL_VLAN) {
status = 0;
}
/* Update status */
@ -664,6 +668,10 @@ virtio_user_handle_ctrl_msg_packed(struct virtio_user_dev *dev,
queues = *(uint16_t *)(uintptr_t)
vring->desc[idx_data].addr;
status = virtio_user_handle_mq(dev, queues);
} else if (hdr->class == VIRTIO_NET_CTRL_RX ||
hdr->class == VIRTIO_NET_CTRL_MAC ||
hdr->class == VIRTIO_NET_CTRL_VLAN) {
status = 0;
}
/* Update status */