Date: Tue, 21 Nov 2000 13:04:45 -0800 (PST) From: Richard Hodges <rh@matriplex.com> To: Adam Obszynski <awo@freebsd.pl> Cc: freebsd-atm@FreeBSD.ORG Subject: Fixed (?): FORE PCA-200e (oc3 and UTP) Message-ID: <Pine.BSF.4.10.10011211247110.57352-100000@mail.matriplex.com> In-Reply-To: <Pine.BSF.4.10.10011210904110.55855-100000@mail.matriplex.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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. <title> | 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.10011211247110.57352-100000>