From owner-freebsd-bugs Thu Feb 28 23: 0:11 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 02AFC37B41B for ; Thu, 28 Feb 2002 23:00:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g21701u51444; Thu, 28 Feb 2002 23:00:01 -0800 (PST) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id A231437B417 for ; Thu, 28 Feb 2002 22:55:47 -0800 (PST) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g216tlk50800; Thu, 28 Feb 2002 22:55:47 -0800 (PST) (envelope-from nobody) Message-Id: <200203010655.g216tlk50800@freefall.freebsd.org> Date: Thu, 28 Feb 2002 22:55:47 -0800 (PST) From: "George V. Neville-Neil" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: kern/35442: Problem transmitting runts in if_sis driver (with patch for fix) Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 35442 >Category: kern >Synopsis: Problem transmitting runts in if_sis driver (with patch for fix) >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Feb 28 23:00:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: George V. Neville-Neil >Release: -CURRENT (20 Feb 2002 from CVS) >Organization: Neville-Neil Consulting >Environment: Can't, embedded machine. Soekris 4501 networked embedded board. >Description: Packets that are less than the 60 byte minimum for ethernet are transmitting with trailing 1 bits (this shows up at 0xff in ethereal/tcpdump) instead of trailing 0 bits. This is the way the chip (National Semiconductor DP83815) interprets auto-padding. >How-To-Repeat: ping -s 1 -c 1 224.0.0.1 on the machine with the sis interface. Check packets with ethereal/tcpdump. >Fix: Here is a context diff for a fix: Index: if_sis.c =================================================================== RCS file: /music/FreeBSD-CVS/src/sys/pci/if_sis.c,v retrieving revision 1.48 diff -c -r1.48 if_sis.c *** if_sis.c 6 Feb 2002 22:06:47 -0000 1.48 --- if_sis.c 1 Mar 2002 06:51:46 -0000 *************** *** 1665,1671 **** struct ifnet *ifp; { struct sis_softc *sc; ! struct mbuf *m_head = NULL; u_int32_t idx; sc = ifp->if_softc; --- 1665,1671 ---- struct ifnet *ifp; { struct sis_softc *sc; ! struct mbuf *m_head = NULL, *m_zero = NULL; u_int32_t idx; sc = ifp->if_softc; *************** *** 1687,1692 **** --- 1687,1701 ---- IF_DEQUEUE(&ifp->if_snd, m_head); if (m_head == NULL) break; + + if (m_head->m_pkthdr.len < ETHER_MIN_LEN) { + m_zero = m_get_clrd(M_DONTWAIT, MT_DATA); + if (m_zero == NULL) + break; + m_zero->m_len = ETHER_MIN_LEN - m_head->m_pkthdr.len; + m_cat(m_head, m_zero); + m_head->m_pkthdr.len = ETHER_MIN_LEN; + } if (sis_encap(sc, m_head, &idx)) { IF_PREPEND(&ifp->if_snd, m_head); >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message