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

Adrian Chadd adrian at freebsd.org
Mon Dec 16 20:15:42 UTC 2013


On 16 December 2013 12:06, Michael Tuexen
<Michael.Tuexen at lurchi.franken.de> wrote:

>> 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).

If there's a queuing layer in the middle then we can't know that for
certain. If the driver can't transmit the frame (eg it fails because
of collisions, for example) then again, we can't know that for
certain.

What we can only know is that it was either queued and may or may not
make it on the wire, or it wasn't queued/transmitted and it definitely
_won't_ make it on the wire.



-a


More information about the freebsd-net mailing list