Page MenuHomeFreeBSD

D53869.id.diff
No OneTemporary

D53869.id.diff

diff --git a/sys/net/bpf.c b/sys/net/bpf.c
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -102,7 +102,7 @@
struct bpf_if {
struct bpfd_list bif_dlist; /* list of all interfaces */
- CK_LIST_ENTRY(bpf_if) bif_next; /* descriptor list */
+ LIST_ENTRY(bpf_if) bif_next; /* descriptor list */
u_int bif_dlt; /* link layer type */
u_int bif_hdrlen; /* length of link header */
struct bpfd_list bif_wlist; /* writer-only list */
@@ -180,8 +180,8 @@
* structures registered by different layers in the stack (i.e., 802.11
* frames, ethernet frames, etc).
*/
-CK_LIST_HEAD(bpf_iflist, bpf_if);
-static struct bpf_iflist bpf_iflist = CK_LIST_HEAD_INITIALIZER();
+LIST_HEAD(bpf_iflist, bpf_if);
+static struct bpf_iflist bpf_iflist = LIST_HEAD_INITIALIZER();
static struct sx bpf_sx; /* bpf global lock */
static void bpfif_ref(struct bpf_if *);
@@ -2083,7 +2083,7 @@
/*
* Look through attached interfaces for the named one.
*/
- CK_LIST_FOREACH(bp, &bpf_iflist, bif_next) {
+ LIST_FOREACH(bp, &bpf_iflist, bif_next) {
if (bp->bif_ifp == theywant &&
bp->bif_bpf == &theywant->if_bpf)
break;
@@ -2804,7 +2804,7 @@
*/
if_ref(ifp);
BPF_LOCK();
- CK_LIST_INSERT_HEAD(&bpf_iflist, bp, bif_next);
+ LIST_INSERT_HEAD(&bpf_iflist, bp, bif_next);
BPF_UNLOCK();
if (bootverbose && IS_DEFAULT_VNET(curvnet))
@@ -2822,7 +2822,7 @@
struct bpf_d *d;
BPF_LOCK();
- CK_LIST_FOREACH(bp, &bpf_iflist, bif_next) {
+ LIST_FOREACH(bp, &bpf_iflist, bif_next) {
if (bp->bif_ifp != ifp)
continue;
@@ -2853,11 +2853,11 @@
BPF_LOCK();
/* Find all bpf_if struct's which reference ifp and detach them. */
- CK_LIST_FOREACH_SAFE(bp, &bpf_iflist, bif_next, bp_temp) {
+ LIST_FOREACH_SAFE(bp, &bpf_iflist, bif_next, bp_temp) {
if (ifp != bp->bif_ifp)
continue;
- CK_LIST_REMOVE(bp, bif_next);
+ LIST_REMOVE(bp, bif_next);
*bp->bif_bpf = __DECONST(struct bpf_if *, &dead_bpf_if);
CTR4(KTR_NET,
@@ -2899,7 +2899,7 @@
ifp = d->bd_bif->bif_ifp;
n1 = 0;
- CK_LIST_FOREACH(bp, &bpf_iflist, bif_next) {
+ LIST_FOREACH(bp, &bpf_iflist, bif_next) {
if (bp->bif_ifp == ifp)
n1++;
}
@@ -2912,7 +2912,7 @@
lst = malloc(n1 * sizeof(u_int), M_TEMP, M_WAITOK);
n = 0;
- CK_LIST_FOREACH(bp, &bpf_iflist, bif_next) {
+ LIST_FOREACH(bp, &bpf_iflist, bif_next) {
if (bp->bif_ifp != ifp)
continue;
lst[n++] = bp->bif_dlt;
@@ -2944,7 +2944,7 @@
return (0);
ifp = d->bd_bif->bif_ifp;
- CK_LIST_FOREACH(bp, &bpf_iflist, bif_next) {
+ LIST_FOREACH(bp, &bpf_iflist, bif_next) {
if (bp->bif_ifp == ifp && bp->bif_dlt == dlt)
break;
}
@@ -2991,7 +2991,7 @@
* We are protected by global lock here, interfaces and
* descriptors can not be deleted while we hold it.
*/
- CK_LIST_FOREACH(bp, &bpf_iflist, bif_next) {
+ LIST_FOREACH(bp, &bpf_iflist, bif_next) {
CK_LIST_FOREACH(bd, &bp->bif_dlist, bd_next) {
counter_u64_zero(bd->bd_rcount);
counter_u64_zero(bd->bd_dcount);
@@ -3079,7 +3079,7 @@
}
bpfd_cnt = 0;
BPF_LOCK();
- CK_LIST_FOREACH(bp, &bpf_iflist, bif_next) {
+ LIST_FOREACH(bp, &bpf_iflist, bif_next) {
CK_LIST_FOREACH(bd, &bp->bif_wlist, bd_next)
bpfd_cnt++;
CK_LIST_FOREACH(bd, &bp->bif_dlist, bd_next)
@@ -3095,7 +3095,7 @@
}
xbdbuf = malloc(req->oldlen, M_BPF, M_WAITOK);
index = 0;
- CK_LIST_FOREACH(bp, &bpf_iflist, bif_next) {
+ LIST_FOREACH(bp, &bpf_iflist, bif_next) {
MPASS(index <= bpfd_cnt);
/* Send writers-only first */
CK_LIST_FOREACH(bd, &bp->bif_wlist, bd_next) {

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 23, 3:22 AM (16 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25992632
Default Alt Text
D53869.id.diff (3 KB)

Event Timeline