From owner-svn-soc-all@FreeBSD.ORG Tue Aug 12 08:41:16 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6FBCE902 for ; Tue, 12 Aug 2014 08:41:16 +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 41CF12A8A for ; Tue, 12 Aug 2014 08:41:16 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7C8fGEs059579 for ; Tue, 12 Aug 2014 08:41:16 GMT (envelope-from dpl@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id s7C8fFdU059562 for svn-soc-all@FreeBSD.org; Tue, 12 Aug 2014 08:41:15 GMT (envelope-from dpl@FreeBSD.org) Date: Tue, 12 Aug 2014 08:41:15 GMT Message-Id: <201408120841.s7C8fFdU059562@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: r272256 - 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: Tue, 12 Aug 2014 08:41:16 -0000 Author: dpl Date: Tue Aug 12 08:41:15 2014 New Revision: 272256 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=272256 Log: Moved all the packet matching part into a function to be used as compiled bitcode. As a side effect, we now have taken out PULLUP_TO/PULLUP_LEN out of ip_fw2.c. Modified: soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw_rules.h soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/jit.cc Modified: soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw_rules.h ============================================================================== --- soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw_rules.h Tue Aug 12 02:09:00 2014 (r272255) +++ soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw_rules.h Tue Aug 12 08:41:15 2014 (r272256) @@ -42,8 +42,8 @@ struct ip_fw_chain; struct ip_fw; struct ipfw_insn; -ipfw_insn_if; -ipfw_dyn_rule; +struct _ipfw_insn_if; +struct _ipfw_dyn_rule; #ifndef __FreeBSD__ struct bsd_ucred; @@ -54,6 +54,11 @@ // Functions used by JIT, external. int printf(const char * restrict format, ...); +static VNET_DEFINE(int, fw_deny_unknown_exthdrs); +#define V_fw_deny_unknown_exthdrs VNET(fw_deny_unknown_exthdrs) + +static VNET_DEFINE(int, fw_permit_single_frag6) = 1; +#define V_fw_permit_single_frag6 VNET(fw_permit_single_frag6) /* * Some macros used in the various matching options. Modified: soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/jit.cc ============================================================================== --- soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/jit.cc Tue Aug 12 02:09:00 2014 (r272255) +++ soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/jit.cc Tue Aug 12 08:41:15 2014 (r272256) @@ -158,8 +158,8 @@ ip_fw_argsTy = mod->getTypeByName("ip_fw_args"); ip_fw_chainTy = mod->getTypeByName("ip_fw_chain"); ip_fwTy = mod->getTypeByName("ip_fw"); - ip_fw_insnTy = mod->getTypeByName("ip_fw_insn"); - ipfw_insn_ifTy = mod->getTypeByName("ipfw_insn_if"); + ip_fw_insnTy = mod->getTypeByName("_ip_fw_insn"); + ipfw_insn_ifTy = mod->getTypeByName("_ipfw_insn_if"); mbufTy = mod->getTypeByName("mbuf"); #ifndef __FreeBSD__ ucredTy = mod->getTypeByName("bsd_ucred");