From owner-freebsd-current@FreeBSD.ORG Mon Aug 5 17:20:15 2013 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6D08DA6B; Mon, 5 Aug 2013 17:20:15 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wi0-x232.google.com (mail-wi0-x232.google.com [IPv6:2a00:1450:400c:c05::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A607C2997; Mon, 5 Aug 2013 17:20:14 +0000 (UTC) Received: by mail-wi0-f178.google.com with SMTP id j17so1795681wiw.17 for ; Mon, 05 Aug 2013 10:20:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=Z0qqlvZSbYYLwmIdMg8zl/qe3mxUzG93G0K4/kOzScY=; b=ckD4n2U9qLwrdUtA9Ciz+MfDiedcLFccJcofzCt8GGnwvw/aTSitKmig59gXpJGGUu WxJYNDsI1vcXuQOq58YoRc1uls+mh8fIMsfb6xy7fbFN0Ok+fyDXlEnirrNIzmOEQdYc 24VZ8WaChaHPp+3q3lLaGNP5d64s18wOFlkcjf7AyUsc+3uda9V/pJSwgnB/0vR/2kSy PQc9YRpdJMG74phBDqk+5BT2v1F+OOQeadVg08+bGfHH1jwefqGmobiHvOQZg65IoE3/ 8GWRIkXbhOtl94uPNFJz0/KmQHb6ljoKTsUMJ5qmu2zZOfIN/jqtm+4op11Wluddb99s RRew== MIME-Version: 1.0 X-Received: by 10.194.201.202 with SMTP id kc10mr14057689wjc.1.1375723212843; Mon, 05 Aug 2013 10:20:12 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.116.136 with HTTP; Mon, 5 Aug 2013 10:20:12 -0700 (PDT) In-Reply-To: References: <20130805082307.GA35162@onelab2.iet.unipi.it> <2034715395.855.1375714772487.JavaMail.root@daemoninthecloset.org> <51FFDD1E.1000206@FreeBSD.org> Date: Mon, 5 Aug 2013 10:20:12 -0700 X-Google-Sender-Auth: 2-qcTBCZjB_LRkVkLpTgqOsD12Q Message-ID: Subject: Re: [net] protecting interfaces from races between control and data ? From: Adrian Chadd To: Navdeep Parhar Content-Type: text/plain; charset=ISO-8859-1 Cc: Bryan Venteicher , Giuseppe Lettieri , Luigi Rizzo , current@freebsd.org, net@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Aug 2013 17:20:15 -0000 .. and I bet it's not a design pattern, and this is total conjecture on my part: * the original drivers weren't SMP safe; * noone really sat down and figured out how to correctly synchronise all of this stuff; * people did the minimum amount of work to keep the driver from immediately crashing, but didn't really think things through at a larger scale. Almost every driver is this way Luigi. :-) -adrian