From owner-freebsd-net@FreeBSD.ORG Mon Dec 2 21:48:08 2013 Return-Path: Delivered-To: freebsd-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 ESMTPS id 6DB00D8A; Mon, 2 Dec 2013 21:48:08 +0000 (UTC) Received: from mail-n.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2CA481AFD; Mon, 2 Dec 2013 21:48:08 +0000 (UTC) Received: from [192.168.1.102] (p508F2CD2.dip0.t-ipconnect.de [80.143.44.210]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTP id 4729E1C0C0693; Mon, 2 Dec 2013 22:48:06 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Subject: Re: A small fix for if_em.c, if_igb.c, if_ixgbe.c From: Michael Tuexen In-Reply-To: <20131202022338.GA3500@michelle.cdnetworks.com> Date: Mon, 2 Dec 2013 22:48:07 +0100 Content-Transfer-Encoding: 7bit Message-Id: References: <521B9C2A-EECC-4412-9F68-2235320EF324@lurchi.franken.de> <20131202022338.GA3500@michelle.cdnetworks.com> To: pyunyh@gmail.com X-Mailer: Apple Mail (2.1510) Cc: Jack F Vogel , "freebsd-net@freebsd.org list" 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: Mon, 02 Dec 2013 21:48:08 -0000 On Dec 2, 2013, at 3:23 AM, Yonghyeon PYUN wrote: > On Fri, Nov 29, 2013 at 06:24:12PM +0100, Michael Tuexen wrote: >> Dear all, >> >> ifnet(9) says regarding if_transmit(): >> >> Transmit a packet on an interface or queue it if the interface is >> in use. This function will return ENOBUFS if the devices software >> and hardware queues are both full. >> >> The drivers for em, igb and ixgbe might also return an error even >> in the case the packet was enqueued. The attached patches fix this >> issue. > > How do you know the packet is successfully enqueued but driver > returns an error? Do non-buf-ring-aware drivers also show the same When debugging the issue, I saw the packet on the wire but the if_transmit() returning ENOBUFS. > behavior? I don't know. I saw this issue with the igb driver. > >> >> Any comments? > > I'm afraid the patch you posted ignores any errors(i.e. > m_defrag(9), bus_dma(9) etc) happened during TX processing. Correct. I want to make sure that if ENOBUFS is returned, the packet hasn't made it on the wire. The other errors can occur for the packet provided to if_transmit() or due to packet processing of other packets. Am I missing something? Best regards Michael > >> >> Jack: What do you think? Would you prefer to commit the fix if >> you think it is acceptable? >> >> Best regards >> Michael >