A small fix for if_em.c, if_igb.c, if_ixgbe.c
Michael Tuexen
Michael.Tuexen at lurchi.franken.de
Mon Dec 16 20:06:50 UTC 2013
On Dec 16, 2013, at 8:36 PM, Adrian Chadd <adrian at freebsd.org> wrote:
> 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?
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
>
More information about the freebsd-net
mailing list