From owner-freebsd-net@FreeBSD.ORG Fri Oct 8 20:34:37 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4719B16A4CE; Fri, 8 Oct 2004 20:34:37 +0000 (GMT) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8442243D39; Fri, 8 Oct 2004 20:34:36 +0000 (GMT) (envelope-from glebius@freebsd.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.12.11/8.12.8) with ESMTP id i98KYYAW002869 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 9 Oct 2004 00:34:35 +0400 (MSD) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.sick.ru (8.12.11/8.12.11/Submit) id i98KYYvK002868; Sat, 9 Oct 2004 00:34:34 +0400 (MSD) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@freebsd.org using -f Date: Sat, 9 Oct 2004 00:34:34 +0400 From: Gleb Smirnoff To: Giorgos Keramidas Message-ID: <20041008203434.GA2770@cell.sick.ru> Mail-Followup-To: Gleb Smirnoff , Giorgos Keramidas , freebsd-net@freebsd.org References: <20041008151515.GA3136@orion.daedalusnetworks.priv> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20041008151515.GA3136@orion.daedalusnetworks.priv> User-Agent: Mutt/1.5.6i cc: freebsd-net@freebsd.org Subject: Re: Calling m_pullup in ether_input X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Oct 2004 20:34:37 -0000 On Fri, Oct 08, 2004 at 06:15:15PM +0300, Giorgos Keramidas wrote: G> In ether_input() we unconditionaly discard the mbufs whose m_len is less than G> ETHER_HDR_LEN. A bit higher M_PKTHDR has been checked but the check made G> before discarding the frame doesn't pay attention to the m->m_pkthdr.len (the G> total packet length). In my humble opinion, all Ethernet device drivers are intentionally written in such a way that they always pass an mbuf with contigous Ethernet header to ether_input(). Why did you write this patch? Do you really have packet loss? G> I am trying to find out how often this happens, by using the attached patch to G> count the number of small frames received in ether_input() and the number of G> failed m_pullup() attempts that result from that. And what results do you have? G> Does this change seem reasonable as an instrumentation of the particular G> problem or am I unknowingly breaking something in the way ether_input() is G> supposed to work? AFAIK, this patch does not break anything but just adds more processing. -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE