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

Michael Tuexen Michael.Tuexen at lurchi.franken.de
Sun Jan 5 08:44:19 UTC 2014


On Jan 4, 2014, at 11:45 PM, Adrian Chadd <adrian at freebsd.org> wrote:

> 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.
Hi Adrian,

just use the last version of the patch, the one from December 6th...

Best regards
Michael
> 
> 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