A small fix for if_em.c, if_igb.c, if_ixgbe.c

Adrian Chadd adrian at freebsd.org
Mon Dec 16 19:36:17 UTC 2013


On 13 December 2013 14:17, John Baldwin <jhb at 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


More information about the freebsd-net mailing list