From owner-svn-src-user@FreeBSD.ORG Thu Nov 22 20:48:11 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 1F9566C9; Thu, 22 Nov 2012 20:48:11 +0000 (UTC) (envelope-from ermal.luci@gmail.com) Received: from mail-qc0-f182.google.com (mail-qc0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 90DF78FC0C; Thu, 22 Nov 2012 20:48:10 +0000 (UTC) Received: by mail-qc0-f182.google.com with SMTP id k19so7628600qcs.13 for ; Thu, 22 Nov 2012 12:48:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=/5G546lDgIM+SD23BBnJ7C+toXI5RHW4Ev8eK0sSZUk=; b=p92Ev6MEb+TVckFcU6h3tqEoksnGeMAJuW79F8aMwqRBWkn4kDQ4fgPLvAO8KRWRIa F4FtwIZUcscXCec24N9ZADZqpaMT6dNdcogu+0W1NGiNVRa4flSMgP2Ju/Ln1lOW69lT NSydu6LlHQNFtQtFYh9hiqXr9hllK8Dm9mpcL3BeIyLRl8xNnPVO1pQIUIjMKJuqYuXJ TCOJWkEPQbpHXZTAljFPemcL/af6Vkb0cav6Mj1QN+1yRiflTa9uCNWtYqPobQb+qSsp pN+8TKTK+aTo18cBMyWvXgv5E+b8cYG2fKgCCcf2Tx8RFzt6zdhyDDy8bIJOA4WQYqDs PP/A== MIME-Version: 1.0 Received: by 10.229.196.96 with SMTP id ef32mr378232qcb.101.1353617289717; Thu, 22 Nov 2012 12:48:09 -0800 (PST) Sender: ermal.luci@gmail.com Received: by 10.49.121.163 with HTTP; Thu, 22 Nov 2012 12:48:09 -0800 (PST) In-Reply-To: <201211222043.qAMKh9Zs060179@svn.freebsd.org> References: <201211222043.qAMKh9Zs060179@svn.freebsd.org> Date: Thu, 22 Nov 2012 21:48:09 +0100 X-Google-Sender-Auth: Qg7EZdepfjdMx2bSYgroW6DpGZU Message-ID: Subject: Re: svn commit: r243414 - user/andre/tcp_workqueue/sys/net From: =?ISO-8859-1?Q?Ermal_Lu=E7i?= To: Andre Oppermann Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: src-committers@freebsd.org, svn-src-user@freebsd.org 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:48:11 -0000 Hello Andre, you plan to introduce pfil(9) at layer2 as well? On Thu, Nov 22, 2012 at 9:43 PM, Andre Oppermann 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