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

Michael Tuexen Michael.Tuexen at lurchi.franken.de
Mon Dec 16 21:04:21 UTC 2013


On Dec 16, 2013, at 9:15 PM, Adrian Chadd <adrian at freebsd.org> wrote:

> 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.
Correct. And I'm only interested in the "it wasn't queued/transmitted
and it definitely _won't_ make it on the wire." part.
So I would need something like

if_transmit() returns an error only if it wasn't queued/transmitted
and it definitely _won't_ make it on the wire.

Acceptable for you?

Best regards
Michael
> 
> 
> 
> -a
> 



More information about the freebsd-net mailing list