Add softc flag for when the indirect descriptor feature was negotiated
MFC after: 2 weeks
This commit is contained in:
parent
5b32b2faaa
commit
ab4c2818f2
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user