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

Function rte_vhost_driver_callback_register

dpdk/lib/vhost/socket.c:1159–1172  ·  view source on GitHub ↗

* Register ops so that we can add/remove device to data core. */

Source from the content-addressed store, hash-verified

1157 * Register ops so that we can add/remove device to data core.
1158 */
1159int
1160rte_vhost_driver_callback_register(const char *path,
1161 struct rte_vhost_device_ops const * const ops)
1162{
1163 struct vhost_user_socket *vsocket;
1164
1165 pthread_mutex_lock(&vhost_user.mutex);
1166 vsocket = find_vhost_user_socket(path);
1167 if (vsocket)
1168 vsocket->notify_ops = ops;
1169 pthread_mutex_unlock(&vhost_user.mutex);
1170
1171 return vsocket ? 0 : -1;
1172}
1173
1174struct rte_vhost_device_ops const *
1175vhost_driver_callback_get(const char *path)

Callers 5

vhost_driver_setupFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
start_vdpaFunction · 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