ip_output()/if_output() behaviour

Michael Tuexen Michael.Tuexen at lurchi.franken.de
Fri Nov 29 09:42:42 UTC 2013


On Nov 29, 2013, at 3:54 AM, Adrian Chadd <adrian at freebsd.org> wrote:

> On 28 November 2013 12:35, Michael Tuexen
> <Michael.Tuexen at lurchi.franken.de> wrote:
>> Dear all,
>> 
>> 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).

But the SCTP stacks assumes in general that if ip_output() returns
an error, the packet didn't make it out.

Best regards
Michael
> 
>> Before digging further, I would like to know what the intended
>> behaviour of ip_output() is.
> 
> 
> -adrian
> 



More information about the freebsd-net mailing list