| 1435 | } |
| 1436 | |
| 1437 | static inline int |
| 1438 | vhost_enable_notify_split(struct virtio_net *dev, |
| 1439 | struct vhost_virtqueue *vq, int enable) |
| 1440 | { |
| 1441 | if (vq->used == NULL) |
| 1442 | return -1; |
| 1443 | |
| 1444 | if (!(dev->features & (1ULL << VIRTIO_RING_F_EVENT_IDX))) { |
| 1445 | if (enable) |
| 1446 | vq->used->flags &= ~VRING_USED_F_NO_NOTIFY; |
| 1447 | else |
| 1448 | vq->used->flags |= VRING_USED_F_NO_NOTIFY; |
| 1449 | } else { |
| 1450 | if (enable) |
| 1451 | vhost_avail_event(vq) = vq->last_avail_idx; |
| 1452 | } |
| 1453 | return 0; |
| 1454 | } |
| 1455 | |
| 1456 | static inline int |
| 1457 | vhost_enable_notify_packed(struct virtio_net *dev, |
no outgoing calls
no test coverage detected