From owner-freebsd-net@FreeBSD.ORG Thu Feb 2 22:03:20 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB18F106564A for ; Thu, 2 Feb 2012 22:03:20 +0000 (UTC) (envelope-from rozhuk.im@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 190828FC08 for ; Thu, 2 Feb 2012 22:03:19 +0000 (UTC) Received: by bkbzx1 with SMTP id zx1so3516450bkb.13 for ; Thu, 02 Feb 2012 14:03:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=reply-to:from:to:cc:references:in-reply-to:subject:date:message-id :mime-version:content-type:content-transfer-encoding:x-mailer :content-language:thread-index; bh=6JTdty3Oa8gxqRA9ruDAonjGmzNpxtfkfiYdhy3mulU=; b=qdPJaey1eU9vGQt0vv3dI531oOPMTGrVz/vw4GGBN0L7PnZGajlj7VJdffssPqHMBw 5kt112tgTRnShHNR+PG3Jc+ov7OeZK4JEXvKw46rl8+0BTLsALCDINnh5/JJG6+iajlI aU2csFprOv79S1CfskorGKhLoK7kkqMaJmEws= Received: by 10.205.129.141 with SMTP id hi13mr2201020bkc.7.1328220198865; Thu, 02 Feb 2012 14:03:18 -0800 (PST) Received: from rimwks1w7x64 ([31.47.167.64]) by mx.google.com with ESMTPS id fg16sm10680113bkb.16.2012.02.02.14.03.17 (version=SSLv3 cipher=OTHER); Thu, 02 Feb 2012 14:03:18 -0800 (PST) From: rozhuk.im@gmail.com To: "'Julian Elischer'" References: <4f298d95.82b7cc0a.49b2.5d24@mx.google.com> <4F2A2C1F.1060609@freebsd.org> In-Reply-To: <4F2A2C1F.1060609@freebsd.org> Date: Fri, 3 Feb 2012 07:03:11 +0900 Message-ID: <4f2b0826.10cbcc0a.5660.ffff8aa9@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Content-Language: ru thread-index: Aczhcyesh/MFazsJSL6FchqEExpIUAAf2Dew Cc: freebsd-net@freebsd.org Subject: RE: m_pullup - fail X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Rozhuk.IM@gmail.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2012 22:03:20 -0000 I am writing a netgraph node for processing UDP packets passing through the router / bridge. Node must fully inspect the entire contents of the package, in some cases, change them. Node is connected to ng_ether (lower, upper). I was faced with the fact that all packets are processed normally, except for packets generated by the router / bridge that is larger than MHLEN. Packet from the network: mbuf: 0xfffffe00a9e27a00 len: 899, next: 0, 3 About the same package generated a router: mbuf: 0xfffffe00a4d59900 len: 42, next: 0xfffffe010a5c4000, 2 mbuf: 0xfffffe010a5c4000 len: 857, next: 0, 1 In this case m_pullup (m, m-> m_pkthdr.len) - returns NULL, though he could move 42 bytes to an external storage (ext) and remove the second mbuf (m_next). > -----Original Message----- > From: Julian Elischer [mailto:julian@freebsd.org] > Sent: Thursday, February 02, 2012 3:25 PM > To: Rozhuk.IM@gmail.com > Cc: freebsd-net@freebsd.org > Subject: Re: m_pullup - fail > > On 2/1/12 11:07 AM, rozhuk.im@gmail.com wrote: > > Hello! > > > > > > The function always returns an error and remove the chain MBUF for > two > > or more generated on the same host. > > If the pre-call m_defrag no error occurs. > > This is normal behavior? > > How to know in advance the maximum size for MBUF that does not cause > a > > failure in m_pullup? > > > > send the list more information.. > like where it is being called from, or a stack trace, or what are you > trying to do? > > > mbuf: 0xfffffe0074fc0600 len: 42, next: 0xfffffe0073a45800, 2 > > mbuf: 0xfffffe0073a45800 len: 210, next: 0, 1 > > FAIL: m_pullup: m_pkthdr.len = 252, m_len = 42, pullup_len = 252 > > > > > > > > _______________________________________________ > > freebsd-net@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-net > > To unsubscribe, send any mail to "freebsd-net- > unsubscribe@freebsd.org" > >