From owner-freebsd-atm Tue Nov 21 13: 4:59 2000 Delivered-To: freebsd-atm@freebsd.org Received: from mail.matriplex.com (ns1.matriplex.com [208.131.42.8]) by hub.freebsd.org (Postfix) with ESMTP id 5C67337B4D7 for ; Tue, 21 Nov 2000 13:04:56 -0800 (PST) Received: from mail.matriplex.com (mail.matriplex.com [208.131.42.9]) by mail.matriplex.com (8.9.2/8.9.2) with ESMTP id NAA57518; Tue, 21 Nov 2000 13:04:45 -0800 (PST) (envelope-from rh@matriplex.com) Date: Tue, 21 Nov 2000 13:04:45 -0800 (PST) From: Richard Hodges To: Adam Obszynski Cc: freebsd-atm@FreeBSD.ORG Subject: Fixed (?): FORE PCA-200e (oc3 and UTP) In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-atm@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Tue, 21 Nov 2000, Richard Hodges wrote: > On Tue, 21 Nov 2000, Adam Obszynski wrote: > > > I spend next day testing ATM on hfa driver on FreeBSD 4.x tree. > > Trying a firmware form OS2 drivers and firmware from WinNT zip files. > > > > I'm sure that i do all what is needed to run ATM on FreeBSD. It don't work > > for me. > > > > So i'm again do simple thing > > > > change in fore.h line: > > > > #define BUF1_SM_DOFF ((BUF1_SM_HOFF + SIZEOF_Buf_handle) - BUF1_SM_HDR) > > > > to: > > > > #define BUF1_SM_DOFF 16 > > > > it work... for a while.... until kernel.. panic 8-) [snip earlier message] It looks like my guess was correct, and the Fore PCA200 driver was leaving crud in the mbuf m_pkthdr structure when sending the PDU to the HARP layer. On my test machine (a P100), I could not even ping another host without getting massive loss: --- 192.168.100.18 ping statistics --- 11 packets transmitted, 8 packets received, 27% packet loss round-trip min/avg/max/stddev = 0.617/0.870/1.161/0.146 ms After adding three lines to fore_receive.c to clear the unused fields in m_pkthdr, I get pretty decent results: --- 192.168.100.18 ping statistics --- 101 packets transmitted, 101 packets received, 0% packet loss round-trip min/avg/max/stddev = 0.623/0.851/1.308/0.104 ms Here are the three lines I added to fore_receive.c after line 421: + mhead->m_pkthdr.rcvif = NULL; + mhead->m_pkthdr.csum_flags = 0; + mhead->m_pkthdr.aux = NULL; KB_PLENSET(mhead, pdulen); I think this is the easy fix - for now. Unfortunately, future changes to the mbuf structure may break this fix. So would this be preferable? bzero(mhead->m_pkthdr, sizeof(struct pkthdr)); This would assume that any future flags or pointers can be safely set to zero or NULL for backwards compatibility. The best solution, in my opinion, would be to modify the location of the "buffer handle" structure so that it does not molest the pkthdr. I think that is what the author really intended with the original definition for BUF1_SM_DOFF. This would be a much bigger change, so I will just toss the idea and let everyone decide whether this is the proper thing to do. In the meantime, I will continue to test my changes, and welcome any feedback, whether you found the changes to help, hurt, or make no difference. After all, there might be other subtle issues that we still need to track down. All the best, -Richard ------------------------------------------- Richard Hodges | Matriplex, inc. | 769 Basque Way rh@matriplex.com | Carson City, NV 89706 775-886-6477 | www.matriplex.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-atm" in the body of the message