Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Oct 2001 07:48:45 -0700
From:      Luigi Rizzo <rizzo@aciri.org>
To:        Soren Kristensen <soren@soekris.com>
Cc:        net@FreeBSD.ORG
Subject:   Re: NEW CODE: polling support for device drivers.
Message-ID:  <20011027074845.D77729@iguana.aciri.org>
In-Reply-To: <3BDA73C0.73DBCAE9@soekris.com>
References:  <20011027005905.A72758@iguana.aciri.org> <3BDA73C0.73DBCAE9@soekris.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Oct 27, 2001 at 01:43:44AM -0700, Soren Kristensen wrote:
> Luigi and all,
> 
> That looks very interesting to me.... I would like to follow up with a
> question, just because of my interest in getting maximum packet
> forwarding performance out of FreeBSD....
> 
> As I see it, the advantage of the polling code is to avoid interrupts
> and context switches.

There is in fat more than that.
I will post later another (longish) message to explain things in
more detail.

> Is it possible to implement all the basic packet forwarding to run to
> completion at interrupt, ie, when a packet comes in, the interrupt code
> would run until the packet has been sent out on another interface, and
> then loop back to see if there's more incomming packets, in a polling
> fashion.

This seems to be a common question :)

If you have fastforwarding enabled (sysctl net.inet.ip.fastforwarding=1)
this is actually how network drivers already work now -- they loop
around the interrupt status register, and each incoming packet is
processed up to the call to XX_start() on the output interface.

Without fastforwarding, processing stops much earlier, i.e.
when the packet is queued into the ipintrq, and then a software
interrupt is scheduled to process ip_input().

	cheers
	luigi
----------------------------------+-----------------------------------------
 Luigi RIZZO, luigi@iet.unipi.it  . ACIRI/ICSI (on leave from Univ. di Pisa)
 http://www.iet.unipi.it/~luigi/  . 1947 Center St, Berkeley CA 94704
 Phone: (510) 666 2927
----------------------------------+-----------------------------------------

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




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