git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/virtio: add device config support to vDPA
[dpdk.git]
/
drivers
/
net
/
virtio
/
virtio_user_ethdev.c
diff --git
a/drivers/net/virtio/virtio_user_ethdev.c
b/drivers/net/virtio/virtio_user_ethdev.c
index
79bd31e
..
3ecbb41
100644
(file)
--- a/
drivers/net/virtio/virtio_user_ethdev.c
+++ b/
drivers/net/virtio/virtio_user_ethdev.c
@@
-110,7
+110,8
@@
virtio_user_get_features(struct virtio_hw *hw)
struct virtio_user_dev *dev = virtio_user_get_dev(hw);
/* unmask feature bits defined in vhost user protocol */
struct virtio_user_dev *dev = virtio_user_get_dev(hw);
/* unmask feature bits defined in vhost user protocol */
- return dev->device_features & VIRTIO_PMD_SUPPORTED_GUEST_FEATURES;
+ return (dev->device_features | dev->frontend_features) &
+ VIRTIO_PMD_SUPPORTED_GUEST_FEATURES;
}
static void
}
static void
@@
-118,7
+119,7
@@
virtio_user_set_features(struct virtio_hw *hw, uint64_t features)
{
struct virtio_user_dev *dev = virtio_user_get_dev(hw);
{
struct virtio_user_dev *dev = virtio_user_get_dev(hw);
- dev->features = features &
dev->device_features
;
+ dev->features = features &
(dev->device_features | dev->frontend_features)
;
}
static int
}
static int
@@
-360,7
+361,7
@@
vdpa_dynamic_major_num(void)
{
FILE *fp;
char *line = NULL;
{
FILE *fp;
char *line = NULL;
- size_t size;
+ size_t size
= 0
;
char name[11];
bool found = false;
uint32_t num;
char name[11];
bool found = false;
uint32_t num;
@@
-380,6
+381,7
@@
vdpa_dynamic_major_num(void)
break;
}
}
break;
}
}
+ free(line);
fclose(fp);
return found ? num : UNNAMED_MAJOR;
}
fclose(fp);
return found ? num : UNNAMED_MAJOR;
}