Date: Thu, 8 Aug 2013 17:20:13 -0700 From: Scott Long <scott4long@yahoo.com> To: Adrian Chadd <adrian@freebsd.org> Cc: current@freebsd.org, Bryan Venteicher <bryanv@daemoninthecloset.org>, Navdeep Parhar <np@freebsd.org>, net@freebsd.org, Giuseppe Lettieri <g.lettieri@iet.unipi.it>, Luigi Rizzo <rizzo@iet.unipi.it>, Warner Losh <imp@bsdimp.com> Subject: Re: [net] protecting interfaces from races between control and data ? Message-ID: <0068D32B-C900-47EB-8E82-C50506AB1F6D@yahoo.com> In-Reply-To: <CAJ-Vmo=XMWtTbRyg7Bin8Sg=8wO_=PusLXhJcWzysE19-r0KVQ@mail.gmail.com> References: <20130805082307.GA35162@onelab2.iet.unipi.it> <2034715395.855.1375714772487.JavaMail.root@daemoninthecloset.org> <CAJ-VmokT6YKPR7CXsoCavEmWv3W8urZu4eBVgKWaj9iMaVJFZg@mail.gmail.com> <CA%2BhQ2%2BhuoCCweq7fjoYmH3nyhmhb5DzukEdPSMtaJEWa8Ft0JQ@mail.gmail.com> <51FFDD1E.1000206@FreeBSD.org> <CAJ-Vmo=Q9AqdBJ0%2B4AiX4%2BWreYuZx6VGGYw=MZ4XhMB1P2yMww@mail.gmail.com> <CAJ-Vmomd9bD9cXJtOWnuL_yuM%2BF%2Bt6zaaEgq2PxiT_wxQi%2Bejg@mail.gmail.com> <CCB7CD35-4D48-449B-8DFE-FC63F7F26ED9@bsdimp.com> <3BFB5B13-78C5-47E0-81B8-29A03A0136DF@yahoo.com> <CAJ-Vmo=XMWtTbRyg7Bin8Sg=8wO_=PusLXhJcWzysE19-r0KVQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Yup, it's an incredibly unsafe pattern. It also leads to the pattern where auxiliary processing is handed off to a taskqueue, which then interleaves the lock ownership with the ithread and produces out-of-order packet reception. Scott On Aug 8, 2013, at 5:18 PM, Adrian Chadd <adrian@freebsd.org> wrote: > .. and it's not just about "saturate the port" with traffic. > > It's also about "what happens if I shut down the MAC whilst I'm in the > process of programming in new RX/TX descriptors?" > > The ath(4) driver had a spectacular behaviour where if you mess things > up the wrong way it will quite happily DMA crap all over the memory of > your running system, leading to quite hilarious bugs. > > > > -adrian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0068D32B-C900-47EB-8E82-C50506AB1F6D>