On Wed, Jul 07, 2021 at 01:15:00PM -0700, Chris Cappuccio wrote:
> Alexandr Nedvedicky [[email protected]] wrote:
> > diff --git a/sys/net/if_tpmr.c b/sys/net/if_tpmr.c
> > index f6eb99f347c..4ffa5b18293 100644
> > @@ -725,10 +759,9 @@ tpmr_p_dtor(struct tpmr_softc *sc, struct tpmr_port
> > *p, const char *op)
> > if_detachhook_del(ifp0, &p->p_dtask);
> > if_linkstatehook_del(ifp0, &p->p_ltask);
> >
> > - smr_barrier();
> > + tpmr_p_rele(p);
> >
> > - if_put(ifp0);
> > - free(p, M_DEVBUF, sizeof(*p));
> > + smr_barrier();
> >
> > if (ifp->if_link_state != LINK_STATE_DOWN) {
> > ifp->if_link_state = LINK_STATE_DOWN;
>
> The order is changing here, it was smr_barrier and then the
> equivalent of tpmr_p_rele, now it is tpmr_p_rele first,
> smr_barrier second, is that change intentional ?
yes, the change was prompted by test scenario created
by Hrvoje. The port destroy operation blocked indefinitely
on smr_barrier(). After swapping the lines problem was gone.
thanks and
regards
sashan