From owner-freebsd-net@FreeBSD.ORG Mon Dec 9 03:44:25 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 2B8DEE3F; Mon, 9 Dec 2013 03:44:25 +0000 (UTC) Received: from mail-qe0-x22f.google.com (mail-qe0-x22f.google.com [IPv6:2607:f8b0:400d:c02::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C263B1E5F; Mon, 9 Dec 2013 03:44:24 +0000 (UTC) Received: by mail-qe0-f47.google.com with SMTP id t7so2457772qeb.34 for ; Sun, 08 Dec 2013 19:44:23 -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=GgUWVoAjqDWJ38HLvQ4PU6sRg+ZF63+eyHFEjo+FSKU=; b=qHEvuOJJLk2G0HGRT/pT4tPFWkx+f66EErPgAPAiKB53AwtjcTXezrW/H2u4EQG1cf 1+r04E4+OhycndNodXeaUne0Gr+sGyEcHsRzZlizqPVrX28arl1LtlaVwsoPPnwO+VMz g8yIWQrQqGMnrPQLAOyUqvngG2hnjlwTOzM4scETrDxR+v6feIlAiW8z0OQhnm5KtobT FAEcXvZ24HT6XNV3ik15jDDBLQQ/93sODO6lgvDYoGyZS7DbGAq//v07UCaz3hfVJwYi Tgsy1t38XPbecyBPXcwMwn3mnTrCvReyrQ/WgfFJbgUE4hcxMNTM7mCb3kfpySN/UoWl quDQ== MIME-Version: 1.0 X-Received: by 10.224.80.129 with SMTP id t1mr141216996qak.95.1386560663937; Sun, 08 Dec 2013 19:44:23 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.224.53.200 with HTTP; Sun, 8 Dec 2013 19:44:23 -0800 (PST) In-Reply-To: <9E163DC1-D647-4E19-BE23-44E5DFE2F284@lurchi.franken.de> References: <521B9C2A-EECC-4412-9F68-2235320EF324@lurchi.franken.de> <20131202022338.GA3500@michelle.cdnetworks.com> <20131203021658.GC2981@michelle.cdnetworks.com> <20131205223711.GB55638@funkthat.com> <3576B69E-E943-46E0-83E5-0B2194A44ED0@lurchi.franken.de> <20131206202012.GG55638@funkthat.com> <609C63CD-9332-4EAE-AACE-5B911416DF80@lurchi.franken.de> <9E163DC1-D647-4E19-BE23-44E5DFE2F284@lurchi.franken.de> Date: Sun, 8 Dec 2013 19:44:23 -0800 X-Google-Sender-Auth: IJCE4ZN7JU-ht7Xo4K0ghgkhf_w Message-ID: Subject: Re: A small fix for if_em.c, if_igb.c, if_ixgbe.c From: Adrian Chadd To: Michael Tuexen Content-Type: text/plain; charset=ISO-8859-1 Cc: Yong-Hyeon Pyun , Jack F Vogel , John-Mark Gurney , "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, 09 Dec 2013 03:44:25 -0000 .. I'm saying that we should have if_transmit( )return an error only on the current packet, and 0 if it was queued. We don't have a mechanism to say that a queued packet actually made it onto the wire. Whether we should is a different discussion. Ie, after thinking about this some more, I'd like to: * change if_transmit in these drivers to do exactly what you suggest - it should return an error only if the given packet couldn't be queued. It shouldn't matter whether it is later transmitted or not - we don't have a feedback mechanism for that. * figure out a very specific definition of what xxx_mq_start_locked() should return - my gut feeling is an error if it couldn't queue a frame, and 0 if it dispatched a frame to the hardware - and then make the code match this definition. -adrian