From owner-freebsd-tokenring Fri Aug 27 12:19:32 1999 Delivered-To: freebsd-tokenring@freebsd.org Received: from heathers.stdio.com (heathers.stdio.com [199.89.192.5]) by hub.freebsd.org (Postfix) with ESMTP id 3B5F515558 for ; Fri, 27 Aug 1999 12:19:28 -0700 (PDT) (envelope-from lile@stdio.com) Received: from heathers.stdio.com (lile@heathers.stdio.com [199.89.192.5]) by heathers.stdio.com (8.8.8/8.8.8) with ESMTP id PAA00182; Fri, 27 Aug 1999 15:18:22 -0400 (EDT) (envelope-from lile@stdio.com) Date: Fri, 27 Aug 1999 15:18:22 -0400 (EDT) From: Larry Lile To: Phil Regnauld Cc: tokenring@freebsd.org Subject: Serious token-ring arp bug... In-Reply-To: <19990824123247.11319@ns.int.ftf.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-tokenring@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Here is a patch for the token-ring arp problem that some people have been seeing. I suggest that anyone trying to do token-ring apply it, it will be committed to current sometime soon. Please send feedback to me, or the list, about your results. During my new-bus rewrite of the Olicom driver I was able to track this down and get it fixed. I am hoping that it will help fix some of the other problems that people are having. Thanks to Phil and others, I can't recall names just now, for the debug info on this problem. Also to pre-answer the next question: Yes, I do have a newbus driver for Olicom - PCI Only and it is very slow (200K/s). I do think I have resolved the transmitter hang. I am working on pushing up the throughput to see if that causes transmitter hang to come back. Sorry this is all taking so long but be patient... Larry Lile lile@stdio.com *** if_ether.c.orig Thu Aug 26 20:48:21 1999 --- if_ether.c Fri Aug 27 14:05:17 1999 *************** *** 566,588 **** * a token-ring nic then try to save the source * routing info. */ if (ac->ac_if.if_type == IFT_ISO88025) { th = (struct iso88025_header *)m->m_pkthdr.header; if ((th->iso88025_shost[0] & 0x80) && ! (((ntohs(th->rcf) & 0x1f00) >> 8) > 2)) { ! sdl->sdl_rcf = ntohs(th->rcf) & 0x0080 ? ! htons(ntohs(th->rcf) & 0xff7f) : ! htons(ntohs(th->rcf) | 0x0080); ! memcpy(sdl->sdl_route, th->rseg, ((ntohs(th->rcf) & 0x1f00) >> 8) - 2); ! sdl->sdl_rcf = htons(ntohs(sdl->sdl_rcf) & 0x1fff); /* Set up source routing information for reply packet (XXX)*/ ! m->m_data -= (((ntohs(th->rcf) & 0x1f00) >> 8) + 8); ! m->m_len += (((ntohs(th->rcf) & 0x1f00) >> 8) + 8); } else { th->iso88025_shost[0] &= 0x7f; - m->m_data -= 8; - m->m_len += 8; } th->rcf = sdl->sdl_rcf; } else { --- 566,593 ---- * a token-ring nic then try to save the source * routing info. */ + printf("arp: m_len %d\n", m->m_len); if (ac->ac_if.if_type == IFT_ISO88025) { th = (struct iso88025_header *)m->m_pkthdr.header; if ((th->iso88025_shost[0] & 0x80) && ! ((th->rcf & 0x001f) > 2)) { ! sdl->sdl_rcf = (th->rcf & 0x8000) ? (th->rcf & 0x7fff) : ! (th->rcf | 0x8000); ! memcpy(sdl->sdl_route, th->rseg, (th->rcf & 0x001f) - 2); ! sdl->sdl_rcf = sdl->sdl_rcf & 0xff1f; /* Set up source routing information for reply packet (XXX)*/ ! m->m_data -= (th->rcf & 0x001f); ! m->m_len += (th->rcf & 0x001f); ! m->m_pkthdr.len += (th->rcf & 0x001f); ! printf("arp: m_len %d\n", m->m_len); ! printf("arp: sr len %d\n", th->rcf & 0x001f); } else { th->iso88025_shost[0] &= 0x7f; } + m->m_data -= 8; + m->m_len += 8; + m->m_pkthdr.len += 8; + printf("arp: m_len %d\n", m->m_len); th->rcf = sdl->sdl_rcf; } else { *************** *** 664,670 **** /* Set the source routing bit if neccesary */ if (th->iso88025_dhost[0] & 0x80) { th->iso88025_dhost[0] &= 0x7f; ! if (((ntohs(th->rcf) & 0x1f00) >> 8) - 2) th->iso88025_shost[0] |= 0x80; } /* Copy the addresses, ac and fc into sa_data */ --- 669,675 ---- /* Set the source routing bit if neccesary */ if (th->iso88025_dhost[0] & 0x80) { th->iso88025_dhost[0] &= 0x7f; ! if ((th->rcf & 0x001f) - 2) th->iso88025_shost[0] |= 0x80; } /* Copy the addresses, ac and fc into sa_data */ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-tokenring" in the body of the message