static void pci_vtblk_qnotify(struct pci_vtblk_softc *sc) { struct vring_hqueue *hq = &sc->vbsc_q; int i; int ndescs; /* * Calculate number of ring entries to process */ ndescs = hq_num_avail(hq); if (ndescs == 0) return; /* * Run through all the entries, placing them into iovecs and * sending when an end-of-packet is found */ for (i = 0; i < ndescs; i++) pci_vtblk_proc(sc, hq); /* * Generate an interrupt if able */ if ((*hq->hq_avail_flags & VRING_AVAIL_F_NO_INTERRUPT) == 0 && sc->vbsc_isr == 0) { sc->vbsc_isr = 1; pci_generate_msi(sc->vbsc_pi, 0); } }
static void pci_vtblk_notify(void *vsc, struct vqueue_info *vq) { struct pci_vtblk_softc *sc = vsc; while (vq_has_descs(vq)) pci_vtblk_proc(sc, vq); }
static void pci_vtblk_notify(void *vsc, struct vqueue_info *vq) { struct pci_vtblk_softc *sc = vsc; vq_startchains(vq); while (vq_has_descs(vq)) pci_vtblk_proc(sc, vq); vq_endchains(vq, 1); /* Generate interrupt if appropriate. */ }