vhost: enable promiscuous and multicast
[dpdk.git] / lib / librte_vhost / virtio-net.c
index 50cab24..852b6d1 100644 (file)
@@ -68,7 +68,8 @@ static struct virtio_net_device_ops const *notify_ops;
 static struct virtio_net_config_ll *ll_root;
 
 /* Features supported by this lib. */
-#define VHOST_SUPPORTED_FEATURES (1ULL << VIRTIO_NET_F_MRG_RXBUF)
+#define VHOST_SUPPORTED_FEATURES ((1ULL << VIRTIO_NET_F_MRG_RXBUF) | \
+                                 (1ULL << VIRTIO_NET_F_CTRL_RX))
 static uint64_t VHOST_FEATURES = VHOST_SUPPORTED_FEATURES;
 
 /* Line size for reading maps file. */
@@ -247,7 +248,7 @@ host_memory_map(struct virtio_net *dev, struct virtio_memory *mem,
                snprintf(memfile, PATH_MAX, "/proc/%u/fd/%s",
                                pid, dptr->d_name);
                path = realpath(memfile, resolved_path);
-               if (path == NULL) {
+               if ((path == NULL) && (strlen(resolved_path) == 0)) {
                        RTE_LOG(ERR, VHOST_CONFIG,
                                "(%"PRIu64") Failed to resolve fd directory\n",
                                dev->device_fh);