| 3339 | } |
| 3340 | |
| 3341 | int |
| 3342 | rte_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 | |
| 3370 | static int vhost_user_backend_set_vring_host_notifier(struct virtio_net *dev, |
| 3371 | int index, int fd, |
no test coverage detected