From ca3cd72b17ff331c0c9948065c4a40e24bd0dc6d Mon Sep 17 00:00:00 2001 From: "Andrey V. Elsukov" Date: Tue, 19 Jun 2018 10:34:45 +0000 Subject: [PATCH] Move BPFIF_* macro definitions into .c file, where struct bpf_if is declared. They are only used in this file and there is no need to export them via bpfdesc.h. --- sys/net/bpf.c | 5 +++++ sys/net/bpfdesc.h | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 841d4542163..3c9c99d2dc7 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -117,6 +117,11 @@ struct bpf_if { CTASSERT(offsetof(struct bpf_if, bif_ext) == 0); +#define BPFIF_RLOCK(bif) rw_rlock(&(bif)->bif_lock) +#define BPFIF_RUNLOCK(bif) rw_runlock(&(bif)->bif_lock) +#define BPFIF_WLOCK(bif) rw_wlock(&(bif)->bif_lock) +#define BPFIF_WUNLOCK(bif) rw_wunlock(&(bif)->bif_lock) + #if defined(DEV_BPF) || defined(NETGRAPH_BPF) #define PRINET 26 /* interruptible */ diff --git a/sys/net/bpfdesc.h b/sys/net/bpfdesc.h index 69180fa3b98..7d23e06ec3a 100644 --- a/sys/net/bpfdesc.h +++ b/sys/net/bpfdesc.h @@ -152,11 +152,6 @@ struct xbpf_d { u_int64_t bd_spare[4]; }; -#define BPFIF_RLOCK(bif) rw_rlock(&(bif)->bif_lock) -#define BPFIF_RUNLOCK(bif) rw_runlock(&(bif)->bif_lock) -#define BPFIF_WLOCK(bif) rw_wlock(&(bif)->bif_lock) -#define BPFIF_WUNLOCK(bif) rw_wunlock(&(bif)->bif_lock) - #define BPFIF_FLAG_DYING 1 /* Reject new bpf consumers */ #endif