From owner-freebsd-atm Tue Nov 21 6:54:56 2000 Delivered-To: freebsd-atm@freebsd.org Received: from hq.atm.com.pl (gate.atm.com.pl [157.25.180.50]) by hub.freebsd.org (Postfix) with ESMTP id 9390037B4CF for ; Tue, 21 Nov 2000 06:54:53 -0800 (PST) Received: by gateway.hq.atm.com.pl id <14339>; Tue, 21 Nov 2000 15:56:19 +0100 From: Adam Obszynski X-Mailer: The Bat! (v1.46d) UNREG / CD5BF9353B3B7091 Reply-To: Adam Obszynski Organization: FreeBSD User! X-Priority: 3 (Normal) Message-Id: <00Nov21.155619met.14339@gateway.hq.atm.com.pl> To: freebsd-atm@FreeBSD.ORG Subject: FORE PCA-200e (oc3 and UTP) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 8bit Date: Tue, 21 Nov 2000 15:56:19 +0100 Sender: owner-freebsd-atm@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hello freebsd-atm, 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-) where is solution ? back to 3.5 ? or move to current ? -- Regards, Adam Obszyński awo@freebsd.pl To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-atm" in the body of the message From owner-freebsd-atm Tue Nov 21 10: 7:23 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 83FDC37B4C5 for ; Tue, 21 Nov 2000 10:07:19 -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 KAA57193; Tue, 21 Nov 2000 10:06:44 -0800 (PST) (envelope-from rh@matriplex.com) Date: Tue, 21 Nov 2000 10:06:44 -0800 (PST) From: Richard Hodges To: Adam Obszynski Cc: freebsd-atm@FreeBSD.ORG Subject: Re: FORE PCA-200e (oc3 and UTP) In-Reply-To: <00Nov21.155619met.14339@gateway.hq.atm.com.pl> 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, Adam Obszynski wrote: > Hello freebsd-atm, > > 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-) May I ramble for a few moments? Thanks :-) The file fore.h contains these #defines when compiling on FreeBSD: #define SIZEOF_Buf_handle 16 /* XXX sizeof(Buf_handle) */ #define BUF1_SM_HOFF (sizeof(struct m_hdr)) #define BUF1_SM_HDR (sizeof(struct m_hdr) + sizeof(struct pkthdr)) #define BUF1_SM_LEN (MHLEN) #define BUF1_LG_HOFF (sizeof(struct m_hdr) + sizeof(struct pkthdr) \ + sizeof(M_ext)) /* Buffer-to-handle offset */ #define BUF1_SM_DOFF ((BUF1_SM_HOFF + SIZEOF_Buf_handle) - BUF1_SM_HDR) #define BUF1_SM_SIZE (BUF1_SM_LEN - BUF1_SM_DOFF) Some quick calculations give us: #define BUF1_SM_HOFF 20 #define BUF1_SM_HDR 44 #define BUF1_LG_HOFF 60 #define BUF1_SM_DOFF (20 + 16) - 44 == -8 (ouch!) The term BUF1_SM_DOFF is used in two places: fore_buffer.c: KB_HEADSET(m, BUF1_SM_DOFF); fore_receive.c: KB_HEADSET(m, BUF1_SM_DOFF); In both cases, these follow KB_ALLOCPKT, a wrapper for MGETHDR. In fore_receive.c, there is also KB_LINKHEAD, which copies the packet header to the new buffer. This should not affect the size or offset calculations. The macro KB_HEADSET(bfr, n) sets the data pointer to n bytes after the packet header in this case: (bfr)->m_data = (bfr)->m_pktdat + (n); So if we change BUF1_SM_DOFF to 16 (or SIZEOF_Buf_handle), the new data pointer will be mbuf+60, and BUF1_SM_SIZE will be MHLEN-16 (196). It looks fine to me... Now here is the part I really don't understand... The driver uses a "buffer handle" structure to keep track of interesting things, and places it at mbuf + BUF1_SM_HOFF, right on top of the m_pkthdr structure. As far as I can tell, the driver leaves the m_pkthdr in a possibly corrupted state, except for setting the length, (fore_receive.c) right after dequeuing a PDU: KB_PLENSET(mhead, pdulen); My hypothesis is that the driver is handing over an mbuf chain to the HARP core with possibly corrupt m_pkthdr data... Could it be that the driver "buffer handle" structure *just happened* to be compatible with the previous m_pkthdr structure? I will need some time to test this idea, but maybe these ramblings will help someone else find the truth. My first impression is that maybe changing the offset to "buffer handle" (bhp) from BUF1_SM_HOFF to BUF1_SM_HDR will do the trick. It almost looks like that was the author's intention from the way that BUF1_SM_DOFF is calculated. As always, helpful flames cheerfully accepted. -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 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 <freebsd-atm@FreeBSD.ORG>; 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 <rh@matriplex.com> To: Adam Obszynski <awo@freebsd.pl> Cc: freebsd-atm@FreeBSD.ORG Subject: Fixed (?): FORE PCA-200e (oc3 and UTP) In-Reply-To: <Pine.BSF.4.10.10011210904110.55855-100000@mail.matriplex.com> Message-ID: <Pine.BSF.4.10.10011211247110.57352-100000@mail.matriplex.com> 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. <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 From owner-freebsd-atm Sat Nov 25 0:39:43 2000 Delivered-To: freebsd-atm@freebsd.org Received: from hotmail.com (f164.law3.hotmail.com [209.185.241.164]) by hub.freebsd.org (Postfix) with ESMTP id EAAA337B4CF for <freebsd-atm@freebsd.org>; Sat, 25 Nov 2000 00:39:41 -0800 (PST) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sat, 25 Nov 2000 00:39:41 -0800 Received: from 203.106.63.160 by lw3fd.law3.hotmail.msn.com with HTTP; Sat, 25 Nov 2000 08:39:41 GMT X-Originating-IP: [203.106.63.160] From: "Johan Yusoff Abu Bakar" <johanyusoff@hotmail.com> To: freebsd-atm@freebsd.org Date: Sat, 25 Nov 2000 16:39:41 +0800 Mime-Version: 1.0 Content-Type: text/html Message-ID: <F164egIqunLOyDc41W200003a16@hotmail.com> X-OriginalArrivalTime: 25 Nov 2000 08:39:41.0743 (UTC) FILETIME=[411963F0:01C056BB] Sender: owner-freebsd-atm@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org <html><DIV>hi,</DIV> <DIV> </DIV> <DIV>  i'm quite new here.. i just want to know if there is anyone out there who are using the CoralReef from <A href="http://www.caida.org">http://www.caida.org</A> for atm monitoring. I just wanted to know what version of FreeBSD you are using since the INSTALL guide within the software mention that it does not work with 4.0. but doesn't mention about 4.1 or 4.2.</DIV> <DIV> </DIV> <DIV>regards,</DIV> <DIV>johan yusoff bin abu bakar</DIV> <DIV>multimedia university</DIV> <DIV>malaysia</DIV><br clear=all><hr>Get more from the Web. FREE MSN Explorer download : <a href="http://explorer.msn.com">http://explorer.msn.com</a><br></p></html> To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-atm" in the body of the message