Date: Thu, 28 Feb 2002 22:55:47 -0800 (PST) From: "George V. Neville-Neil" <gnn@neville-neil.com> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/35442: Problem transmitting runts in if_sis driver (with patch for fix) Message-ID: <200203010655.g216tlk50800@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203010655.g216tlk50800>
