From owner-freebsd-hackers Sun Dec 5 13:56:57 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by hub.freebsd.org (Postfix) with ESMTP id 386D715464 for ; Sun, 5 Dec 1999 13:56:53 -0800 (PST) (envelope-from kvandel@cs.duke.edu) Received: from wookie.vandelden.com (IDENT:root@s-kvandel.cs.duke.edu [152.3.134.91]) by duke.cs.duke.edu (8.9.1/8.9.1) with SMTP id QAA16850 for ; Sun, 5 Dec 1999 16:56:50 -0500 (EST) From: kvandel Reply-To: kvandel@cs.duke.edu Organization: Duke University To: freebsd-hackers@FreeBSD.ORG Date: Sun, 5 Dec 1999 16:37:38 -0600 X-Mailer: KMail [version 1.0.28] Content-Type: text/plain MIME-Version: 1.0 Message-Id: <99120516514304.01102@wookie.vandelden.com> Content-Transfer-Encoding: 8bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Question, I am a graduate student at Duke University. Currently, I am part of a team to build a terabit router using a cluster connected with Myrinet. One aspect of the project is to tune the devices & drivers to perform cooperatively... In a routing situation, the 1500B dma takes roughly 11us over PCI 32/33Mhz. If the processor (driver) is checking the command accept status of a NIC, it can take a "long" time to get a response from the NIC. For gigabit routing, you have to roughly processes 1pkt/ 8-10us . For starters, I changed up the driver code in fxp_start to break up a large dma transactions into smaller chunks,.. to make bus arbitration work using a finer grain time slice. Hence, the processor stalls less when it checks if a NIC command was accepted. The question: Why doesn't this work... it seem so straight forward... using netperf, the driver works when the message size is less than FXP_MAX_SEGMENT_SIZE, .. I am using FXP_MAX_SEGMENT_SIZE of 1024 ---------------------------------------------------------- fxp_start()........ /* * Go through each of the mbufs in the chain and initialize * the transmit buffer descriptors with the physical address * and size of the mbuf. */ tbdinit: for (m = mb_head, segment = 0; m != NULL; m = m->m_next) { if (m->m_len != 0) { unsigned int sub_segments, counter; uint8_t *mbuf_data_addr = mtod(m,uint8_t *); sub_segments = (m->m_len / FXP_MAX_SEGMENT_SIZE) + (((m->m_len % FXP_MAX_SEGMENT_SIZE) != 0)?1:0); if (segment + sub_segments >= FXP_NTXSEG) break; for(counter = 0;counter < sub_segments;counter++) { txp->tbd[segment].tb_addr = vtophys(mbuf_data_addr + (counter * FXP_MAX_SEGMENT_SIZE)); txp->tbd[segment].tb_size = (sub_segments == (counter+1))?(m->m_len % FXP_MAX_SEGMENT_SIZE):FXP_MAX_SEGMENT_SIZE; /* vtophys(mtod(m, vm_offset_t)) + (counter * FXP_MAX_SEGMENT_SIZE); */ segment++; } } } if (m != NULL) { ..... ------------------------------------------------------------------------------------------------- Unfortunately, I don't have the intel docs on the card, which requires a NDA... If you can help, it would be much appreciated. thanks, kurt -- Some output when it's running /*if(mb_head->m_pkthdr.len > FXP_MAX_SEGMENT_SIZE) printf("Pha %u, Kva %u, counter %u,segment %u, length %u, subs %u, tbs %u, mss %u\n", txp->tbd[segment].tb_addr, mbuf_data_addr + (counter * FXP_MAX_SEGMENT_SIZE), counter, segment, m->m_len, sub_segments, txp->tbd[segment].tb_size, FXP_MAX_SEGMENT_SIZE); */ Pha 39110690, Kva 3229624354, counter 0,segment 0, length 34, subs 1, tbs 34, mss 1024 Pha 129788744, Kva 3229076296, counter 0,segment 1, length 1208, subs 2, tbs 1024, mss 1024 Pha 129789768, Kva 3229077320, counter 1,segment 2, length 1208, subs 2, tbs 184, mss 1024 Pha 131485696, Kva 3229200384, counter 0,segment 3, length 272, subs 1, tbs 272, mss 1024 Pha 39637282, Kva 3229626658, counter 0,segment 0, length 34, subs 1, tbs 34, mss 1024 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message