Date: Fri, 29 Nov 2013 15:06:07 +0100 From: Michael Tuexen <Michael.Tuexen@lurchi.franken.de> To: Julian Elischer <julian@freebsd.org> Cc: "freebsd-net@freebsd.org list" <freebsd-net@freebsd.org>, Adrian Chadd <adrian@freebsd.org> Subject: Re: ip_output()/if_output() behaviour Message-ID: <8C291076-5F03-4406-B689-A3185E6DD313@lurchi.franken.de> In-Reply-To: <52987E27.10503@freebsd.org> References: <BF7B04F7-0D45-4708-99A8-8BE030109CEC@lurchi.franken.de> <CAJ-Vmo=Jsf=7uXxwJ=Md5KLFpvSYAcaaNrq%2BbHsw75nfSG_ZaQ@mail.gmail.com> <B7E3AA58-172A-4D20-B625-95C4712D46E7@lurchi.franken.de> <52987E27.10503@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Nov 29, 2013, at 12:44 PM, Julian Elischer <julian@freebsd.org> = wrote: > On 11/29/13, 5:42 PM, Michael Tuexen wrote: >> On Nov 29, 2013, at 3:54 AM, Adrian Chadd <adrian@freebsd.org> wrote: >>=20 >>> On 28 November 2013 12:35, Michael Tuexen >>> <Michael.Tuexen@lurchi.franken.de> wrote: >>>> Dear all, >>>>=20 >>>> I'm investigating a problem and need to understand the behaviour >>>> of ip_output(). Is it correct that if ip_output() returns an >>>> non-zero error, the corresponding packet was never sent? >>>> In the SCTP stack we assume this, but it seems that at least >>>> the em and the igb driver might return an error from >>>> igb_mq_start_locked(), for example, but have accepted the packet. >>> Which error(s) ? >> ENOBUFS, but does it matter? What is the correct reaction to >> ip_output() returning an error? The SCTP stack assumes that the >> packet was not put on the wire. With the current version of the >> igb driver we are wrong. igb_mq_start() might return an error, >> even if the packets was enqueued successfully (in case >> igb_mq_start_locked() fails). >>=20 >> But the SCTP stacks assumes in general that if ip_output() returns >> an error, the packet didn't make it out. > =46rom my memory it's always been the case that you really have little > idea if the packet makes it out onto the wire or not. > In the past it's been the case that an error indicates that it = probably DIDN'T make it out, but > the converse is not true.. NO error is not an indication of success. > I'm surprised that you could get an error when it was broadcast = however.. that is counter > to the last 30 years of behaviour. ifnet(9) says: if_transmit() Transmit a packet on an interface or queue it if the = interface is in use. This function will return ENOBUFS if the devices = software and hardware queues are both full. ... So I guess returning ENOBUFS when the packet was queued is wrong... Any comments? Best regards Michael >=20 >=20 >>=20 >> Best regards >> Michael >>>> Before digging further, I would like to know what the intended >>>> behaviour of ip_output() is. >>>=20 >>> -adrian >>>=20 >> _______________________________________________ >> freebsd-net@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-net >> To unsubscribe, send any mail to = "freebsd-net-unsubscribe@freebsd.org" >>=20 >>=20 >=20 >=20
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8C291076-5F03-4406-B689-A3185E6DD313>