Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Jul 1999 04:11:46 +0900
From:      Kenjiro Cho <kjc@csl.sony.co.jp>
To:        Mike Smith <mike@smith.net.au>
Cc:        cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org
Subject:   Re: cvs commit: src/release/sysinstall tcpip.c 
Message-ID:  <199907231911.EAA24974@hotaka.csl.sony.co.jp>
In-Reply-To: Your message of "Fri, 23 Jul 1999 10:22:54 MST." <199907231722.KAA03340@dingo.cdrom.com> 

next in thread | previous in thread | raw e-mail | index | archive | help

Mike Smith <mike@smith.net.au> said:
  > If we are going to change the network driver API, I want to push it
  > further.  (I briefly touched this point at USENIX.)
  > - queueing should be taken out of drivers

>> I don't like this one very much; it's one place where we would lose a 
>> great amount of efficiency.

I'm not sure if it is a great amount or not, but there would be
several different levels to clean up the queueing interface. 
For example, we can clean up the interface while maintaining the
current structure.  At least, I want to eliminate direct refenrences
to "ifp->if_snd.ifq_head".

[snip]

  > if_start(ifp)
  > {
  >	IF_DEQUEUE(&ifp->if_snd, m);
  >	if (m == NULL)
  >		return;
  >	process_bpf;
  > 
  >	/* call driver's start routine that sends out one packet */
  >	(*ifp->if_start)(ifp, m);
  > }

>> This last fragment is unacceptable though; it's one of the massive 
>> inefficiencies in the Linux architecture and I don't think you'll ever 
>> sell a proposal that requires CPU intervention between each and 
>> every packet.  By all means implement a per-interface flag that limits 
>> the number of datagrams that can be in the interface's private send 
>> queue at once (I think we already have one of those, actually) so that 
>> you can adjust the latency involved.

Again, it is just a skelton for discussion and I'm not sure about the
performance impact.  If DMA chaining is a big win, we can do something 
like:

if_start(ifp)
{
	while (1) {
		IF_DEQUEUE(&ifp->if_snd, m);
		if (m == NULL)
			break;
		process_bpf;
 
		/* setup driver's DMA for this packet */
		if ((*ifp->if_txsetup)(ifp, m) < 0)
			/* the driver couldn't set it up */
			break;
	}
	if (have_packets_to_send)
		(*ifp->if_txstart)(ifp);  /* kick DMA */
}

-Kenjiro


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




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