Proposal: Add M_HASCL().
Bruce M Simpson
bms at incunabulum.net
Wed Feb 28 22:20:52 UTC 2007
Much network code needs to know if the mbuf it is looking at is using a
cluster. I propose putting M_HASCL() in sys/mbuf.h. I realise this is a
style change, however, it seems to be a very common idiom.
Places this macro is currently defined and used directly:
netinet/ip_mroute.c
netinet6/ip6_mroute.c
nfsclient/nfsm_subs.h
nfsserver/nfsm_subs.h
Places which use this idiom by another name:
if_ppp.c
ppp_tty.c
Places which use this idiom indirectly by its expansion:
sys/mbuf.h
sys/socketvar.h
netinet/ip6.h
dev/pdq
Many device drivers and third party code.
Head on over to http://fxr.watson.org/fxr/ident?i=M_HASCL and have a look.
Feel free to not bikeshed about this. It became apparent that this is a
common idiom (needing to know if an mbuf is using external storage for
whatever reason).
Thoughts?
BMS
More information about the freebsd-net
mailing list