mbuf question

Hooman Fazaeli hoomanfazaeli at gmail.com
Sat Mar 15 07:47:47 UTC 2014


On 3/15/2014 5:09 AM, Rui Paulo wrote:
> On 14 Mar 2014, at 06:20, Hooman Fazaeli <hoomanfazaeli at gmail.com> 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



More information about the freebsd-hackers mailing list