From owner-svn-src-user@FreeBSD.ORG Thu Nov 22 20:43:09 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EE121457; Thu, 22 Nov 2012 20:43:09 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id BB2A68FC13; Thu, 22 Nov 2012 20:43:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAMKh9n2060181; Thu, 22 Nov 2012 20:43:09 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAMKh9Zs060179; Thu, 22 Nov 2012 20:43:09 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201211222043.qAMKh9Zs060179@svn.freebsd.org> From: Andre Oppermann Date: Thu, 22 Nov 2012 20:43:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r243414 - user/andre/tcp_workqueue/sys/net X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Nov 2012 20:43:10 -0000 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_ */