1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-19 02:29:40 +00:00

Add softc flag for when the indirect descriptor feature was negotiated

MFC after:	2 weeks
This commit is contained in:
Bryan Venteicher 2015-01-01 02:06:00 +00:00
parent 5b32b2faaa
commit ab4c2818f2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=276491
2 changed files with 5 additions and 2 deletions

View File

@ -599,6 +599,8 @@ vtnet_setup_features(struct vtnet_softc *sc)
vtnet_negotiate_features(sc);
if (virtio_with_feature(dev, VIRTIO_RING_F_INDIRECT_DESC))
sc->vtnet_flags |= VTNET_FLAG_INDIRECT;
if (virtio_with_feature(dev, VIRTIO_RING_F_EVENT_IDX))
sc->vtnet_flags |= VTNET_FLAG_EVENT_IDX;
@ -3653,7 +3655,7 @@ vtnet_set_tx_intr_threshold(struct vtnet_softc *sc)
* Without indirect descriptors, leave enough room for the most
* segments we handle.
*/
if (virtio_with_feature(dev, VIRTIO_RING_F_INDIRECT_DESC) == 0 &&
if ((sc->vtnet_flags & VTNET_FLAG_INDIRECT) == 0 &&
thresh < sc->vtnet_tx_nsegs)
thresh = sc->vtnet_tx_nsegs;

View File

@ -140,7 +140,8 @@ struct vtnet_softc {
#define VTNET_FLAG_MRG_RXBUFS 0x0080
#define VTNET_FLAG_LRO_NOMRG 0x0100
#define VTNET_FLAG_MULTIQ 0x0200
#define VTNET_FLAG_EVENT_IDX 0x0400
#define VTNET_FLAG_INDIRECT 0x0400
#define VTNET_FLAG_EVENT_IDX 0x0800
int vtnet_link_active;
int vtnet_hdr_size;