From owner-freebsd-net@FreeBSD.ORG Fri Dec 6 20:20:13 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 BC69E988; Fri, 6 Dec 2013 20:20: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 8FB451D6E; Fri, 6 Dec 2013 20:20: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 rB6KKCLE092298 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 6 Dec 2013 12:20: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 rB6KKC3Z092297; Fri, 6 Dec 2013 12:20:12 -0800 (PST) (envelope-from jmg) Date: Fri, 6 Dec 2013 12:20:12 -0800 From: John-Mark Gurney To: Michael Tuexen Subject: Re: A small fix for if_em.c, if_igb.c, if_ixgbe.c Message-ID: <20131206202012.GG55638@funkthat.com> Mail-Followup-To: Michael Tuexen , Yong-Hyeon Pyun , Jack F Vogel , Adrian Chadd , "freebsd-net@freebsd.org list" 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3576B69E-E943-46E0-83E5-0B2194A44ED0@lurchi.franken.de> 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]); Fri, 06 Dec 2013 12:20:13 -0800 (PST) Cc: Yong-Hyeon Pyun , Jack F Vogel , Adrian Chadd , "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: Fri, 06 Dec 2013 20:20:13 -0000 Michael Tuexen wrote this message on Fri, Dec 06, 2013 at 21:17 +0100: > On Dec 5, 2013, at 11:37 PM, John-Mark Gurney wrote: > > > 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. > Yes, this is exactly what I think too. This is what my first patch > realizes. > > > > 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. > Correct. SCTP will consider the frame even unsent... So the SCTP stack > behaves strange and sends a packet at wirespeed over and over again (which > is not good...). Sounds like a bug in SCTP, if it gets an error like that, it needs to back off a bit.. Though when to wake up, etc, is harder to decide... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."