From owner-freebsd-questions Tue Aug 19 11:36:03 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id LAA25829 for questions-outgoing; Tue, 19 Aug 1997 11:36:03 -0700 (PDT) Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id LAA25787 for ; Tue, 19 Aug 1997 11:36:00 -0700 (PDT) Received: (from daemon@localhost) by alpo.whistle.com (8.8.5/8.8.5) id LAA27307; Tue, 19 Aug 1997 11:34:32 -0700 (PDT) Received: from current1.whistle.com(207.76.205.22) via SMTP by alpo.whistle.com, id smtpd027304; Tue Aug 19 18:34:23 1997 Message-ID: <33F9E66D.64880EEB@whistle.com> Date: Tue, 19 Aug 1997 11:31:09 -0700 From: Julian Elischer Organization: Whistle Communications X-Mailer: Mozilla 3.0Gold (X11; I; FreeBSD 2.2-CURRENT i386) MIME-Version: 1.0 To: ETX-B-SL Martti Kuparinen CC: freebsd-questions@FreeBSD.ORG Subject: Re: poll() for ethernet devices References: <199708191456.QAA12485@kk662.kk.etx.ericsson.se> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk ETX-B-SL Martti Kuparinen wrote: > > Hello all, > > I am running FreeBSD 2.2.2 on a PPro 200 MHz PC. I have created a > loadable kernel module which will schedule IP-packets on user-defineable > interfaces and priorities. But it doesn't work correctly now :-( > > What I want to do in the general ether_output() is basically this: > > prioritize packets incoming or outgoing? > check if there's more packets to read <-----------+ read from where > if yes | > read the next packet and insert into queue | usually you start output on the first packet and on subsequent ones only if output has stopped. > else | > start output | > | > How can I check if there are packets to read in some/all interfaces and do you mean incoming packets? ether_output is called directly by th euser code or by ip_output in the case of routing, so there are no more output packets waiting.. I'm not sure what you mean.... > force the kernel to perform the read (and eventually write, which > calls ether_output)? I'm confused. can you try explaining more about what you are trying to achieve? > > Thanks in advance, > > Martti