Date: Mon, 16 Dec 2013 21:06:46 +0100 From: Michael Tuexen <Michael.Tuexen@lurchi.franken.de> To: Adrian Chadd <adrian@freebsd.org> Cc: Yong-Hyeon Pyun <pyunyh@gmail.com>, FreeBSD Net <freebsd-net@freebsd.org>, John-Mark Gurney <jmg@funkthat.com>, Jack F Vogel <jfv@freebsd.org>, John Baldwin <jhb@freebsd.org> Subject: Re: A small fix for if_em.c, if_igb.c, if_ixgbe.c Message-ID: <0BC9D25E-639A-4305-A51A-222AE645152C@lurchi.franken.de> In-Reply-To: <CAJ-VmomXPiWbYztWxTDSRJkPcee%2B3pQmUHHk=2U3HG72bcKoyw@mail.gmail.com> References: <521B9C2A-EECC-4412-9F68-2235320EF324@lurchi.franken.de> <201312131326.28952.jhb@freebsd.org> <CAJ-VmokoujrNBO21oOdTuzncamS%2BtAjCUKjt4ywJaySL2rAo6g@mail.gmail.com> <201312131717.10863.jhb@freebsd.org> <CAJ-VmomXPiWbYztWxTDSRJkPcee%2B3pQmUHHk=2U3HG72bcKoyw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Dec 16, 2013, at 8:36 PM, Adrian Chadd <adrian@freebsd.org> wrote: > On 13 December 2013 14:17, John Baldwin <jhb@freebsd.org> 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? That sounds good. However, The transport layer is interested in the case where if_transmit() returns a non-zero value. Does your statement imply: if_transmit() returns a non-zero value only if the packet will not make it on the wire (for example, it failed to queue it). Best regards Michael > > > -a >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0BC9D25E-639A-4305-A51A-222AE645152C>