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, [EMAIL PROTECTED]  . 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 [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message

Reply via email to