From owner-freebsd-net@FreeBSD.ORG Mon Dec 16 19:36:17 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 D6CA1E8A; Mon, 16 Dec 2013 19:36:17 +0000 (UTC) Received: from mail-qa0-x22c.google.com (mail-qa0-x22c.google.com [IPv6:2607:f8b0:400d:c00::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 701DF1254; Mon, 16 Dec 2013 19:36:17 +0000 (UTC) Received: by mail-qa0-f44.google.com with SMTP id i13so1856820qae.3 for ; Mon, 16 Dec 2013 11:36:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=mRaKouMkvKsXYTqoyj8k1CRI51SaerxJ/jYGfjVAYso=; b=MlnlOCA0+UT3t3fX9GrwKP58+wsUORi7ndkqnhFTAJK0VlavSiNAFo8tMgl2Xn9xxp Dpa4XpJXS7+xe8odw8VYBavsWKWT27njcCNU0cpxAh4PRQMrSic1z272eT1tmBk5le+K EH1aAxCXUVmKxoRDalF0vtmd75JxfKioZCbuI9/ewh20nWSVXVMdSeq6BSl3Z44KaLTb gGsf1kyollQ04hdZNSjJZEgSxGVUXKoUavV+0nNjRNM1WRKp2eWaliBqHTxMHwyjlXu9 GtfNhZ9OkHfvFc6JdDn/UchR/DfbHLGLR03c+hQzeOvPCbwn9WxovLmXHLBpfgGm0zt+ p8vQ== MIME-Version: 1.0 X-Received: by 10.224.50.195 with SMTP id a3mr35153412qag.25.1387222576570; Mon, 16 Dec 2013 11:36:16 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.224.53.200 with HTTP; Mon, 16 Dec 2013 11:36:16 -0800 (PST) In-Reply-To: <201312131717.10863.jhb@freebsd.org> References: <521B9C2A-EECC-4412-9F68-2235320EF324@lurchi.franken.de> <201312131326.28952.jhb@freebsd.org> <201312131717.10863.jhb@freebsd.org> Date: Mon, 16 Dec 2013 11:36:16 -0800 X-Google-Sender-Auth: Wh5mvbYl0NKsjfgseE3VOGbC3Yg Message-ID: Subject: Re: A small fix for if_em.c, if_igb.c, if_ixgbe.c From: Adrian Chadd To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Cc: Yong-Hyeon Pyun , FreeBSD Net , John-Mark Gurney , Jack F Vogel , Michael Tuexen 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, 16 Dec 2013 19:36:17 -0000 On 13 December 2013 14:17, John Baldwin wrote: >> Anyone using if_start() failing as "the frame i just queued failed to >> transmit" is broken and well, we should just replace it with >> if_transmit(). > > Hmm, I was a bit wrong. Driver if_start routines return void, so they > only failed if the IFQ filled up completely. In that case, I think it is > fine to move forward with what you want (only return an error for failures > involving the packet passed to if_transmit), but I don't think we should > hange if_transmit drivers to just always return 0. i agree. if_transmit() should return 0 only if: * the driver queued it internally and intends to try transmitting it later; * the driver directly dispatched the frame to the hardware. If it failed to do either of the above, it should return an error. How's that sound? -a