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

Function rte_vhost_get_ifname

dpdk/lib/vhost/vhost.c:918–932  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

916}
917
918int
919rte_vhost_get_ifname(int vid, char *buf, size_t len)
920{
921 struct virtio_net *dev = get_device(vid);
922
923 if (dev == NULL || buf == NULL)
924 return -1;
925
926 len = RTE_MIN(len, sizeof(dev->ifname));
927
928 strncpy(buf, dev->ifname, len);
929 buf[len - 1] = '\0';
930
931 return 0;
932}
933
934int
935rte_vhost_get_negotiated_features(int vid, uint64_t *features)

Callers 11

new_deviceFunction · 0.85
destroy_deviceFunction · 0.85
vring_state_changedFunction · 0.85
new_deviceFunction · 0.85
get_socketid_by_vidFunction · 0.85
new_deviceFunction · 0.85
destroy_deviceFunction · 0.85
new_deviceFunction · 0.85
destroy_deviceFunction · 0.85

Calls 2

get_deviceFunction · 0.85
strncpyFunction · 0.85

Tested by

no test coverage detected