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

Function rte_vhost_backend_config_change

dpdk/lib/vhost/vhost_user.c:3341–3368  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3339}
3340
3341int
3342rte_vhost_backend_config_change(int vid, bool need_reply)
3343{
3344 struct vhu_msg_context ctx = {
3345 .msg = {
3346 .request.backend = VHOST_USER_BACKEND_CONFIG_CHANGE_MSG,
3347 .flags = VHOST_USER_VERSION,
3348 .size = 0,
3349 }
3350 };
3351 struct virtio_net *dev;
3352 int ret;
3353
3354 dev = get_device(vid);
3355 if (!dev)
3356 return -ENODEV;
3357
3358 if (!need_reply) {
3359 ret = send_vhost_backend_message(dev, &ctx);
3360 } else {
3361 ctx.msg.flags |= VHOST_USER_NEED_REPLY;
3362 ret = send_vhost_backend_message_process_reply(dev, &ctx);
3363 }
3364
3365 if (ret < 0)
3366 VHOST_LOG_CONFIG(dev->ifname, ERR, "failed to send config change (%d)\n", ret);
3367 return ret;
3368}
3369
3370static int vhost_user_backend_set_vring_host_notifier(struct virtio_net *dev,
3371 int index, int fd,

Callers 1

virtio_interrupt_handlerFunction · 0.85

Calls 3

get_deviceFunction · 0.85

Tested by

no test coverage detected