From owner-svn-soc-all@FreeBSD.ORG Thu Sep 18 14:45:09 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 BB95C8B9 for ; Thu, 18 Sep 2014 14:45:09 +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 8E92AED7 for ; Thu, 18 Sep 2014 14:45:09 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8IEj9Lb027955 for ; Thu, 18 Sep 2014 14:45:09 GMT (envelope-from dpl@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id s8IEj96W027950 for svn-soc-all@FreeBSD.org; Thu, 18 Sep 2014 14:45:09 GMT (envelope-from dpl@FreeBSD.org) Date: Thu, 18 Sep 2014 14:45:09 GMT Message-Id: <201409181445.s8IEj96W027950@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: r274311 - 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-1 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: Thu, 18 Sep 2014 14:45:09 -0000 Author: dpl Date: Thu Sep 18 14:45:08 2014 New Revision: 274311 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=274311 Log: Added the rule_macaddr2, rule_mac_type, rule_diverted, and rule_proto calls. Modified: soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/jit.cc Modified: soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/jit.cc ============================================================================== --- soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/jit.cc Thu Sep 18 14:32:05 2014 (r274310) +++ soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/jit.cc Thu Sep 18 14:45:08 2014 (r274311) @@ -1341,7 +1341,6 @@ Value *OpcodeL = Irb.CreateLoad(Opcode); // Opcode is u_int8 Value *OpcodeL32 = Irb.CreateZExt(OpcodeL, Int32Ty); - RuleForwardMac->dump(); Irb.CreateCall(RuleForwardMac, {OpcodeL32}); } @@ -1422,11 +1421,19 @@ void emit_macaddr2() { + // rule_macaddr2(&match, args, cmd); + Value *CmdL = Irb.CreateLoad(Cmd); + Irb.CreateCall(RuleMacaddr2, {Match, Args, CmdL}); } void emit_mac_type() { + // rule_mac_type(&match, args, cmd, cmdlen, etype); + Value *CmdL = Irb.CreateLoad(Cmd); + Value *CmdlenL = Irb.CreateLoad(Cmdlen); + Value *EtypeL = Irb.CreateLoad(Etype); + Irb.CreateCall(RuleMacType, {Match, Args, CmdL, CmdlenL, EtypeL}); } // XXX Exec not tested. @@ -1457,11 +1464,18 @@ void emit_diverted() { + // rule_diverted(&match, args, cmd); + Value *CmdL = Irb.CreateLoad(Cmd); + Irb.CreateCall(RuleDiverted, {Match, Args, CmdL}); } void emit_proto() { + // rule_proto(&match, proto, cmd); + Value *CmdL = Irb.CreateLoad(Cmd); + Value *ProtoL = Irb.CreateLoad(Proto); + Irb.CreateCall(RuleProto, {Match, ProtoL, CmdL}); } // XXX Exec not tested. @@ -1873,7 +1887,7 @@ compiler.emit_inner_for_prologue(); // Rule to test printf("Testing rule compilation\n"); - compiler.emit_forward_mac(); + compiler.emit_proto(); printf("emit_inner_for_epilogue()\n"); compiler.emit_inner_for_epilogue(); printf("emit_outer_for_epilogue()\n");