Date: Thu, 6 Jun 2019 12:26:10 -0400 From: Mark Johnston <markj@freebsd.org> To: Sebastian Huber <sebastian.huber@embedded-brains.de> Cc: freebsd-hackers@freebsd.org Subject: Re: [PATCH] if_lagg: Add INVARIANTS condition Message-ID: <20190606162610.GC4116@raichu> In-Reply-To: <20190605114110.30467-1-sebastian.huber@embedded-brains.de> References: <20190605114110.30467-1-sebastian.huber@embedded-brains.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jun 05, 2019 at 01:41:10PM +0200, Sebastian Huber wrote: > There is no need to call in_epoch() in case INVARIANTS is not defined. I committed this in r348745. > --- > sys/net/if_lagg.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c > index 1a4d1d302ec..3e1cb2043b0 100644 > --- a/sys/net/if_lagg.c > +++ b/sys/net/if_lagg.c > @@ -1955,12 +1955,14 @@ lagg_link_active(struct lagg_softc *sc, struct lagg_port *lp) > * Search a port which reports an active link state. > */ > > +#ifdef INVARIANTS > /* > * This is called with either LAGG_RLOCK() held or > * LAGG_XLOCK(sc) held. > */ > if (!in_epoch(net_epoch_preempt)) > LAGG_XLOCK_ASSERT(sc); > +#endif > > if (lp == NULL) > goto search; > -- > 2.16.4 > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190606162610.GC4116>