Date: Mon, 19 Jan 2015 17:02:30 +0000 (UTC) From: Bryan Venteicher <bryanv@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277389 - stable/10/sys/dev/virtio/network Message-ID: <201501191702.t0JH2URT029644@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bryanv Date: Mon Jan 19 17:02:30 2015 New Revision: 277389 URL: https://svnweb.freebsd.org/changeset/base/277389 Log: MFC r276491: Add softc flag for when the indirect descriptor feature was negotiated Modified: stable/10/sys/dev/virtio/network/if_vtnet.c stable/10/sys/dev/virtio/network/if_vtnetvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/virtio/network/if_vtnet.c ============================================================================== --- stable/10/sys/dev/virtio/network/if_vtnet.c Mon Jan 19 17:00:53 2015 (r277388) +++ stable/10/sys/dev/virtio/network/if_vtnet.c Mon Jan 19 17:02:30 2015 (r277389) @@ -597,6 +597,8 @@ vtnet_setup_features(struct vtnet_softc 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; @@ -3663,7 +3665,7 @@ vtnet_set_tx_intr_threshold(struct vtnet * 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; Modified: stable/10/sys/dev/virtio/network/if_vtnetvar.h ============================================================================== --- stable/10/sys/dev/virtio/network/if_vtnetvar.h Mon Jan 19 17:00:53 2015 (r277388) +++ stable/10/sys/dev/virtio/network/if_vtnetvar.h Mon Jan 19 17:02:30 2015 (r277389) @@ -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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501191702.t0JH2URT029644>