-# $OpenBSD: GENERIC.MP,v 1.15 2021/02/04 00:55:41 sashan Exp $
+# $OpenBSD: GENERIC.MP,v 1.16 2021/02/09 14:06:19 patrick Exp $
include "arch/amd64/conf/GENERIC"
-#option WITH_PF_LOCK
option MULTIPROCESSOR
#option MP_LOCKDEBUG
#option WITNESS
-/* $OpenBSD: if_pfsync.c,v 1.283 2021/02/04 00:55:41 sashan Exp $ */
+/* $OpenBSD: if_pfsync.c,v 1.284 2021/02/09 14:06:19 patrick Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff
void pfsync_grab_snapshot(struct pfsync_snapshot *, struct pfsync_softc *);
void pfsync_drop_snapshot(struct pfsync_snapshot *);
-#ifdef WITH_PF_LOCK
void pfsync_send_dispatch(void *);
void pfsync_send_pkt(struct mbuf *);
static struct mbuf_queue pfsync_mq;
static struct task pfsync_task =
TASK_INITIALIZER(pfsync_send_dispatch, &pfsync_mq);
-#endif /* WITH_PF_LOCK */
#define PFSYNC_MAX_BULKTRIES 12
int pfsync_sync_ok;
{
if_clone_attach(&pfsync_cloner);
pfsynccounters = counters_alloc(pfsyncs_ncounters);
-#ifdef WITH_PF_LOCK
mq_init(&pfsync_mq, 4096, IPL_SOFTNET);
-#endif /* WITH_PF_LOCK */
}
int
pfsync_drop_snapshot(&sn);
}
-#ifdef WITH_PF_LOCK
void
pfsync_send_dispatch(void *xmq)
{
} else
task_add(net_tq(0), &pfsync_task);
}
-#endif /* WITH_PF_LOCK */
void
pfsync_sendout(void)
m->m_pkthdr.ph_rtableid = sc->sc_if.if_rdomain;
-#ifdef WITH_PF_LOCK
pfsync_send_pkt(m);
-#else /* !WITH_PF_LOCK */
- if (ip_output(m, NULL, NULL, IP_RAWOUTPUT, &sc->sc_imo, NULL, 0) == 0)
- pfsyncstat_inc(pfsyncs_opackets);
- else
- pfsyncstat_inc(pfsyncs_oerrors);
-#endif /* WITH_PF_LOCK */
}
void
-/* $OpenBSD: pf_ioctl.c,v 1.361 2020/12/16 18:00:44 kn Exp $ */
+/* $OpenBSD: pf_ioctl.c,v 1.362 2021/02/09 14:06:19 patrick Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
TAILQ_HEAD(pf_tags, pf_tagname) pf_tags = TAILQ_HEAD_INITIALIZER(pf_tags),
pf_qids = TAILQ_HEAD_INITIALIZER(pf_qids);
-#ifdef WITH_PF_LOCK
/*
* pf_lock protects consistency of PF data structures, which don't have
* their dedicated lock yet. The pf_lock currently protects:
*/
struct rwlock pf_lock = RWLOCK_INITIALIZER("pf_lock");
struct rwlock pf_state_lock = RWLOCK_INITIALIZER("pf_state_lock");
-#endif /* WITH_PF_LOCK */
#if (PF_QNAME_SIZE != PF_TAG_NAME_SIZE)
#error PF_QNAME_SIZE must be equal to PF_TAG_NAME_SIZE
-/* $OpenBSD: pf_norm.c,v 1.219 2020/06/24 22:03:43 cheloha Exp $ */
+/* $OpenBSD: pf_norm.c,v 1.220 2021/02/09 14:06:19 patrick Exp $ */
/*
* Copyright 2001 Niels Provos <provos@citi.umich.edu>
struct pool pf_state_scrub_pl;
int pf_nfrents;
-#ifdef WITH_PF_LOCK
struct mutex pf_frag_mtx;
#define PF_FRAG_LOCK_INIT() mtx_init(&pf_frag_mtx, IPL_SOFTNET)
#define PF_FRAG_LOCK() mtx_enter(&pf_frag_mtx)
#define PF_FRAG_UNLOCK() mtx_leave(&pf_frag_mtx)
-#else /* !WITH_PF_LOCK */
-#define PF_FRAG_LOCK_INIT() (void)(0)
-#define PF_FRAG_LOCK() (void)(0)
-#define PF_FRAG_UNLOCK() (void)(0)
-#endif /* WITH_PF_LOCK */
void
pf_normalize_init(void)
-/* $OpenBSD: pfvar_priv.h,v 1.5 2018/09/11 07:53:38 sashan Exp $ */
+/* $OpenBSD: pfvar_priv.h,v 1.6 2021/02/09 14:06:19 patrick Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
struct pf_state *pf_state_ref(struct pf_state *);
void pf_state_unref(struct pf_state *);
-#ifdef WITH_PF_LOCK
extern struct rwlock pf_lock;
extern struct rwlock pf_state_lock;
rw_status(&pf_state_lock), __func__);\
} while (0)
-#else /* !WITH_PF_LOCK */
-#define PF_LOCK() (void)(0)
-#define PF_UNLOCK() (void)(0)
-#define PF_ASSERT_LOCKED() (void)(0)
-#define PF_ASSERT_UNLOCKED() (void)(0)
-
-#define PF_STATE_ENTER_READ() (void)(0)
-#define PF_STATE_EXIT_READ() (void)(0)
-#define PF_STATE_ENTER_WRITE() (void)(0)
-#define PF_STATE_EXIT_WRITE() (void)(0)
-#define PF_ASSERT_STATE_LOCKED() (void)(0)
-
-#endif /* WITH_PF_LOCK */
-
extern void pf_purge_timeout(void *);
extern void pf_purge(void *);
#endif /* _KERNEL */