Date: Sun, 5 Jan 2014 09:44:14 +0100 From: Michael Tuexen <Michael.Tuexen@lurchi.franken.de> To: Adrian Chadd <adrian@freebsd.org> Cc: Yong-Hyeon Pyun <pyunyh@gmail.com>, John Baldwin <jhb@freebsd.org>, FreeBSD Net <freebsd-net@freebsd.org>, John-Mark Gurney <jmg@funkthat.com>, Jack Vogel <jfvogel@gmail.com>, Jack F Vogel <jfv@freebsd.org> Subject: Re: A small fix for if_em.c, if_igb.c, if_ixgbe.c Message-ID: <B14A7230-8984-486A-8027-22CAB3BD0717@lurchi.franken.de> In-Reply-To: <CAJ-VmonFBMSKJ6fbZhWRWrBbY9wRtKYMGNpK5wLsPUEeh8eC7A@mail.gmail.com> 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> <CAJ-VmomHnQVP9s3EXuNOVwGaB-JiT_imAqzYT_U6PETvR6KMDw@mail.gmail.com> <FBA7A484-BFA6-4A9E-B910-5E8CA799DC45@lurchi.franken.de> <CAJ-VmokGnzscOuPRQ3wSom0mZ0MFBKRfiNJtHOu4Lw8sb7g3-A@mail.gmail.com> <CAJ-VmonFBMSKJ6fbZhWRWrBbY9wRtKYMGNpK5wLsPUEeh8eC7A@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Jan 4, 2014, at 11:45 PM, Adrian Chadd <adrian@freebsd.org> wrote: > hi, >=20 > Happy New Year all. >=20 > 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 >=20 > We can then flesh out the comments and API documentation about this = stuff. >=20 > Thanks! >=20 >=20 >=20 > -a >=20 >=20 > On 16 December 2013 19:25, Adrian Chadd <adrian@freebsd.org> wrote: >> On 16 December 2013 13:04, Michael Tuexen >> <Michael.Tuexen@lurchi.franken.de> wrote: >>> On Dec 16, 2013, at 9:15 PM, Adrian Chadd <adrian@freebsd.org> = wrote: >>>=20 >>>> On 16 December 2013 12:06, Michael Tuexen >>>> <Michael.Tuexen@lurchi.franken.de> wrote: >>>>=20 >>>>>> i agree. if_transmit() should return 0 only if: >>>>>>=20 >>>>>> * the driver queued it internally and intends to try transmitting = it later; >>>>>> * the driver directly dispatched the frame to the hardware. >>>>>>=20 >>>>>> If it failed to do either of the above, it should return an = error. >>>>>>=20 >>>>>> 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). >>>>=20 >>>> 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. >>>>=20 >>>> 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 >>>=20 >>> if_transmit() returns an error only if it wasn't queued/transmitted >>> and it definitely _won't_ make it on the wire. >>>=20 >>> Acceptable for you? >>=20 >> Sounds like the same thing to me, so yes. :) >>=20 >>=20 >>=20 >> -a >=20
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B14A7230-8984-486A-8027-22CAB3BD0717>