From owner-freebsd-net@FreeBSD.ORG Sat Mar 22 18:29:05 2014 Return-Path: Delivered-To: net@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 ESMTPS id E63E8C2A for ; Sat, 22 Mar 2014 18:29:05 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5BCBB9AE for ; Sat, 22 Mar 2014 18:29:04 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.8/8.14.8) with ESMTP id s2MISrv9032640 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 22 Mar 2014 22:28:53 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.8/8.14.8/Submit) id s2MISr7l032639; Sat, 22 Mar 2014 22:28:53 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sat, 22 Mar 2014 22:28:53 +0400 From: Gleb Smirnoff To: Andrew Rybchenko Subject: Re: [PATCH 2/6] sfxge: limit software Tx queue size Message-ID: <20140322182852.GW1499@glebius.int.ru> References: <532817F5.8010505@oktetlabs.ru> <20140318132440.GG1499@FreeBSD.org> <532D62F8.4080103@oktetlabs.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <532D62F8.4080103@oktetlabs.ru> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: net@FreeBSD.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2014 18:29:06 -0000 Andrew, On Sat, Mar 22, 2014 at 02:16:24PM +0400, Andrew Rybchenko wrote: A> > The interaction between sfxge_tx_qdpl_put() and sfxge_tx_packet_add() A> > is quite complex and I couldn't resist from suggesting you to A> > simplify the code. A> > A> > Can you please look into attached patch? A> > A> > - Inline sfxge_tx_qdpl_put() into sfxge_tx_packet_add(). A> > - Simplify the 'locked' logic. A> > - Add your PATCH 1/6, the mbuf leak fix. A> > - Add your PATCH 2/6, the SFXGE_TX_DPL_GET_PKT_LIMIT_DEFAULT check. A> I don't like "locked" flag passed to qdpl_put() function as well. A> However, I prefer to keep patches granular and avoid mixing of different A> changes in single patch. If the initial patch is OK, please, submit it A> to repository. Then, I'll rebase your patch, discuss it locally and come A> back to you. As you wish. Committed, thanks. A> BTW, I see that many drivers use drbr for software Tx queue. What do you A> think, would it be beneficial to use it instead of the list implemented A> here? No idea. drbr(9) is definitely better than ifqueue(9), that's all I can confident state. No idea how drbr(4) compares to the hand made queue of sxfge(4). You've got the hardware, you measure :) Btw, there are some opinions that with modern cards any software queing is a bad idea. Driver should simply hold as much as hardware tx ring can hold. There is no yet stable decision about this, just thoughts floating around. -- Totus tuus, Glebius.