From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 15 22:56:41 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7D0210E; Sat, 15 Mar 2014 22:56:41 +0000 (UTC) Received: from mail-ee0-x22a.google.com (mail-ee0-x22a.google.com [IPv6:2a00:1450:4013:c00::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 43D06E2E; Sat, 15 Mar 2014 22:56:41 +0000 (UTC) Received: by mail-ee0-f42.google.com with SMTP id d17so2726978eek.1 for ; Sat, 15 Mar 2014 15:56:39 -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; bh=xEcggYbDeJVGboTzNnpljgF9F7MQULnD8Pk/BtvymL4=; b=CI4Nsa2tfcMHS7NXoUPV7LbsS+PwMC85q0z7oZu4EUurCRqZpY2KWl2I/WdwVhFYWb lxFU8bWsb5FJP3srOWYQW67Dbw3jM0XVlrjAYVoeCEQ5SC5BEoDv+IhYEr1eE81YPk2q oNy34w+xEbj2YsSfTvMul+0EeSp6K3IV8NpVoQMemvw/kWZsrndCQQ/NLh90qpjGCk9W DfZw618YozUQ+SEbEt2S5Uqk2dU1HaQBt7SGxLguN/vOMdJNeh2+tI+lFQt1Bp451PGz QVOzp6LyDapclozSKSpb0qMzhvLJ9O4Gg50/z8+4pHyS9Kan0SYWktJLQ9pX21ySfMvA PmJw== X-Received: by 10.14.213.135 with SMTP id a7mr15967098eep.57.1394924199706; Sat, 15 Mar 2014 15:56:39 -0700 (PDT) Received: from [192.168.2.30] ([2.176.141.45]) by mx.google.com with ESMTPSA id f45sm27860390eeg.5.2014.03.15.15.56.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 15 Mar 2014 15:56:39 -0700 (PDT) Message-ID: <5324DAC0.9020508@gmail.com> Date: Sun, 16 Mar 2014 03:27:04 +0430 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> <532405B7.2020007@gmail.com> <96659837-1FDC-421D-A339-87104A0075C7@FreeBSD.org> <5324D669.804@gmail.com> In-Reply-To: <5324D669.804@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.17 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 22:56:41 -0000 On 3/16/2014 3:08 AM, Hooman Fazaeli wrote: > On 3/15/2014 9:09 PM, Rui Paulo wrote: >> On 15 Mar 2014, at 00:48, Hooman Fazaeli wrote: >>> 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? >> I'm not sure what you mean by m_ext + 1, but what are you trying to do? If you need to tag an mbuf, use mbuf tags. >> >> -- >> Rui Paulo > > (m->m_ext+ 1) points to the (unused?) area in m->m_dat.MHright after the space occupied by m_ext. > I am well aware of mbuf tags. I was just thinking toavoid the overhead of m_tag allocation/de-allocation > and store my little piece of data directly in mbufs. > sorry for my mistake. (m->m_ext + 1) is a totally wrong notation as m_ext is a struct. The area I was talking about is (m->m_pktdat + sizeof(m->m_ext)). Is this part of mbuf+cluster has any known uses? can we use it to store some data about the packet (instead of using mbuf tags)? -- Best regards. Hooman Fazaeli