From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 15 07:47:47 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 859B3B5F; Sat, 15 Mar 2014 07:47:47 +0000 (UTC) Received: from mail-ee0-x22e.google.com (mail-ee0-x22e.google.com [IPv6:2a00:1450:4013:c00::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ECB40ADC; Sat, 15 Mar 2014 07:47:46 +0000 (UTC) Received: by mail-ee0-f46.google.com with SMTP id t10so2132834eei.19 for ; Sat, 15 Mar 2014 00:47:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=HshJybbnUMO/CgPo61WFfbWPNB2JUHwXJY9A9PLcvyc=; b=YhhqZgKp8tW8PikTAdvRR2YIBc2D7ygewbZGJ274BganQC1tB+o/3GO5P9rfWpp0rJ vj53rqAjE1IkDrh/VIbFMXXDcldsHd60Vv4I7dJeEY6glaZVkGyPuEQLEWds/mjgY9tY LNxp5AXBXoj7L9BU2HQgn7p96oNSV2Jl0RpV+SY01FFZ4pFNOFwuZJGPkD0Rw+twRRqd mUFRSOnNoY4v1uKEk/LH8BmS6oyPMlAYoAQNrqRVzgjkRHvUlu60OqgQqCidxHVjMwwx 0NkG4lI6GvQaro+uvb4jYykidt4Ubc9fJEK4AK/XNSGPo9xvgZqhx7CfbFFgGsezzPq1 b8jQ== X-Received: by 10.14.107.129 with SMTP id o1mr1238043eeg.99.1394869665411; Sat, 15 Mar 2014 00:47:45 -0700 (PDT) Received: from [192.168.2.30] ([2.176.141.45]) by mx.google.com with ESMTPSA id 43sm22773438eeh.13.2014.03.15.00.47.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 15 Mar 2014 00:47:44 -0700 (PDT) Message-ID: <532405B7.2020007@gmail.com> Date: Sat, 15 Mar 2014 11:18:07 +0330 From: Hooman Fazaeli User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 MIME-Version: 1.0 To: Rui Paulo Subject: Re: mbuf question References: <53230214.7010501@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Hackers X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Mar 2014 07:47:47 -0000 On 3/15/2014 5:09 AM, Rui Paulo wrote: > On 14 Mar 2014, at 06:20, Hooman Fazaeli wrote: > >> Hi list, >> >> Is it safe to use m->m_pktdat area to store some arbitrary data about packets allocated as mbuf+cluster pair? > No, because m_pktdat is really MH_databuf which is part of a union with MH_ext which is set when you allocate an mbuf cluster. > > -- > Rui Paulo > > > Thanks for the point. I simply overlooked the fact that MH_dat is a union, not a struct. What about the area started at (m->m_ext + 1) whose size is (MHLEN - sizeof(struct m_ext))? Is there any known uses of this area in the stack? -- Best regards. Hooman Fazaeli