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

Function vhost_enable_notify_split

dpdk/lib/vhost/vhost.c:1437–1454  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1435}
1436
1437static inline int
1438vhost_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
1456static inline int
1457vhost_enable_notify_packed(struct virtio_net *dev,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected