Date: Thu, 28 Feb 2002 22:58:03 -0800 From: "George V. Neville-Neil" <gnn@neville-neil.com> To: Bob Bishop <rb@gid.co.uk> Cc: Doug Ambrisko <ambrisko@ambrisko.com>, hackers@FreeBSD.ORG Subject: Re: Multicast problem with sis interface? Message-ID: <200203010658.WAA1805200@meer.meer.net> In-Reply-To: Message from Bob Bishop <rb@gid.co.uk> of "Fri, 22 Feb 2002 17:05:41 GMT." <4.3.2.7.2.20020222165515.00c14850@gid.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
Here is a context diff that fixes the driver. Not the most performant solution (it requires allocating a new, zero'd, mbuf) but it's the most straightforward fix. Auto Padding is still on in the driver. I saw no reason to disable this even though we're now go around it. This fix is against -CURRENT of 20 Feb 2002 vintage. I've submitted a PR with the patch in the comments. Later, George 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); -- George V. Neville-Neil gnn@neville-neil.com NIC:GN82 "Those who would trade liberty for temporary security deserve neither" - Benjamin Franklin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203010658.WAA1805200>