From owner-freebsd-net@FreeBSD.ORG Thu Aug 8 07:01:26 2013 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4140466B for ; Thu, 8 Aug 2013 07:01:26 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ie0-f174.google.com (mail-ie0-f174.google.com [209.85.223.174]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0B1362A5B for ; Thu, 8 Aug 2013 07:01:25 +0000 (UTC) Received: by mail-ie0-f174.google.com with SMTP id w15so1229131iea.5 for ; Thu, 08 Aug 2013 00:01:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=A6d5m82Sa/9n59wqACzPWp2Y7d3RMd9JFkFh0a1SBHM=; b=i+9WNxjRK1Bku1kN20AjnoloCzqdhv2yJjxIHQRhMAK40YwHkGBt2dHrF5CIPJt1eB 9iZbxOaB331pDu40jZdqocG2DnmOFYd+fAE93Yh5CPZckIraHKP5OZ9g4EXB4/kYMmyt lhhrmuBaoI6B/3RdtXw48HJN8AYhBu/6tBjlhBwkZ5ccg5rMZTaK15uNxWhsrFs6kj4b waQA2N7pE0B8gi8nMQv3jsRRzWI9DWE3cRLjW8oLiucA9VlgH191qn6SMrKZgJ7Mc8YX D+KGD8OAD3N45cey6rOSTS7Pi4XAvqQSguw2l0KUfX7ijTu/YZ8uumU7E5Lzw4NfFX70 Uu1w== X-Gm-Message-State: ALoCoQnQoDgdH3l2ELsn7d9+Ss2wgMd+EVJ4DALh7lEIt7SRiCOjpaLh2RUmE4d7chE9Z3MIulcU X-Received: by 10.42.83.201 with SMTP id i9mr1296037icl.110.1375938998922; Wed, 07 Aug 2013 22:16:38 -0700 (PDT) Received: from 53.imp.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPSA id io8sm5063623igb.7.2013.08.07.22.16.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 07 Aug 2013 22:16:38 -0700 (PDT) Sender: Warner Losh Subject: Re: [net] protecting interfaces from races between control and data ? Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Wed, 7 Aug 2013 23:16:36 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20130805082307.GA35162@onelab2.iet.unipi.it> <2034715395.855.1375714772487.JavaMail.root@daemoninthecloset.org> <51FFDD1E.1000206@FreeBSD.org> To: Adrian Chadd X-Mailer: Apple Mail (2.1085) Cc: current@freebsd.org, Bryan Venteicher , Navdeep Parhar , net@freebsd.org, Giuseppe Lettieri , Luigi Rizzo X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Aug 2013 07:01:26 -0000 On Aug 5, 2013, at 11:20 AM, Adrian Chadd wrote: > .. and I bet it's not a design pattern, and this is total conjecture = on my part: >=20 > * 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. >=20 > Almost every driver is this way Luigi. :-) Most of the drivers in the three don't support hardware that performs = well enough for this to be a problem. :) Any driver that's still around = from the pre-locking days can easily saturate the lines (or the = hardware) on today's (and even yesterday's hardware). All the rest have come up with different ways to cope... Warner