| 242 | } |
| 243 | |
| 244 | static void |
| 245 | vhost_user_notify_queue_state(struct virtio_net *dev, struct vhost_virtqueue *vq, |
| 246 | int enable) |
| 247 | { |
| 248 | struct rte_vdpa_device *vdpa_dev = dev->vdpa_dev; |
| 249 | |
| 250 | /* Configure guest notifications on enable */ |
| 251 | if (enable && vq->notif_enable != VIRTIO_UNINITIALIZED_NOTIF) |
| 252 | vhost_enable_guest_notification(dev, vq, vq->notif_enable); |
| 253 | |
| 254 | if (vdpa_dev && vdpa_dev->ops->set_vring_state) |
| 255 | vdpa_dev->ops->set_vring_state(dev->vid, vq->index, enable); |
| 256 | |
| 257 | if (dev->notify_ops->vring_state_changed) |
| 258 | dev->notify_ops->vring_state_changed(dev->vid, vq->index, enable); |
| 259 | } |
| 260 | |
| 261 | /* |
| 262 | * This function just returns success at the moment unless |
no test coverage detected