Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/mbuf.h
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | |||||
#define MBUF_PROBE3(probe, arg0, arg1, arg2) \ | #define MBUF_PROBE3(probe, arg0, arg1, arg2) \ | ||||
SDT_PROBE3(sdt, , , probe, arg0, arg1, arg2) | SDT_PROBE3(sdt, , , probe, arg0, arg1, arg2) | ||||
#define MBUF_PROBE4(probe, arg0, arg1, arg2, arg3) \ | #define MBUF_PROBE4(probe, arg0, arg1, arg2, arg3) \ | ||||
SDT_PROBE4(sdt, , , probe, arg0, arg1, arg2, arg3) | SDT_PROBE4(sdt, , , probe, arg0, arg1, arg2, arg3) | ||||
#define MBUF_PROBE5(probe, arg0, arg1, arg2, arg3, arg4) \ | #define MBUF_PROBE5(probe, arg0, arg1, arg2, arg3, arg4) \ | ||||
SDT_PROBE5(sdt, , , probe, arg0, arg1, arg2, arg3, arg4) | SDT_PROBE5(sdt, , , probe, arg0, arg1, arg2, arg3, arg4) | ||||
SDT_PROBE_DECLARE(sdt, , , m__init); | SDT_PROBE_DECLARE(sdt, , , m__init); | ||||
SDT_PROBE_DECLARE(sdt, , , m__gethdr_raw); | |||||
SDT_PROBE_DECLARE(sdt, , , m__gethdr); | SDT_PROBE_DECLARE(sdt, , , m__gethdr); | ||||
SDT_PROBE_DECLARE(sdt, , , m__get_raw); | |||||
SDT_PROBE_DECLARE(sdt, , , m__get); | SDT_PROBE_DECLARE(sdt, , , m__get); | ||||
SDT_PROBE_DECLARE(sdt, , , m__getcl); | SDT_PROBE_DECLARE(sdt, , , m__getcl); | ||||
SDT_PROBE_DECLARE(sdt, , , m__getjcl); | SDT_PROBE_DECLARE(sdt, , , m__getjcl); | ||||
SDT_PROBE_DECLARE(sdt, , , m__clget); | SDT_PROBE_DECLARE(sdt, , , m__clget); | ||||
SDT_PROBE_DECLARE(sdt, , , m__cljget); | SDT_PROBE_DECLARE(sdt, , , m__cljget); | ||||
SDT_PROBE_DECLARE(sdt, , , m__cljset); | SDT_PROBE_DECLARE(sdt, , , m__cljset); | ||||
SDT_PROBE_DECLARE(sdt, , , m__free); | SDT_PROBE_DECLARE(sdt, , , m__free); | ||||
SDT_PROBE_DECLARE(sdt, , , m__freem); | SDT_PROBE_DECLARE(sdt, , , m__freem); | ||||
▲ Show 20 Lines • Show All 878 Lines • ▼ Show 20 Lines | m_init(struct mbuf *m, int how, short type, int flags) | ||||
else | else | ||||
error = 0; | error = 0; | ||||
MBUF_PROBE5(m__init, m, how, type, flags, error); | MBUF_PROBE5(m__init, m, how, type, flags, error); | ||||
return (error); | return (error); | ||||
} | } | ||||
static __inline struct mbuf * | static __inline struct mbuf * | ||||
m_get_raw(int how, short type) | |||||
{ | |||||
struct mbuf *m; | |||||
struct mb_args args; | |||||
args.flags = 0; | |||||
args.type = type | MT_NOINIT; | |||||
m = uma_zalloc_arg(zone_mbuf, &args, how); | |||||
MBUF_PROBE3(m__get_raw, how, type, m); | |||||
return (m); | |||||
} | |||||
static __inline struct mbuf * | |||||
m_get(int how, short type) | m_get(int how, short type) | ||||
{ | { | ||||
struct mbuf *m; | struct mbuf *m; | ||||
struct mb_args args; | struct mb_args args; | ||||
args.flags = 0; | args.flags = 0; | ||||
args.type = type; | args.type = type; | ||||
m = uma_zalloc_arg(zone_mbuf, &args, how); | m = uma_zalloc_arg(zone_mbuf, &args, how); | ||||
MBUF_PROBE3(m__get, how, type, m); | MBUF_PROBE3(m__get, how, type, m); | ||||
return (m); | |||||
} | |||||
static __inline struct mbuf * | |||||
m_gethdr_raw(int how, short type) | |||||
{ | |||||
struct mbuf *m; | |||||
struct mb_args args; | |||||
args.flags = M_PKTHDR; | |||||
args.type = type | MT_NOINIT; | |||||
m = uma_zalloc_arg(zone_mbuf, &args, how); | |||||
MBUF_PROBE3(m__gethdr_raw, how, type, m); | |||||
return (m); | return (m); | ||||
} | } | ||||
static __inline struct mbuf * | static __inline struct mbuf * | ||||
m_gethdr(int how, short type) | m_gethdr(int how, short type) | ||||
{ | { | ||||
struct mbuf *m; | struct mbuf *m; | ||||
struct mb_args args; | struct mb_args args; | ||||
▲ Show 20 Lines • Show All 667 Lines • Show Last 20 Lines |