MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rte_vhost_driver_set_features

Function rte_vhost_driver_set_features

dpdk/lib/vhost/socket.c:703–722  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

701}
702
703int
704rte_vhost_driver_set_features(const char *path, uint64_t features)
705{
706 struct vhost_user_socket *vsocket;
707
708 pthread_mutex_lock(&vhost_user.mutex);
709 vsocket = find_vhost_user_socket(path);
710 if (vsocket) {
711 vsocket->supported_features = features;
712 vsocket->features = features;
713
714 /* Anyone setting feature bits is implementing their own vhost
715 * device backend.
716 */
717 vsocket->use_builtin_virtio_net = false;
718 }
719 pthread_mutex_unlock(&vhost_user.mutex);
720
721 return vsocket ? 0 : -1;
722}
723
724int
725rte_vhost_driver_get_features(const char *path, uint64_t *features)

Callers 4

mainFunction · 0.85

Calls 3

pthread_mutex_lockFunction · 0.85
find_vhost_user_socketFunction · 0.85
pthread_mutex_unlockFunction · 0.85

Tested by

no test coverage detected