Date: Thu, 22 Nov 2012 21:48:09 +0100 From: =?ISO-8859-1?Q?Ermal_Lu=E7i?= <eri@freebsd.org> To: Andre Oppermann <andre@freebsd.org> Cc: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: Re: svn commit: r243414 - user/andre/tcp_workqueue/sys/net Message-ID: <CAPBZQG1kYUNBhX5=P=Ja9rPuT45rizXP6sq%2BZP0fv13mD7nJUw@mail.gmail.com> In-Reply-To: <201211222043.qAMKh9Zs060179@svn.freebsd.org> References: <201211222043.qAMKh9Zs060179@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hello Andre, you plan to introduce pfil(9) at layer2 as well? On Thu, Nov 22, 2012 at 9:43 PM, Andre Oppermann <andre@freebsd.org> wrote: > Author: andre > Date: Thu Nov 22 20:43:09 2012 > New Revision: 243414 > URL: http://svnweb.freebsd.org/changeset/base/243414 > > Log: > Internalize pfil_hook_get(). There are no outside consumers > of this API, it is only safe for internal use and even the > pfil(9) man page says so in the BUGS section. > > Remember to adjust the pfil(9) man page. > > Modified: > user/andre/tcp_workqueue/sys/net/pfil.c > user/andre/tcp_workqueue/sys/net/pfil.h > > Modified: user/andre/tcp_workqueue/sys/net/pfil.c > > ============================================================================== > --- user/andre/tcp_workqueue/sys/net/pfil.c Thu Nov 22 20:23:46 2012 > (r243413) > +++ user/andre/tcp_workqueue/sys/net/pfil.c Thu Nov 22 20:43:09 2012 > (r243414) > @@ -74,6 +74,18 @@ pfil_run_hooks(struct pfil_head *ph, str > return (pfil_run_inject(ph, mp, ifp, dir, inp, 0)); > } > > +static struct packet_filter_hook * > +pfil_hook_get(int dir, struct pfil_head *ph) > +{ > + > + if (dir == PFIL_IN) > + return (TAILQ_FIRST(&ph->ph_in)); > + else if (dir == PFIL_OUT) > + return (TAILQ_FIRST(&ph->ph_out)); > + else > + return (NULL); > +} > + > int > pfil_run_inject(struct pfil_head *ph, struct mbuf **mp, struct ifnet *ifp, > int dir, struct inpcb *inp, int cookie) > > Modified: user/andre/tcp_workqueue/sys/net/pfil.h > > ============================================================================== > --- user/andre/tcp_workqueue/sys/net/pfil.h Thu Nov 22 20:23:46 2012 > (r243413) > +++ user/andre/tcp_workqueue/sys/net/pfil.h Thu Nov 22 20:43:09 2012 > (r243414) > @@ -141,16 +141,4 @@ struct pfil_head *pfil_head_get(int, u_l > #define PFIL_LIST_LOCK() mtx_lock(&pfil_global_lock) > #define PFIL_LIST_UNLOCK() mtx_unlock(&pfil_global_lock) > > -static __inline struct packet_filter_hook * > -pfil_hook_get(int dir, struct pfil_head *ph) > -{ > - > - if (dir == PFIL_IN) > - return (TAILQ_FIRST(&ph->ph_in)); > - else if (dir == PFIL_OUT) > - return (TAILQ_FIRST(&ph->ph_out)); > - else > - return (NULL); > -} > - > #endif /* _NET_PFIL_H_ */ > -- Ermal
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPBZQG1kYUNBhX5=P=Ja9rPuT45rizXP6sq%2BZP0fv13mD7nJUw>