Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Dec 2013 12:15:41 -0800
From:      Adrian Chadd <adrian@freebsd.org>
To:        Michael Tuexen <Michael.Tuexen@lurchi.franken.de>
Cc:        Yong-Hyeon Pyun <pyunyh@gmail.com>, FreeBSD Net <freebsd-net@freebsd.org>, John-Mark Gurney <jmg@funkthat.com>, Jack F Vogel <jfv@freebsd.org>, John Baldwin <jhb@freebsd.org>
Subject:   Re: A small fix for if_em.c, if_igb.c, if_ixgbe.c
Message-ID:  <CAJ-VmomHnQVP9s3EXuNOVwGaB-JiT_imAqzYT_U6PETvR6KMDw@mail.gmail.com>
In-Reply-To: <0BC9D25E-639A-4305-A51A-222AE645152C@lurchi.franken.de>
References:  <521B9C2A-EECC-4412-9F68-2235320EF324@lurchi.franken.de> <201312131326.28952.jhb@freebsd.org> <CAJ-VmokoujrNBO21oOdTuzncamS%2BtAjCUKjt4ywJaySL2rAo6g@mail.gmail.com> <201312131717.10863.jhb@freebsd.org> <CAJ-VmomXPiWbYztWxTDSRJkPcee%2B3pQmUHHk=2U3HG72bcKoyw@mail.gmail.com> <0BC9D25E-639A-4305-A51A-222AE645152C@lurchi.franken.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On 16 December 2013 12:06, Michael Tuexen
<Michael.Tuexen@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmomHnQVP9s3EXuNOVwGaB-JiT_imAqzYT_U6PETvR6KMDw>