Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Sep 2012 07:58:43 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        Ryan Stone <rysto32@gmail.com>
Cc:        freebsd-net@freebsd.org, Jack Vogel <jfvogel@gmail.com>, Vijay Singh <vijju.singh@gmail.com>
Subject:   Re: ixgbe rx & tx locks
Message-ID:  <201209270758.43445.jhb@freebsd.org>
In-Reply-To: <CAFMmRNxxZRUb9Y9WizUW3KrfKuxT11D7=q3KEBdazGfsqku6Ow@mail.gmail.com>
References:  <CALCNsJSSQSWV7vNVR-Sn8CPDKbUBBLpSH0b-HYMJo3SXvkOY=w@mail.gmail.com> <201209261538.11588.jhb@freebsd.org> <CAFMmRNxxZRUb9Y9WizUW3KrfKuxT11D7=q3KEBdazGfsqku6Ow@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday, September 26, 2012 5:28:09 pm Ryan Stone wrote:
> On Wed, Sep 26, 2012 at 3:38 PM, John Baldwin <jhb@freebsd.org> wrote:
> >> ix:rx -> udp -> udpinp -> in_multi_mtx -> ix:core -> ix:rx
> >
> > Hmm, I'm not sure where the 'in_multi_mtx -> ix:core' bit comes from.
> > I think that is the broken part of this.  The SIOCADDMULTI and SIOCDELMULTI
> > ioctls are invoked without any stack locks held, so it shouldn't come from
> > there.
> 
> I gave the backtrace for this part.  in_joingroup_locked is called
> with the in_multi_mtx held, which calls if_addmulti, which calls the
> ioctl handler.

My bad.  Too many locks. :(  We do drop the IF_ADDR_LOCK when calling
if_ioctl from if_addmulti(), but you are correct, in_multi_mtx is held.

Not sure how resolvable that is.  Many drivers need to do a fair bit of
work in SIOCADDMULTI/SIOCDELMUTLI (that is, reprogram the entire multicast
table).  One alternative might be to use a separate lock just for the
MAC filters.  That might break the in_multi_mtx -> ix:core order by letting
you avoid grabbing ix:core for those ioctls.

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209270758.43445.jhb>