From owner-svn-soc-all@FreeBSD.ORG Wed Jul 30 15:58:44 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48091374 for ; Wed, 30 Jul 2014 15:58:44 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B9E021AD for ; Wed, 30 Jul 2014 15:58:44 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id s6UFwhAr035675 for ; Wed, 30 Jul 2014 15:58:43 GMT (envelope-from dpl@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id s6UFwh4M035657 for svn-soc-all@FreeBSD.org; Wed, 30 Jul 2014 15:58:43 GMT (envelope-from dpl@FreeBSD.org) Date: Wed, 30 Jul 2014 15:58:43 GMT Message-Id: <201407301558.s6UFwh4M035657@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to dpl@FreeBSD.org using -f From: dpl@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271606 - soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jul 2014 15:58:44 -0000 Author: dpl Date: Wed Jul 30 15:58:42 2014 New Revision: 271606 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271606 Log: Removed unneeded rule. Modified: soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw2.c soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw_rules.h Modified: soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw2.c Wed Jul 30 14:52:26 2014 (r271605) +++ soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw2.c Wed Jul 30 15:58:42 2014 (r271606) @@ -663,7 +663,21 @@ IPFW_PF_RUNLOCK(chain); return (IP_FW_PASS); /* accept */ } - getfpos(args, chain, &f_pos); + if (args->rule.slot) { + /* + * Packet has already been tagged as a result of a previous + * match on rule args->rule aka args->rule_id (PIPE, QUEUE, + * REASS, NETGRAPH, DIVERT/TEE...) + * Validate the slot and continue from the next one + * if still present, otherwise do a lookup. + */ + f_pos = (args->rule.chain_id == chain->id) ? + args->rule.slot : + ipfw_find_rule(chain, args->rule.rulenum, + args->rule.rule_id); + } else { + f_pos = 0; + } /* * Now scan the rules, and parse microinstructions for each rule. Modified: soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw_rules.h ============================================================================== --- soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw_rules.h Wed Jul 30 14:52:26 2014 (r271605) +++ soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw_rules.h Wed Jul 30 15:58:42 2014 (r271606) @@ -1924,28 +1924,3 @@ } *done = 1; /* exit outer loop */ } - -/* - * Function to be called just after - * lockcheckvnet(); - */ -static IPFW_RULES_INLINE int -getfpos(struct ip_fw_args *args, struct ip_fw_chain *chain, int *f_pos) -{ - if (args->rule.slot) { - /* - * Packet has already been tagged as a result of a previous - * match on rule args->rule aka args->rule_id (PIPE, QUEUE, - * REASS, NETGRAPH, DIVERT/TEE...) - * Validate the slot and continue from the next one - * if still present, otherwise do a lookup. - */ - *f_pos = (args->rule.chain_id == chain->id) ? - args->rule.slot : - ipfw_find_rule(chain, args->rule.rulenum, - args->rule.rule_id); - } else { - *f_pos = 0; - } - return (*f_pos); -}