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

Function get_device

dpdk/lib/vhost/vhost.h:824–837  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

822}
823
824static __rte_always_inline struct virtio_net *
825get_device(int vid)
826{
827 struct virtio_net *dev = NULL;
828
829 if (likely(vid >= 0 && vid < RTE_MAX_VHOST_DEVICE))
830 dev = vhost_devices[vid];
831
832 if (unlikely(!dev)) {
833 VHOST_LOG_CONFIG("device", ERR, "(%d) device not found.\n", vid);
834 }
835
836 return dev;
837}
838
839int vhost_new_device(struct vhost_backend_ops *ops);
840void cleanup_device(struct virtio_net *dev, int destroy);

Callers 15

vhost_user_read_cbFunction · 0.85
vduse_device_createFunction · 0.85
vhost_destroy_deviceFunction · 0.85
vhost_attach_vdpa_deviceFunction · 0.85
vhost_set_ifnameFunction · 0.85
vhost_setup_virtio_netFunction · 0.85
vhost_enable_extbufFunction · 0.85
vhost_enable_linearbufFunction · 0.85
rte_vhost_get_mtuFunction · 0.85
rte_vhost_get_numa_nodeFunction · 0.85
rte_vhost_get_vring_numFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected