A small fix for if_em.c, if_igb.c, if_ixgbe.c
Adrian Chadd
adrian at freebsd.org
Sat Jan 4 22:45:54 UTC 2014
hi,
Happy New Year all.
If noone objects, I'm going to commit Michael's patch to -HEAD in the
next couple of days, with some extra comments explaining why things
are the way they are.
We can then flesh out the comments and API documentation about this stuff.
Thanks!
-a
On 16 December 2013 19:25, Adrian Chadd <adrian at freebsd.org> wrote:
> On 16 December 2013 13:04, Michael Tuexen
> <Michael.Tuexen at lurchi.franken.de> wrote:
>> 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?
>
> Sounds like the same thing to me, so yes. :)
>
>
>
> -a
More information about the freebsd-net
mailing list