From owner-freebsd-net@FreeBSD.ORG Wed Mar 19 05:00:36 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 B9B4AED6; Wed, 19 Mar 2014 05:00:36 +0000 (UTC) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [188.134.15.200]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6C27DE80; Wed, 19 Mar 2014 05:00:36 +0000 (UTC) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 2CC9E7F4D4; Wed, 19 Mar 2014 09:00:32 +0400 (MSK) X-DKIM: Sendmail DKIM Filter v2.8.2 shelob.oktetlabs.ru 2CC9E7F4D4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1395205232; bh=KeidqrIDIyPqvY5pDucX6Fzmyz9NZXabhozdzrcYXqA=; l=835; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=OshDlL7a90aXhOGo0DqwMz3pe37GI3iydQ/vB1UGs2i8eEtIkcDo945sTQPPQk4WR /f1BlRAt2LLECPlt3PGKpSOJjaptaVa8eLHiTrIu8R2ANCK8UlH5N0PUJ4mVbVNtKn A9ymwbZWqp7xZm9lNbRjzZ1YXyP2Gtd9un7I+pfU= Message-ID: <53292470.801@oktetlabs.ru> Date: Wed, 19 Mar 2014 09:00:32 +0400 From: Andrew Rybchenko Organization: OKTET Labs User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: [PATCH 1/6] sfxge: fix mbuf leak if it does not fit in software queue References: <53280DB3.4080900@oktetlabs.ru> <20140318124624.GD1499@FreeBSD.org> In-Reply-To: <20140318124624.GD1499@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: Wed, 19 Mar 2014 05:00:36 -0000 Gleb, On 03/18/2014 04:46 PM, Gleb Smirnoff wrote: > Andrew, > > On Tue, Mar 18, 2014 at 01:11:15PM +0400, Andrew Rybchenko wrote: > A> > A> sfxge: fix mbuf leak if it does not fit in software queue > A> > A> mbuf should be owned by if_transmit function in any case. > A> > A> Submitted-by: Andrew Rybchenko > A> Sponsored by: Solarflare Communications, Inc. > > Can we simplify the function while here? One of the next patches (4/6) moves link down check to the function and uses "fail" label to increment early drops statistics and free mbuf. IMHO, it is really nice to have single place to do it. Thanks, Andrew. -- Andrew Rybchenko OKTET Labs, St.-Petersburg, Russia Web: www.oktetlabs.ru Office: +7 812 7832191 Fax: +7 812 7846591 Mobile: +7 921 7479683