Hamachi Tx interrupts, UDP performance

pmonta@halibut.imedia.com pmonta@halibut.imedia.com
Mon Jan 18 02:42:38 1999


I think I've found the problem with UDP---the interrupt bit in the Tx
descriptor chain wasn't set, so the driver never gets any Tx
interrupts.  TCP is able to survive, since the acks keep things going
via Rx, but not transmit-only UDP (or say pings to a multicast address).

With the enclosed patch to v0.07, ttcp says

test# ttcp -t -u -s -n 3000000 -l 4430 10.0.0.3
ttcp -t -u -s -n 3000000 -l 4430 10.0.0.3
ttcp-t: buflen=4430, nbuf=3000000, align=16384/0, port=5001  udp  -> 10.0.0.3
ttcp-t: socket
ttcp-t: 13290000000 bytes in 111.54 real seconds = 116355.25 KB/sec +++
ttcp-t: 3000006 I/O calls, msec/call = 0.04, calls/sec = 26895.71
ttcp-t: 2.4user 108.5sys 1:51real 99% 0i+0d 0maxrss 0+2pf 0+0csw

This comes to 953.2 Mbit/sec, probably coming up against the
32bit/33MHz PCI limit, though the CPU (PII/350) is also essentially
maxed out by the copy.  For 1472-byte UDP messages, performance
drops to 865 Mbit/sec, and for 512-byte messages it's down to
450 Mbit/sec.

The receiver is not keeping up---packet loss is more than 99%.
Netperf is apparently HPUX-specific for rate-regulated UDP
transmitting; is there a good general-purpose tool for this?

Cheers,
Peter Monta   pmonta@imedia.com
Imedia Corp.

ps: Donald, when you get a chance could you apply this against
    v0.07?  Pings show that interrupt coalescing obeys TxIntrCtrl
    even with every descriptor tagged with DescIntr, so DescIntr
    is apparently necessary but (fortunately) not sufficient for
    an interrupt.  Thanks.

--- hamachi.c.orig	Sun Jan 17 22:51:25 1999
+++ hamachi.c	Sun Jan 17 22:52:34 1999
@@ -826,9 +826,9 @@
 	hmp->tx_ring[entry].addr = virt_to_bus(skb->data);
 	hmp->tx_ring[entry].length = skb->len;
 	if (entry >= TX_RING_SIZE-1)		 /* Wrap ring */
-		hmp->tx_ring[entry].status = DescOwn|DescEndPacket|DescEndRing;
+		hmp->tx_ring[entry].status = DescOwn|DescEndPacket|DescEndRing|DescIntr;
 	else
-		hmp->tx_ring[entry].status = DescOwn|DescEndPacket;
+		hmp->tx_ring[entry].status = DescOwn|DescEndPacket|DescIntr;
 	hmp->cur_tx++;
 
 	/* Non-x86 Todo: explicitly flush cache lines here. */
 | To unsubscribe, send mail to Majordomo@cesdis.gsfc.nasa.gov, and within the
 |  body of the mail, include only the text:
 |   unsubscribe this-list-name youraddress@wherever.org
 | You will be unsubscribed as speedily as possible.