Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Jun 2018 10:34:45 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r335362 - head/sys/net
Message-ID:  <201806191034.w5JAYjpx098593@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ae
Date: Tue Jun 19 10:34:45 2018
New Revision: 335362
URL: https://svnweb.freebsd.org/changeset/base/335362

Log:
  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.

Modified:
  head/sys/net/bpf.c
  head/sys/net/bpfdesc.h

Modified: head/sys/net/bpf.c
==============================================================================
--- head/sys/net/bpf.c	Tue Jun 19 05:28:14 2018	(r335361)
+++ head/sys/net/bpf.c	Tue Jun 19 10:34:45 2018	(r335362)
@@ -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 */

Modified: head/sys/net/bpfdesc.h
==============================================================================
--- head/sys/net/bpfdesc.h	Tue Jun 19 05:28:14 2018	(r335361)
+++ head/sys/net/bpfdesc.h	Tue Jun 19 10:34:45 2018	(r335362)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806191034.w5JAYjpx098593>