[Xorp-cvs] XORP cvs commit: xorp/bgp xorp/etc/templates xorp/fib2mrib xorp/policy xorp/policy/backend xorp/policy/common xorp/policy/test xorp/rib xorp/rip xorp/static_routes xorp/xrl/interfaces xorp/xrl/targets

Andrea Bittau abittau@icir.org
Sun, 2 Oct 2005 22:21:58 GMT


CVSROOT:	/usr/local/www/data/cvs
Module name:	xorp
Changes by:	abittau@xorpc.icir.org	2005-10-02 22:21:58 UTC

XORP CVS repository


Modified files:
	bgp           bgp_varrw.cc bgp_varrw.hh bgp_varrw_export.cc 
	              bgp_varrw_export.hh route_table_policy.cc 
	              route_table_policy.hh route_table_policy_ex.cc 
	              route_table_policy_ex.hh xrl_target.cc 
	etc/templates bgp.tp rip.tp ripng.tp static_routes.tp 
	fib2mrib      fib2mrib_varrw.cc fib2mrib_varrw.hh 
	policy        code_generator.cc code_generator.hh 
	              configuration.cc configuration.hh 
	              export_code_generator.cc export_code_generator.hh 
	              filter_manager.cc node.hh policy_list.cc 
	              policy_target.cc policy_target.hh semantic_varrw.cc 
	              semantic_varrw.hh source_match_code_generator.cc 
	              source_match_code_generator.hh var_map.cc 
	              var_map.hh visitor.hh visitor_semantic.cc 
	              visitor_semantic.hh xrl_target.cc xrl_target.hh 
	policy/backend Makefile.am Makefile.in backend.y instruction.hh 
	               iv_exec.cc iv_exec.hh policy_filter.cc 
	               policy_filter.hh policy_instr.hh policytags.cc 
	               single_varrw.cc single_varrw.hh term_instr.hh 
	               version_filter.cc version_filter.hh 
	               version_filters.cc version_filters.hh 
	               yacc.yy_policy_backend_parser.cc 
	policy/common Makefile.am Makefile.in dispatcher.cc dispatcher.hh 
	              elem_null.hh elem_set.cc elem_set.hh element.cc 
	              element.hh element_base.hh operator.hh 
	              operator_base.hh register_elements.cc 
	              register_operations.cc varrw.cc varrw.hh 
	policy/test   compilepolicy.cc file_varrw.cc file_varrw.hh 
	              policy1.var policy2.var policyvarmap.conf 
	rib           rib_varrw.cc rib_varrw.hh 
	rip           rip_varrw.cc rip_varrw.hh 
	static_routes static_routes_varrw.cc static_routes_varrw.hh 
	xrl/interfaces policy.xif policy_xif.cc policy_xif.hh 
	xrl/targets   policy.xrls policy_base.cc policy_base.hh 

Added files:
	policy/common elem_bgp.hh elem_filter.hh operator.cc 

Log message:
	First optimization pass for policy.
	
	Once upon at time:
	abittau[53c:68%]bgp$ ./policy_test 100000 policy_papername.txt
	Creating routes
	Owning...
	Elapsed: 27365ms
	abittau[66c:72%]bgp$
	
	Now:
	abittau[60c:100%]bgp$ ./policy_test 100000 policy_paper20.txt
	Creating routes
	Owning...
	Elapsed: 4117ms
	abittau[60c:100%]bgp$
	
	With -O2 -march=pentium4, it takes about 2 seconds.
	
	The program will filter 100000 against a bgp import policy which looks like:
	from {
	        network4 != 10.0.0.0/24;
	        nexthop4 != 10.0.66.1;
	}
	then {
	        as-path-prepend: 6234;
	        med += 1;
	}
	
	Let me know what breaks.  The yacc generated file for the Windows port will
	break for example.

