tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: mbuf initialization macros
Hi,
On 2016/04/19 0:51, Christos Zoulas wrote:
> In article <571463BF.30607%iij.ad.jp@localhost>,
> Kengo NAKAHARA <k-nakahara%iij.ad.jp@localhost> wrote:
>
>> @@ -867,6 +867,10 @@ int m_append(struct mbuf *, int, const void *);
>> /* Inline routines. */
>> static __inline u_int m_length(const struct mbuf *) __unused;
>>
>> +static __inline void m_hdr_init(struct mbuf *, short, struct mbuf *,
>> + char *, int);
>> +static __inline void m_pkthdr_init(struct mbuf *);
>> +
>
> Looks good, but you should not need the above... Perhaps remove all
> the static __inline decls. Is the __unused needed? Can it be moved in
> the definition?
Oh, sorry, I was confused by the existing m_length() declaration.
I remove my static __inline declarations.
Hmm, the static __inline m_length() declaration is added by mbuf.h r1.92
commit and __unused attribute is added by mbuf.h r1.97 commit. It seems
the declaration is not needed as long as I read the commit message.
# of course, GENERIC kernel can be built without the declaration
Can I remove the m_length() declaration before adding mbuf initialization
functions?
Thanks,
--
//////////////////////////////////////////////////////////////////////
Internet Initiative Japan Inc.
Device Engineering Section,
IoT Platform Development Department,
Network Division,
Technology Unit
Kengo NAKAHARA <k-nakahara%iij.ad.jp@localhost>
Home |
Main Index |
Thread Index |
Old Index