From owner-freebsd-net@FreeBSD.ORG Mon Oct 15 20:48:35 2012 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AE5D6F29; Mon, 15 Oct 2012 20:48:35 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 3ACF38FC08; Mon, 15 Oct 2012 20:48:34 +0000 (UTC) Received: by mail-vc0-f182.google.com with SMTP id fw7so8162445vcb.13 for ; Mon, 15 Oct 2012 13:48:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=9vwLYR0bQ5U/NIC0hJlBagJoyCUEI16v7Zr36M4Sugk=; b=No1NjvzBl1SSS9FhzOz9Ad3Ce0hr8ff9bN6LjgsWns9+NWylt3/j/2w48GH3ukwMNA n5GRYDsVeTkEQRKup1qhoPQItKjYTcFTq17qG88Hxy/GQil/HUNfrdB5MN3vkBW4vMVy rliXgPoT5fgGkKjXlWRHOi5225mcULdLKH/Na+udYLlv+maa1Sm7z1BnfUsEtJRltMof 8f9wK0nVciDqTkRu+MVbgJmq7BxAT8RDQx3nDVx1l3bPmFFIjEABjrb/3RjJhRpiYq+s X4VwZ4nKF2ZeDSBhx34I9G9+tleaatGXPo2lvn7nIXpLIVWVHS4FV9qjiKKOYOtoZkEv yAHQ== MIME-Version: 1.0 Received: by 10.52.155.199 with SMTP id vy7mr6121885vdb.54.1350334114196; Mon, 15 Oct 2012 13:48:34 -0700 (PDT) Received: by 10.58.207.114 with HTTP; Mon, 15 Oct 2012 13:48:34 -0700 (PDT) In-Reply-To: <20121015162926.GV89655@FreeBSD.org> References: <5079A9A1.4070403@FreeBSD.org> <20121015162926.GV89655@FreeBSD.org> Date: Mon, 15 Oct 2012 16:48:34 -0400 Message-ID: Subject: Re: ixgbe & if_igb RX ring locking From: Ryan Stone To: Gleb Smirnoff Content-Type: text/plain; charset=ISO-8859-1 Cc: "Alexander V. Chernikov" , Jack Vogel , net@freebsd.org 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: Mon, 15 Oct 2012 20:48:35 -0000 On Mon, Oct 15, 2012 at 12:29 PM, Gleb Smirnoff wrote: > To me this unlock/lock looks like a legacy from times, when the driver > had a single mutex for both TX and RX parts. > > And removing this re-locking in foo_rxeof() was one of the aims for separate > TX/RX locking. > > Really, lurking through history shows that once driver had split its locking > to separate RX and TX part, these unlock/lock was removed. However, later > this unlock/lock was added back: > > http://svnweb.freebsd.org/base/head/sys/dev/e1000/if_igb.c?revision=209068&view=markup > > , without any comments for the reason it is added back. There's a convoluted LOR if you call into the stack with the RX lock held which is described here: http://lists.freebsd.org/pipermail/freebsd-net/2012-September/033371.html