Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Dec 2013 11:36:16 -0800
From:      Adrian Chadd <adrian@freebsd.org>
To:        John Baldwin <jhb@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>, Michael Tuexen <Michael.Tuexen@lurchi.franken.de>
Subject:   Re: A small fix for if_em.c, if_igb.c, if_ixgbe.c
Message-ID:  <CAJ-VmomXPiWbYztWxTDSRJkPcee%2B3pQmUHHk=2U3HG72bcKoyw@mail.gmail.com>
In-Reply-To: <201312131717.10863.jhb@freebsd.org>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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?


-a



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmomXPiWbYztWxTDSRJkPcee%2B3pQmUHHk=2U3HG72bcKoyw>