mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
Fix networking problem after r280026.
I've missed that network driver sometimes returns taken request back to available queue without processing. Add new helper function for that case. Reported by: flo MFC after: 2 weeks
This commit is contained in:
parent
e72d4950e1
commit
7315946b80
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=280041
@ -342,6 +342,7 @@ pci_vtnet_tap_rx(struct pci_vtnet_softc *sc)
|
||||
* No more packets, but still some avail ring
|
||||
* entries. Interrupt if needed/appropriate.
|
||||
*/
|
||||
vq_retchain(vq);
|
||||
vq_endchains(vq, 0);
|
||||
return;
|
||||
}
|
||||
|
@ -372,8 +372,21 @@ vq_getchain(struct vqueue_info *vq, uint16_t *pidx,
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the currently-first request chain to the guest, setting
|
||||
* its I/O length to the provided value.
|
||||
* Return the currently-first request chain back to the available queue.
|
||||
*
|
||||
* (This chain is the one you handled when you called vq_getchain()
|
||||
* and used its positive return value.)
|
||||
*/
|
||||
void
|
||||
vq_retchain(struct vqueue_info *vq)
|
||||
{
|
||||
|
||||
vq->vq_last_avail--;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return specified request chain to the guest, setting its I/O length
|
||||
* to the provided value.
|
||||
*
|
||||
* (This chain is the one you handled when you called vq_getchain()
|
||||
* and used its positive return value.)
|
||||
|
@ -453,6 +453,7 @@ void vi_set_io_bar(struct virtio_softc *, int);
|
||||
|
||||
int vq_getchain(struct vqueue_info *vq, uint16_t *pidx,
|
||||
struct iovec *iov, int n_iov, uint16_t *flags);
|
||||
void vq_retchain(struct vqueue_info *vq);
|
||||
void vq_relchain(struct vqueue_info *vq, uint16_t idx, uint32_t iolen);
|
||||
void vq_endchains(struct vqueue_info *vq, int used_all_avail);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user