From owner-freebsd-hackers Thu Feb 28 22:58:11 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from outboundx.mv.meer.net (outboundx.mv.meer.net [209.157.152.12]) by hub.freebsd.org (Postfix) with ESMTP id 04D6337B417 for ; Thu, 28 Feb 2002 22:58:07 -0800 (PST) Received: from meer.meer.net (mail.meer.net [209.157.152.14]) by outboundx.mv.meer.net (8.11.6/8.11.6) with ESMTP id g216w2s43436; Thu, 28 Feb 2002 22:58:02 -0800 (PST) (envelope-from gnn@neville-neil.com) Received: from neville-neil.com ([209.157.133.226]) by meer.meer.net (8.9.3/8.9.3/meer) with ESMTP id WAA1805200; Thu, 28 Feb 2002 22:58:03 -0800 (PST) Message-Id: <200203010658.WAA1805200@meer.meer.net> X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Bob Bishop Cc: Doug Ambrisko , hackers@FreeBSD.ORG Subject: Re: Multicast problem with sis interface? In-Reply-To: Message from Bob Bishop of "Fri, 22 Feb 2002 17:05:41 GMT." <4.3.2.7.2.20020222165515.00c14850@gid.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 28 Feb 2002 22:58:03 -0800 From: "George V. Neville-Neil" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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