From owner-freebsd-net@FreeBSD.ORG Tue Feb 5 19:04:14 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7F0E5EBD; Tue, 5 Feb 2013 19:04:14 +0000 (UTC) (envelope-from rrs@lakerest.net) Received: from lakerest.net (lakerest.net [70.155.160.98]) by mx1.freebsd.org (Postfix) with ESMTP id 0D8AEB5; Tue, 5 Feb 2013 19:04:13 +0000 (UTC) Received: from [10.1.1.101] (bsd4.lakerest.net [70.155.160.102]) (authenticated bits=0) by lakerest.net (8.14.4/8.14.3) with ESMTP id r15J4T9T044212 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Tue, 5 Feb 2013 14:04:29 -0500 (EST) (envelope-from rrs@lakerest.net) Subject: Re: Driver patch to look at... Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset=windows-1252 From: Randall Stewart In-Reply-To: <201302051352.52741.jhb@freebsd.org> Date: Tue, 5 Feb 2013 14:04:12 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <990BD290-643B-4BC7-8D64-6D4CE987025A@lakerest.net> References: <201302051213.51401.jhb@freebsd.org> <0D421326-9A80-4E21-A18E-E717F5C02164@lakerest.net> <201302051352.52741.jhb@freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.1283) Cc: freebsd-net@freebsd.org, Robert Watson , Jack Vogel , Kip Macy 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: Tue, 05 Feb 2013 19:04:14 -0000 Hmm That would trade off a stack pointer + a compare vs always doing the move. Thats fine until I have to add the _mc() version, then the put back would be an atomic, and most of the time the return from this is probably not changed=85 I really would prefer not to since the compare and maybe store vs the always store.. though the same now, would be far more expensive in the _mc version.. if we do a _mc version of course ;-) But I am willing to do whatever .. since this really needs to be fixed. R On Feb 5, 2013, at 1:52 PM, John Baldwin wrote: > On Tuesday, February 05, 2013 12:44:01 pm Randall Stewart wrote: >> Actually, no it is used. >>=20 >> If you look in if_var.h int he drbr_putback() function, it does >> a buf_ring_swap when the old mbuf pointer does not equal the >> new mbuf pointer. This *does* happen, I crashed at least once >> yesterday when the igb driver did something to free the original >> mbuf and return a new mbuf with the data (prepend or some such). >>=20 >> I also have found several issues that I have fixed this morning.. its = been >> crash city on my test beds.. >>=20 >> Here is the latest patch with all fixes and suggested changes from = emaste=20 > (thanks Ed) >=20 > Actually, one more suggestion then (since you have to keep putback). = It > would be nice to not have to require 'snext' in all the callers. How > about replace buf_ring_swap() with a buf_ring_putback_sc() that = accepts the > mbuf and just stores it at the head unconditionally and have = drbr_putback() > use that? >=20 > --=20 > John Baldwin > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >=20 ------------------------------ Randall Stewart 803-317-4952 (cell)