Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Nov 2004 15:07:06 +0000
From:      Peter Edwards <peadar.edwards@gmail.com>
To:        "Bjoern A. Zeeb" <bzeeb+freebsd+sk4@zabbadoz.net>, rwatson@freebsd.org
Cc:        current@freebsd.org
Subject:   if_sk and IFF_OACTIVE in general.
Message-ID:  <34cb7c8404110407071cbf3378@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
(Sorry for starting yet another if_sk thread, but this is a more
general issue with mpsafenet networking)

I have a general problem with the IF_OACTIVE flag handling that I
think might be related to some of the MP issues with if_sk.

ether_output_frame() queues an mbuf to the interface via
IFQ_HANDOFF->IFQ_HANDOFF_ADJ (in net/if_var.h)

This calls IF_ENQUEUE to actually queue the mbuf onto the if_snd
queue, and then calls "if_start()" if the interface is not IFF_OACTIVE.

I think the setting/clearing of the IFF_OACTIVE should probably be
protected: What's to stop the driver interrupt clearing this flag
between the test in IFQ_HANDOFF_ADJ and the call to if_start(),
leading to mbufs getting queued to the interface, but the interface
remaining idle.

Similar things can happen on a txeof interrupt: it probably needs to
protect the clearing of IFF_OACTIVE, and invoke the driver's start
routine if something gets queued to the driver when it isn't looking.



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