Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Oct 2013 10:15:39 -0500
From:      Bryan Venteicher <bryanv@freebsd.org>
To:        koobs@freebsd.org
Cc:        svn-src-head@freebsd.org, Bryan Venteicher <bryanv@freebsd.org>, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r256066 - head/sys/dev/virtio/network
Message-ID:  <CAGaYwLc0-Mf=_FKB9cvw_%2BS6OeRYT5inDtVOr6Lysn3Nb9LeWA@mail.gmail.com>
In-Reply-To: <52515651.6050809@FreeBSD.org>
References:  <201310051807.r95I7P0M048589@svn.freebsd.org> <52515651.6050809@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Oct 6, 2013 at 7:23 AM, Kubilay Kocak <koobs.freebsd@gmail.com>wrote:

> On 6/10/2013 5:07 AM, Bryan Venteicher wrote:
> > Author: bryanv
> > Date: Sat Oct  5 18:07:24 2013
> > New Revision: 256066
> > URL: http://svnweb.freebsd.org/changeset/base/256066
> >
> > Log:
> >   Do not hold the vtnet Rx queue lock when calling up into the stack
> >
> >   This matches other similar drivers and avoids various LOR warnings.
> >
> >   Approved by:        re (marius)
> >
> > Modified:
> >   head/sys/dev/virtio/network/if_vtnet.c
> >
> > Modified: head/sys/dev/virtio/network/if_vtnet.c
> >
> ==============================================================================
> > --- head/sys/dev/virtio/network/if_vtnet.c    Sat Oct  5 16:22:33 2013
>      (r256065)
> > +++ head/sys/dev/virtio/network/if_vtnet.c    Sat Oct  5 18:07:24 2013
>      (r256066)
> > @@ -1700,9 +1700,9 @@ vtnet_rxq_input(struct vtnet_rxq *rxq, s
> >       rxq->vtnrx_stats.vrxs_ipackets++;
> >       rxq->vtnrx_stats.vrxs_ibytes += m->m_pkthdr.len;
> >
> > -     /* VTNET_RXQ_UNLOCK(rxq); */
> > +     VTNET_RXQ_UNLOCK(rxq);
> >       (*ifp->if_input)(ifp, m);
> > -     /* VTNET_RXQ_LOCK(rxq); */
> > +     VTNET_RXQ_LOCK(rxq);
> >  }
> >
> >  static int
> > @@ -1782,6 +1782,10 @@ vtnet_rxq_eof(struct vtnet_rxq *rxq)
> >               m_adj(m, adjsz);
> >
> >               vtnet_rxq_input(rxq, m, hdr);
> > +
> > +             /* Must recheck after dropping the Rx lock. */
> > +             if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
> > +                     break;
> >       }
> >
> >       if (deq > 0)
> > _______________________________________________
> > svn-src-head@freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/svn-src-head
> > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org"
> >
>
> Thanks Bryan, confirming no more LOR apparent after this commit :)
>
> Is this a good MFC candidate?


The driver in -CURRENT is very different than what is in -STABLE. I'll
bundle this change (and any applicable subsequent ones) when I MFC in a
month or so.


>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGaYwLc0-Mf=_FKB9cvw_%2BS6OeRYT5inDtVOr6Lysn3Nb9LeWA>