svn commit: r243414 - user/andre/tcp_workqueue/sys/net
Ermal Luçi
eri at freebsd.org
Thu Nov 22 20:48:11 UTC 2012
Hello Andre,
you plan to introduce pfil(9) at layer2 as well?
On Thu, Nov 22, 2012 at 9:43 PM, Andre Oppermann <andre at 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
More information about the svn-src-user
mailing list