Revision  Changes                                  Path
1.20      +129 -86;  commitid: 139cf43405c957ea6;  xorp/bgp/bgp_varrw.cc
1.13      +34 -13;  commitid: 139cf43405c957ea6;   xorp/bgp/bgp_varrw.hh
1.3       +3 -4;  commitid: 139cf43405c957ea6;     xorp/bgp/bgp_varrw_export.cc
1.2       +2 -5;  commitid: 139cf43405c957ea6;     xorp/bgp/bgp_varrw_export.hh
1.19      +24 -26;  commitid: 139cf43405c957ea6;   xorp/bgp/route_table_policy.cc
1.7       +4 -11;  commitid: 139cf43405c957ea6;    xorp/bgp/route_table_policy.hh
1.2       +6 -8;  commitid: 139cf43405c957ea6;     xorp/bgp/route_table_policy_ex.cc
1.2       +3 -10;  commitid: 139cf43405c957ea6;    xorp/bgp/route_table_policy_ex.hh
1.40      +3 -1;  commitid: 139cf43405c957ea6;     xorp/bgp/xrl_target.cc
1.56      +19 -14;  commitid: 139cf43405c957ea6;   xorp/etc/templates/bgp.tp
1.25      +6 -6;  commitid: 139cf43405c957ea6;     xorp/etc/templates/rip.tp
1.25      +5 -5;  commitid: 139cf43405c957ea6;     xorp/etc/templates/ripng.tp
1.24      +3 -3;  commitid: 139cf43405c957ea6;     xorp/etc/templates/static_routes.tp
1.6       +14 -14;  commitid: 139cf43405c957ea6;   xorp/fib2mrib/fib2mrib_varrw.cc
1.5       +11 -3;  commitid: 139cf43405c957ea6;    xorp/fib2mrib/fib2mrib_varrw.hh
1.6       +4 -2;  commitid: 139cf43405c957ea6;     xorp/policy/backend/Makefile.am
1.9       +5 -4;  commitid: 139cf43405c957ea6;     xorp/policy/backend/Makefile.in
1.7       +15 -2;  commitid: 139cf43405c957ea6;    xorp/policy/backend/backend.y
1.5       +8 -7;  commitid: 139cf43405c957ea6;     xorp/policy/backend/instruction.hh
1.7       +114 -65;  commitid: 139cf43405c957ea6;  xorp/policy/backend/iv_exec.cc
1.6       +21 -20;  commitid: 139cf43405c957ea6;   xorp/policy/backend/iv_exec.hh
1.7       +5 -4;  commitid: 139cf43405c957ea6;     xorp/policy/backend/policy_filter.cc
1.5       +3 -1;  commitid: 139cf43405c957ea6;     xorp/policy/backend/policy_filter.hh
1.3       +25 -7;  commitid: 139cf43405c957ea6;    xorp/policy/backend/policy_instr.hh
1.6       +3 -2;  commitid: 139cf43405c957ea6;     xorp/policy/backend/policytags.cc
1.9       +42 -47;  commitid: 139cf43405c957ea6;   xorp/policy/backend/single_varrw.cc
1.6       +11 -17;  commitid: 139cf43405c957ea6;   xorp/policy/backend/single_varrw.hh
1.3       +25 -6;  commitid: 139cf43405c957ea6;    xorp/policy/backend/term_instr.hh
1.3       +16 -14;  commitid: 139cf43405c957ea6;   xorp/policy/backend/version_filter.cc
1.2       +3 -3;  commitid: 139cf43405c957ea6;     xorp/policy/backend/version_filter.hh
1.2       +4 -8;  commitid: 139cf43405c957ea6;     xorp/policy/backend/version_filters.cc
1.2       +1 -5;  commitid: 139cf43405c957ea6;     xorp/policy/backend/version_filters.hh
1.7       +51 -35;  commitid: 139cf43405c957ea6;   xorp/policy/backend/yacc.yy_policy_backend_parser.cc
1.7       +21 -7;  commitid: 139cf43405c957ea6;    xorp/policy/code_generator.cc
1.4       +13 -7;  commitid: 139cf43405c957ea6;    xorp/policy/code_generator.hh
1.5       +7 -3;  commitid: 139cf43405c957ea6;     xorp/policy/common/Makefile.am
1.8       +30 -7;  commitid: 139cf43405c957ea6;    xorp/policy/common/Makefile.in
1.8       +71 -71;  commitid: 139cf43405c957ea6;   xorp/policy/common/dispatcher.cc
1.6       +53 -43;  commitid: 139cf43405c957ea6;   xorp/policy/common/dispatcher.hh
1.1       +26 -0                                   xorp/policy/common/elem_bgp.hh (new)
1.1       +45 -0                                   xorp/policy/common/elem_filter.hh (new)
1.4       +8 -3;  commitid: 139cf43405c957ea6;     xorp/policy/common/elem_null.hh
1.8       +30 -4;  commitid: 139cf43405c957ea6;    xorp/policy/common/elem_set.cc
1.7       +8 -1;  commitid: 139cf43405c957ea6;     xorp/policy/common/elem_set.hh
1.6       +32 -4;  commitid: 139cf43405c957ea6;    xorp/policy/common/element.cc
1.7       +174 -40;  commitid: 139cf43405c957ea6;  xorp/policy/common/element.hh
1.3       +6 -17;  commitid: 139cf43405c957ea6;    xorp/policy/common/element_base.hh
1.1       +45 -0                                   xorp/policy/common/operator.cc (new)
1.5       +10 -11;  commitid: 139cf43405c957ea6;   xorp/policy/common/operator.hh
1.3       +9 -1;  commitid: 139cf43405c957ea6;     xorp/policy/common/operator_base.hh
1.8       +4 -1;  commitid: 139cf43405c957ea6;     xorp/policy/common/register_elements.cc
1.14      +67 -1;  commitid: 139cf43405c957ea6;    xorp/policy/common/register_operations.cc
1.5       +10 -4;  commitid: 139cf43405c957ea6;    xorp/policy/common/varrw.cc
1.7       +22 -7;  commitid: 139cf43405c957ea6;    xorp/policy/common/varrw.hh
1.10      +5 -3;  commitid: 139cf43405c957ea6;     xorp/policy/configuration.cc
1.8       +4 -2;  commitid: 139cf43405c957ea6;     xorp/policy/configuration.hh
1.6       +7 -6;  commitid: 139cf43405c957ea6;     xorp/policy/export_code_generator.cc
1.4       +4 -2;  commitid: 139cf43405c957ea6;     xorp/policy/export_code_generator.hh
1.5       +2 -2;  commitid: 139cf43405c957ea6;     xorp/policy/filter_manager.cc
1.6       +3 -2;  commitid: 139cf43405c957ea6;     xorp/policy/node.hh
1.5       +6 -6;  commitid: 139cf43405c957ea6;     xorp/policy/policy_list.cc
1.9       +5 -3;  commitid: 139cf43405c957ea6;     xorp/policy/policy_target.cc
1.8       +5 -2;  commitid: 139cf43405c957ea6;     xorp/policy/policy_target.hh
1.5       +4 -3;  commitid: 139cf43405c957ea6;     xorp/policy/semantic_varrw.cc
1.3       +4 -4;  commitid: 139cf43405c957ea6;     xorp/policy/semantic_varrw.hh
1.7       +13 -5;  commitid: 139cf43405c957ea6;    xorp/policy/source_match_code_generator.cc
1.5       +6 -2;  commitid: 139cf43405c957ea6;     xorp/policy/source_match_code_generator.hh
1.8       +7 -9;  commitid: 139cf43405c957ea6;     xorp/policy/test/compilepolicy.cc
1.5       +12 -7;  commitid: 139cf43405c957ea6;    xorp/policy/test/file_varrw.cc
1.3       +5 -11;  commitid: 139cf43405c957ea6;    xorp/policy/test/file_varrw.hh
1.4       +2 -2;  commitid: 139cf43405c957ea6;     xorp/policy/test/policy1.var
1.4       +3 -3;  commitid: 139cf43405c957ea6;     xorp/policy/test/policy2.var
1.3       +28 -28;  commitid: 139cf43405c957ea6;   xorp/policy/test/policyvarmap.conf
1.7       +60 -30;  commitid: 139cf43405c957ea6;   xorp/policy/var_map.cc
1.5       +26 -26;  commitid: 139cf43405c957ea6;   xorp/policy/var_map.hh
1.5       +1 -2;  commitid: 139cf43405c957ea6;     xorp/policy/visitor.hh
1.9       +23 -7;  commitid: 139cf43405c957ea6;    xorp/policy/visitor_semantic.cc
1.5       +8 -3;  commitid: 139cf43405c957ea6;     xorp/policy/visitor_semantic.hh
1.9       +4 -3;  commitid: 139cf43405c957ea6;     xorp/policy/xrl_target.cc
1.7       +3 -2;  commitid: 139cf43405c957ea6;     xorp/policy/xrl_target.hh
1.8       +14 -16;  commitid: 139cf43405c957ea6;   xorp/rib/rib_varrw.cc
1.7       +11 -6;  commitid: 139cf43405c957ea6;    xorp/rib/rib_varrw.hh
1.7       +21 -21;  commitid: 139cf43405c957ea6;   xorp/rip/rip_varrw.cc
1.7       +13 -4;  commitid: 139cf43405c957ea6;    xorp/rip/rip_varrw.hh
1.7       +14 -14;  commitid: 139cf43405c957ea6;   xorp/static_routes/static_routes_varrw.cc
1.6       +10 -3;  commitid: 139cf43405c957ea6;    xorp/static_routes/static_routes_varrw.hh
1.7       +4 -2;  commitid: 139cf43405c957ea6;     xorp/xrl/interfaces/policy.xif
1.9       +3 -1;  commitid: 139cf43405c957ea6;     xorp/xrl/interfaces/policy_xif.cc
1.8       +4 -1;  commitid: 139cf43405c957ea6;     xorp/xrl/interfaces/policy_xif.hh
1.9       +4 -2;  commitid: 139cf43405c957ea6;     xorp/xrl/targets/policy.xrls
1.9       +5 -4;  commitid: 139cf43405c957ea6;     xorp/xrl/targets/policy_base.cc
1.9       +5 -2;  commitid: 139cf43405c957ea6;     xorp/xrl/targets/policy_base.hh