if (dev->ops->send_request(dev, VHOST_USER_GET_FEATURES,
&dev->device_features) < 0) {
if (dev->ops->send_request(dev, VHOST_USER_GET_FEATURES,
&dev->device_features) < 0) {
dev->features &= dev->device_features;
/* For packed ring, resetting queues is required in reconnection. */
dev->features &= dev->device_features;
/* For packed ring, resetting queues is required in reconnection. */
(old_status & VIRTIO_CONFIG_STATUS_DRIVER_OK)) {
PMD_INIT_LOG(NOTICE, "Packets on the fly will be dropped"
" when packed ring reconnecting.");
virtio_user_reset_queues_packed(eth_dev);
}
(old_status & VIRTIO_CONFIG_STATUS_DRIVER_OK)) {
PMD_INIT_LOG(NOTICE, "Packets on the fly will be dropped"
" when packed ring reconnecting.");
virtio_user_reset_queues_packed(eth_dev);
}
/* rxq interrupts and config interrupt are separated in virtio-user,
* here we only report config change.
*/
/* rxq interrupts and config interrupt are separated in virtio-user,
* here we only report config change.
*/
virtio_user_setup_queue_packed(vq, dev);
else
virtio_user_setup_queue_split(vq, dev);
virtio_user_setup_queue_packed(vq, dev);
else
virtio_user_setup_queue_split(vq, dev);
virtio_user_handle_cq_packed(dev, vq->vq_queue_index);
else
virtio_user_handle_cq(dev, vq->vq_queue_index);
virtio_user_handle_cq_packed(dev, vq->vq_queue_index);
else
virtio_user_handle_cq(dev, vq->vq_queue_index);
.read_dev_cfg = virtio_user_read_dev_config,
.write_dev_cfg = virtio_user_write_dev_config,
.get_status = virtio_user_get_status,
.read_dev_cfg = virtio_user_read_dev_config,
.write_dev_cfg = virtio_user_write_dev_config,
.get_status = virtio_user_get_status,
- virtio_hw_internal[hw->port_id].vtpci_ops = &virtio_user_ops;
- /*
- * MSIX is required to enable LSC (see virtio_init_device).
- * Here just pretend that we support msix.
- */
- hw->use_msix = 1;
- hw->bus_type = VIRTIO_BUS_USER;
+ VIRTIO_OPS(hw) = &virtio_user_ops;
+
+ hw->intr_lsc = 1;
if (eth_virtio_dev_init(eth_dev) < 0) {
PMD_INIT_LOG(ERR, "eth_virtio_dev_init fails");
rte_eth_dev_release_port(eth_dev);
if (eth_virtio_dev_init(eth_dev) < 0) {
PMD_INIT_LOG(ERR, "eth_virtio_dev_init fails");
rte_eth_dev_release_port(eth_dev);