From owner-freebsd-net@FreeBSD.ORG Fri Oct 8 20:51:26 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 737D116A4CE; Fri, 8 Oct 2004 20:51:26 +0000 (GMT) Received: from kane.otenet.gr (kane.otenet.gr [195.170.0.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id B645043D41; Fri, 8 Oct 2004 20:51:25 +0000 (GMT) (envelope-from keramida@freebsd.org) Received: from gothmog.gr (patr530-b125.otenet.gr [212.205.244.133]) i98KpMr2013825; Fri, 8 Oct 2004 23:51:23 +0300 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.13.1/8.13.1) with ESMTP id i98KpIKH007861; Fri, 8 Oct 2004 23:51:18 +0300 (EEST) (envelope-from keramida@freebsd.org) Received: (from giorgos@localhost) by gothmog.gr (8.13.1/8.13.1/Submit) id i98KpIax007860; Fri, 8 Oct 2004 23:51:18 +0300 (EEST) (envelope-from keramida@freebsd.org) Date: Fri, 8 Oct 2004 23:51:17 +0300 From: Giorgos Keramidas To: Gleb Smirnoff Message-ID: <20041008205117.GA7818@gothmog.gr> References: <20041008151515.GA3136@orion.daedalusnetworks.priv> <20041008203434.GA2770@cell.sick.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041008203434.GA2770@cell.sick.ru> 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:51:26 -0000 On 2004-10-09 00:34, Gleb Smirnoff wrote: > 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(). I know, but thanks for verifying what I had understood so far :-) > Why did you write this patch? Do you really have packet loss? Not really. Just trying to see if there _was_ any packet loss first. After running for several hours, the counters are still zero. I think this means the case of dropped packets would be so rare that there's no real reason to worry too much about lost packets. > 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? I'll keep this change in my workstation for a week or so. No signs of dropped packets yet, though. > 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. Thanks for the reply. I'm (somewhat slowly) learning more about the way the networking code. A little more processing is a small penalty to pay for trying out things. - Giorgos