From owner-freebsd-net@FreeBSD.ORG Tue Dec 3 02:17:06 2013 Return-Path: Delivered-To: freebsd-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 1DEF2D85; Tue, 3 Dec 2013 02:17:06 +0000 (UTC) Received: from mail-pd0-x22c.google.com (mail-pd0-x22c.google.com [IPv6:2607:f8b0:400e:c02::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DD2A91CFB; Tue, 3 Dec 2013 02:17:05 +0000 (UTC) Received: by mail-pd0-f172.google.com with SMTP id g10so19326517pdj.17 for ; Mon, 02 Dec 2013 18:17:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=Z5kB6anVb5378+2xiqTsMA3VoBzRAM9hfX/pJGPeccU=; b=VqgHLbR5y7BTGfFFiMMQ7hpw7rX/DwSWULmHzS2mCPtzm3ekusxrv4DobU/9aNSfA7 dPIKUZ1SuStkTN9OxyihvJj0uXwojJxX/xk567hdsH6Zqqt38xUJRk0u236F0cdOW3/r A6KJsEi1R4Bw7GWM8CphEp1S2KH0YWHAFQyDpxTs9kfkWGyNCyOXUYb4YQben/Ss4LjK dC9gBg+7sfZ0PiLwY2lexES7c0MverPr+wsoNYAS2zf+ug9HciYGAytD6gYdvvSXglxG Y5A7SxWR99Vg0woj52BUINSIA+JqkvKTTzKvTPtt5qRJp7OlLjp4JVWsrPGOQU9ykmA/ p4Zw== X-Received: by 10.68.170.225 with SMTP id ap1mr35390933pbc.117.1386037025514; Mon, 02 Dec 2013 18:17:05 -0800 (PST) Received: from pyunyh@gmail.com (lpe4.p59-icn.cdngp.net. [114.111.62.249]) by mx.google.com with ESMTPSA id gg10sm125876650pbc.46.2013.12.02.18.17.02 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 02 Dec 2013 18:17:04 -0800 (PST) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Tue, 03 Dec 2013 11:16:58 +0900 From: Yonghyeon PYUN Date: Tue, 3 Dec 2013 11:16:58 +0900 To: Michael Tuexen Subject: Re: A small fix for if_em.c, if_igb.c, if_ixgbe.c Message-ID: <20131203021658.GC2981@michelle.cdnetworks.com> References: <521B9C2A-EECC-4412-9F68-2235320EF324@lurchi.franken.de> <20131202022338.GA3500@michelle.cdnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: Jack F Vogel , "freebsd-net@freebsd.org list" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 02:17:06 -0000 On Mon, Dec 02, 2013 at 10:48:07PM +0100, Michael Tuexen wrote: > 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. I see. > > > >> > >> 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? > No. It seems the only return code buf-ring-aware drivers can return is ENOBUFS since queuing is done in the driver. > Best regards > Michael > > > >> > >> Jack: What do you think? Would you prefer to commit the fix if > >> you think it is acceptable? > >> > >> Best regards > >> Michael > > >