Hello, this change is required to unhook pf(4) from NET_LOCK(). therefore I'd like to get it in.
On Mon, Nov 07, 2022 at 04:51:59AM +1000, David Gwynne wrote: > > > > On 7 Nov 2022, at 4:12 am, Alexandr Nedvedicky <sas...@fastmail.net> wrote: > > > > Hello, > > > > diff below is the first step to make pfioctl() _without_ NET_LOCK(). > > Currently pf_if.c seems to be the only blocker which prevents us > > from removing all NET_LOCK()/NET_UNLOCK() calls we have in pf(4). > > > > diff below passed very basic smoke test. OK to commit? > > > > > > thanks and > > regards > > sashan > > > > --------8<---------------8<---------------8<------------------8<-------- > > diff --git a/sys/net/pf_if.c b/sys/net/pf_if.c > > index e23c14e6769..e86d85aa2c4 100644 > > --- a/sys/net/pf_if.c > > +++ b/sys/net/pf_if.c > > @@ -53,10 +53,17 @@ > > > > #include <net/pfvar.h> > > > > +#include <netinet/ip_icmp.h> > > +#include <netinet/tcp.h> > > +#include <netinet/udp.h> > > do we need this chunk? > chunk above is required. It got sucked as a dependency for pfvar_priv.h We need pfvar_priv.h because it provides definitions for PF_LOCK(). With PF_LOCK() we are also getting definition of pf_pdesc, which requires header files above. thanks and regards sashan