Skip to content

Commit bb5a0d1

Browse files
authored
Merge pull request #15 from Bobo1239/master
Minor fixes for Virtio driver
2 parents f0f2ce8 + dd4d617 commit bb5a0d1

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/driver/virtio.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
#include "virtio.h"
1212
#include "virtio_type.h"
1313

14-
#include "libixy-vfio.h"
15-
1614
static const char* driver_name = "ixy-virtio";
1715

1816
static inline void virtio_legacy_notify_queue(struct virtio_device* dev, uint16_t idx) {
@@ -284,9 +282,6 @@ static void virtio_legacy_init(struct virtio_device* dev) {
284282
// Negotiate features
285283
uint32_t host_features = read_io32(dev->fd, VIRTIO_PCI_HOST_FEATURES);
286284
debug("Host features: %x", host_features);
287-
if (!(host_features & VIRTIO_F_VERSION_1)) {
288-
error("In legacy mode but device is not legacy");
289-
}
290285
const uint32_t required_features = (1u << VIRTIO_NET_F_CSUM) | (1u << VIRTIO_NET_F_GUEST_CSUM) |
291286
(1u << VIRTIO_NET_F_CTRL_VQ) | (1u << VIRTIO_F_ANY_LAYOUT) |
292287
(1u << VIRTIO_NET_F_CTRL_RX) /*| (1u<<VIRTIO_NET_F_MQ)*/;
@@ -340,9 +335,6 @@ struct ixy_device* virtio_init(const char* pci_addr, uint16_t rx_queues, uint16_
340335
remove_driver(pci_addr);
341336
struct virtio_device* dev = calloc(1, sizeof(*dev));
342337
dev->ixy.pci_addr = strdup(pci_addr);
343-
if (dev->ixy.vfio) {
344-
check_err(vfio_init(dev->ixy.pci_addr), "init vfio");
345-
}
346338
dev->ixy.driver_name = driver_name;
347339
dev->ixy.num_rx_queues = rx_queues;
348340
dev->ixy.num_tx_queues = tx_queues;

0 commit comments

Comments
 (0)