Date: Fri, 6 Dec 2013 15:25:04 -0800 From: Adrian Chadd <adrian@freebsd.org> To: Michael Tuexen <Michael.Tuexen@lurchi.franken.de> Cc: Yong-Hyeon Pyun <pyunyh@gmail.com>, Jack F Vogel <jfv@freebsd.org>, John-Mark Gurney <jmg@funkthat.com>, "freebsd-net@freebsd.org list" <freebsd-net@freebsd.org> Subject: Re: A small fix for if_em.c, if_igb.c, if_ixgbe.c Message-ID: <CAJ-Vmomnu4VLE0Q8A%2BQS6%2B7LA7ry_kD9j05=TvNZeocRjsuE7A@mail.gmail.com> In-Reply-To: <609C63CD-9332-4EAE-AACE-5B911416DF80@lurchi.franken.de> References: <521B9C2A-EECC-4412-9F68-2235320EF324@lurchi.franken.de> <20131202022338.GA3500@michelle.cdnetworks.com> <B9593E83-E687-49E9-ABDC-B2DD615180E9@lurchi.franken.de> <20131203021658.GC2981@michelle.cdnetworks.com> <CAJ-Vmo=kfoPMYjZ0WAtqmoJMz1utXH50SW9N92RA83EMUzY7WA@mail.gmail.com> <B89B1E2D-BAF0-4815-B3AB-EB226F4F76DE@lurchi.franken.de> <CAJ-Vmo=4Zwv5V6ZYDuDLtt%2BowgbvmqyvrnrfnU%2BHeXQ3vAn-KA@mail.gmail.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>
next in thread | previous in thread | raw e-mail | index | archive | help
On 6 December 2013 13:10, Michael Tuexen <Michael.Tuexen@lurchi.franken.de> wrote: > Well, this is what happens: > The sender takes a packet from the send-queue, calls ip-output. Since > it returns an error, we don't move it to the sent-queue, but leave > it in the send queue (assuming it doesn't went on the wire). > However, the driver puts it on the wire, it makes it to the peer, > the peer sends SACK, and we receive the SACK. Since the packet is > not on the sent queue, we don't realize that it is acked. Receiving > a SACK is a trigger for sending a packet. So we take the next one > from the send-queue (the one from the beginning), and send it again. > So it is a wire speed ping pong... > So in case the lower layer tells us that there was a problem in > sending the packet, we > * don't consider it sent > * wait for the next normal protocol trigger for send another packet. > This sounds OK to me... > > That is why I need to know what an error from ip_output() means. > If I can't conclude that the provided packet was dropped, I can just > consider it sent and don't try to do any optimisation. We're heading down the right path. I'm increasingly believing that ignoring the return value is the correct thing to do. -adrian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmomnu4VLE0Q8A%2BQS6%2B7LA7ry_kD9j05=TvNZeocRjsuE7A>