From owner-freebsd-net@FreeBSD.ORG Thu Dec 5 22:37:13 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 EBF493B9; Thu, 5 Dec 2013 22:37:13 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A4117117D; Thu, 5 Dec 2013 22:37:13 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id rB5MbBfr074799 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 5 Dec 2013 14:37:12 -0800 (PST) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id rB5MbBH3074798; Thu, 5 Dec 2013 14:37:11 -0800 (PST) (envelope-from jmg) Date: Thu, 5 Dec 2013 14:37:11 -0800 From: John-Mark Gurney To: Adrian Chadd Subject: Re: A small fix for if_em.c, if_igb.c, if_ixgbe.c Message-ID: <20131205223711.GB55638@funkthat.com> Mail-Followup-To: Adrian Chadd , Michael Tuexen , Yong-Hyeon Pyun , Jack F Vogel , "freebsd-net@freebsd.org list" References: <521B9C2A-EECC-4412-9F68-2235320EF324@lurchi.franken.de> <20131202022338.GA3500@michelle.cdnetworks.com> <20131203021658.GC2981@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 X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Thu, 05 Dec 2013 14:37:12 -0800 (PST) Cc: Yong-Hyeon Pyun , Michael Tuexen , 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: Thu, 05 Dec 2013 22:37:14 -0000 Adrian Chadd wrote this message on Thu, Dec 05, 2013 at 14:01 -0800: > On 5 December 2013 13:05, Michael Tuexen > wrote: > > > Just to be clear: This would mean that xxx_transmit() would return > > an error even if the packet provided in the call xxx_transmit() is > > enqueued and not dropped? > > This would also be problem with the current SCTP stack. > > I think it'll return an error only if: > > * it queued the frame to the tail of the drbd; > * it then tried to transmit a frame from the head of the drbd; > * it failed to transmit the first frame in the drbd and it couldn't > put it back into the queue for whatever reason. > > So I think it should be "ok enough" for both TCP and SCTP. IMO it should only return an error if the specific frame failed to be sent or queued. If you cannot determine at return time if the frame failed to be transmitted/queued, then it should return success. In the above case, if there were other frames queued ahead, and the first one failed, then it sounds like the frame may eventually be sent and we will end up sending a duplicate frame. > Give it a go and let me know how it goes. > > It's an interesting architectural problem to completely solve. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."