X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=vnet%2FMakefile.am;h=fd9c3e508b7e81d53415e343a514977a3f690846;hb=d575e69177cc1462658ec1de1149730e0ffb0425;hp=cf1fb1e0ab362562c0cff03188f86ca1f6de5c6b;hpb=e936bbe5945ca3c0f522f6c0abdfbdaa407bcb84;p=vpp.git diff --git a/vnet/Makefile.am b/vnet/Makefile.am index cf1fb1e0ab3..fd9c3e508b7 100644 --- a/vnet/Makefile.am +++ b/vnet/Makefile.am @@ -13,17 +13,25 @@ AUTOMAKE_OPTIONS = foreign subdir-objects -AM_CFLAGS = -Wall @DPDK@ @VIRL@ @IPSEC@ @VCGN@ @IPV6SR@ +AM_CFLAGS = -Wall @DPDK@ @IPSEC@ @IPV6SR@ libvnet_la_SOURCES = +libvnetplugin_la_SOURCES = nobase_include_HEADERS = noinst_PROGRAMS = +TESTS = + +dpdk_libs = +if WITH_DPDK +dpdk_libs += -l:libdpdk.a +endif ######################################## # Generic stuff ######################################## libvnet_la_SOURCES += \ vnet/config.c \ + vnet/handoff.c \ vnet/interface.c \ vnet/interface_cli.c \ vnet/interface_format.c \ @@ -37,11 +45,11 @@ nobase_include_HEADERS += \ vnet/buffer.h \ vnet/config.h \ vnet/global_funcs.h \ + vnet/handoff.h \ vnet/interface.h \ vnet/interface_funcs.h \ vnet/l3_types.h \ vnet/pipeline.h \ - vnet/plugin/plugin.h \ vnet/replication.h \ vnet/rewrite.h \ vnet/vnet.h @@ -57,6 +65,8 @@ libvnet_la_SOURCES += \ nobase_include_HEADERS += \ vnet/policer/police.h \ + vnet/policer/policer.h \ + vnet/policer/fix_types.h \ vnet/policer/xlate.h ######################################## @@ -81,7 +91,6 @@ nobase_include_HEADERS += \ ######################################## libvnet_la_SOURCES += \ vnet/ethernet/arp.c \ - vnet/ethernet/cli.c \ vnet/ethernet/format.c \ vnet/ethernet/init.c \ vnet/ethernet/interface.c \ @@ -114,6 +123,7 @@ libvnet_la_SOURCES += \ vnet/l2/l2_output_acl.c \ vnet/l2/l2_output.c \ vnet/l2/l2_patch.c \ + vnet/l2/l2_rw.c \ vnet/l2/l2_vtr.c \ vnet/l2/l2_xcrw.c @@ -129,6 +139,7 @@ nobase_include_HEADERS += \ vnet/l2/l2_bvi.h \ vnet/l2/l2_flood.h \ vnet/l2/l2_fib.h \ + vnet/l2/l2_rw.h \ vnet/l2/l2_xcrw.h \ vnet/l2/l2_classify.h @@ -224,11 +235,13 @@ libvnet_la_SOURCES += \ vnet/classify/vnet_classify.c \ vnet/classify/ip_classify.c \ vnet/classify/input_acl.c \ + vnet/classify/policer_classify.c \ vnet/classify/vnet_classify.h nobase_include_HEADERS += \ vnet/classify/vnet_classify.h \ - vnet/classify/input_acl.h + vnet/classify/input_acl.h \ + vnet/classify/policer_classify.h ######################################## # Layer 3 protocols go here @@ -238,17 +251,19 @@ nobase_include_HEADERS += \ # Layer 3 protocol: IP v4/v6 ######################################## libvnet_la_SOURCES += \ + vnet/ip/adj_alloc.c \ vnet/ip/format.c \ vnet/ip/icmp4.c \ vnet/ip/icmp6.c \ + vnet/ip/ip_feature_registration.c \ vnet/ip/ip46_cli.c \ vnet/ip/ip4_format.c \ vnet/ip/ip4_forward.c \ - vnet/ip/ip4_hop_by_hop.c \ vnet/ip/ip4_input.c \ vnet/ip/ip4_mtrie.c \ vnet/ip/ip4_pg.c \ vnet/ip/ip4_source_check.c \ + vnet/ip/ip4_source_and_port_range_check.c \ vnet/ip/ip6_format.c \ vnet/ip/ip6_forward.c \ vnet/ip/ip6_hop_by_hop.c \ @@ -267,12 +282,15 @@ libvnet_la_SOURCES += \ vnet/ip/ip_frag.c nobase_include_HEADERS += \ + vnet/ip/adj_alloc.h \ vnet/ip/format.h \ vnet/ip/icmp46_packet.h \ vnet/ip/icmp4.h \ vnet/ip/icmp6.h \ vnet/ip/igmp_packet.h \ vnet/ip/ip.h \ + vnet/ip/ip_feature_registration.h \ + vnet/ip/ip_source_and_port_range_check.h \ vnet/ip/ip4.h \ vnet/ip/ip4_mtrie.h \ vnet/ip/ip4_error.h \ @@ -339,15 +357,25 @@ libvnet_la_SOURCES += \ vnet/map/map.c \ vnet/map/ip4_map.c \ vnet/map/ip6_map.c \ - vnet/map/sixrd.c \ - vnet/map/ip4_sixrd.c \ - vnet/map/ip6_sixrd.c \ vnet/map/ip4_map_t.c \ vnet/map/ip6_map_t.c nobase_include_HEADERS += \ - vnet/map/map.h \ - vnet/map/sixrd.h + vnet/map/map.h + +if ENABLE_TESTS +TESTS += test_map +test_map_SOURCES = \ + vnet/map/test.c +test_map_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG + +test_map_LDADD = libvnet.la -lvppinfra -lvlib \ + -lpthread -lvlibmemory -lvlibapi -lvlib_unix \ + -ldl -lsvm -lrt + +test_map_LDFLAGS = -static +endif + ######################################## # Tunnel protocol: gre @@ -393,32 +421,77 @@ nobase_include_HEADERS += \ ######################################## -# Tunnel protocol: nsh-gre +# Tunnel protocol: vxlan-gpe ######################################## libvnet_la_SOURCES += \ - vnet/nsh-gre/nsh_gre.c \ - vnet/nsh-gre/encap.c \ - vnet/nsh-gre/decap.c + vnet/vxlan-gpe/vxlan_gpe.c \ + vnet/vxlan-gpe/encap.c \ + vnet/vxlan-gpe/decap.c + +nobase_include_HEADERS += \ + vnet/vxlan-gpe/vxlan_gpe.h \ + vnet/vxlan-gpe/vxlan_gpe_packet.h \ + vnet/vxlan-gpe/vxlan_gpe_error.def + +######################################## +# Tunnel protocol: ipsec+gre +######################################## +libvnet_la_SOURCES += \ + vnet/ipsec-gre/ipsec_gre.c \ + vnet/ipsec-gre/node.c \ + vnet/ipsec-gre/interface.c nobase_include_HEADERS += \ - vnet/nsh-gre/nsh_gre.h \ - vnet/nsh-gre/nsh_gre_packet.h \ - vnet/nsh-gre/nsh_gre_error.def + vnet/ipsec-gre/ipsec_gre.h \ + vnet/ipsec-gre/error.def ######################################## -# Tunnel protocol: nsh-vxlan-gpe +# LISP control plane: lisp-cp ######################################## libvnet_la_SOURCES += \ - vnet/nsh-vxlan-gpe/nsh_vxlan_gpe.c \ - vnet/nsh-vxlan-gpe/encap.c \ - vnet/nsh-vxlan-gpe/decap.c + vnet/lisp-cp/lisp_types.c \ + vnet/lisp-cp/control.c \ + vnet/lisp-cp/gid_dictionary.c \ + vnet/lisp-cp/lisp_msg_serdes.c \ + vnet/lisp-cp/packets.c nobase_include_HEADERS += \ - vnet/nsh-vxlan-gpe/nsh_vxlan_gpe.h \ - vnet/nsh-vxlan-gpe/vxlan_gpe_packet.h \ - vnet/nsh-vxlan-gpe/nsh_vxlan_gpe_error.def + vnet/lisp-cp/lisp_types.h \ + vnet/lisp-cp/packets.h \ + vnet/lisp-cp/gid_dictionary.h \ + vnet/lisp-cp/lisp_cp_messages.h \ + vnet/lisp-cp/lisp_msg_serdes.h \ + vnet/lisp-cp/control.h + + +if ENABLE_TESTS +LDS = -lvppinfra -l:libvlib.a $(dpdk_libs) -l:libvlibmemory.a \ + -l:libvlibapi.a -l:libsvm.a -lpthread -ldl -lrt -lm -l:libvlib_unix.a + +TESTS += test_cp_serdes test_lisp_types + +test_cp_serdes_SOURCES = \ + test/lisp-cp/test_cp_serdes.c \ + vnet/lisp-cp/lisp_msg_serdes.c \ + vnet/lisp-cp/lisp_types.c \ + vnet/lisp-cp/packets.c \ + vnet/ip/ip_checksum.c + +test_lisp_types_SOURCES = \ + test/lisp-cp/test_lisp_types.c \ + vnet/lisp-cp/lisp_types.c + +test_cp_serdes_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG +test_lisp_types_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG + +test_cp_serdes_LDADD = libvnet.la $(LDS) +test_lisp_types_LDADD = libvnet.la $(LDS) + +test_cp_serdes_LDFLAGS = -static +test_lisp_types_LDFLAGS = -static +endif ######################################## # Tunnel protocol: lisp-gpe @@ -426,13 +499,27 @@ nobase_include_HEADERS += \ libvnet_la_SOURCES += \ vnet/lisp-gpe/lisp_gpe.c \ - vnet/lisp-gpe/encap.c \ - vnet/lisp-gpe/decap.c + vnet/lisp-gpe/interface.c \ + vnet/lisp-gpe/ip_forward.c \ + vnet/lisp-gpe/decap.c nobase_include_HEADERS += \ vnet/lisp-gpe/lisp_gpe.h \ vnet/lisp-gpe/lisp_gpe_packet.h \ - vnet/lisp-gpe/lisp_gpe_error.def + vnet/lisp-gpe/lisp_gpe_error.def + +if ENABLE_TESTS +TESTS += test_test + +test_test_SOURCES = test/lisp-gpe/test.c + +test_test_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG + +test_test_LDADD = $(LIBOBJS) + +noinst_PROGRAMS += $(TESTS) +check_PROGRAMS = $(TESTS) +endif ######################################## # DHCP client @@ -462,7 +549,8 @@ nobase_include_HEADERS += \ if WITH_IPV6SR libvnet_la_SOURCES += \ - vnet/sr/sr.c + vnet/sr/sr.c \ + vnet/sr/sr_replicate.c endif nobase_include_HEADERS += \ @@ -470,41 +558,6 @@ nobase_include_HEADERS += \ vnet/sr/sr_error.def \ vnet/sr/sr.h -######################################## -# CGN -######################################### - -if WITH_VCGN -libvnet_la_SOURCES += \ - vnet/vcgn/cnat_bulk_port.c \ - vnet/vcgn/cnat_config.c \ - vnet/vcgn/cnat_db_scanner.c \ - vnet/vcgn/cnat_db_v2.c \ - vnet/vcgn/cnat_debug_msg_handler.c \ - vnet/vcgn/cnat_cli_handler.c \ - vnet/vcgn/cnat_global.c \ - vnet/vcgn/cnat_ipv4_udp_inside_input.c \ - vnet/vcgn/cnat_ipv4_udp_inside_input_exceptions.c \ - vnet/vcgn/cnat_ipv4_udp_outside_input.c \ - vnet/vcgn/cnat_ipv4_tcp_inside_input.c \ - vnet/vcgn/cnat_ipv4_tcp_inside_input_exceptions.c \ - vnet/vcgn/cnat_ipv4_tcp_outside_input.c \ - vnet/vcgn/cnat_ipv4_icmp_query_inside_input.c \ - vnet/vcgn/cnat_ipv4_icmp_query_inside_input_exception.c \ - vnet/vcgn/cnat_ipv4_icmp_query_outside_input.c \ - vnet/vcgn/cnat_ipv4_icmp_error_inside_input.c \ - vnet/vcgn/cnat_ipv4_icmp_error_outside_input.c \ - vnet/vcgn/cnat_logging.c \ - vnet/vcgn/cnat_ports.c \ - vnet/vcgn/cnat_util.c \ - vnet/vcgn/cnat_show.c \ - vnet/vcgn/cnat_syslog.c \ - vnet/vcgn/cnat_v4_functions.c \ - vnet/vcgn/index_list.c \ - vnet/vcgn/spp_platform_trace_log.c \ - vnet/vcgn/vcgn_classify.c -endif - ######################################## # DHCPv6 proxy ######################################## @@ -528,14 +581,14 @@ nobase_include_HEADERS += \ vnet/flow/ipfix_packet.h ######################################## -# IPFIX sample code +# IPFIX classify code ######################################## libvnet_la_SOURCES += \ - vnet/flow/flow_report_sample.c + vnet/flow/flow_report_classify.c nobase_include_HEADERS += \ - vnet/flow/flow_report_sample.h + vnet/flow/flow_report_classify.h ######################################## # lawful intercept @@ -575,26 +628,28 @@ libvnet_la_SOURCES += \ vnet/devices/dpdk/format.c \ vnet/devices/dpdk/init.c \ vnet/devices/dpdk/node.c \ - vnet/devices/dpdk/threads.c \ vnet/devices/dpdk/vhost_user.c \ vnet/devices/dpdk/cli.c nobase_include_HEADERS += \ - vnet/devices/dpdk/dpdk.h \ - vnet/devices/dpdk/threads.h + vnet/devices/dpdk/dpdk.h +else +libvnet_la_SOURCES += \ + vnet/devices/nic/ixge.c \ + vnet/devices/nic/ixge.h \ + vnet/devices/nic/sfp.c \ + vnet/devices/nic/sfp.h endif ######################################## # virtio ######################################## -if WITH_DPDK libvnet_la_SOURCES += \ vnet/devices/virtio/vhost-user.c nobase_include_HEADERS += \ vnet/devices/virtio/vhost-user.h -endif WITH_DPDK ######################################## # ssvm ethernet @@ -606,6 +661,33 @@ libvnet_la_SOURCES += \ nobase_include_HEADERS += \ vnet/devices/ssvm/ssvm_eth.h +######################################## +# Linux packet interface +######################################## + +libvnet_la_SOURCES += \ + vnet/devices/af_packet/af_packet.c \ + vnet/devices/af_packet/device.c \ + vnet/devices/af_packet/node.c \ + vnet/devices/af_packet/cli.c + +nobase_include_HEADERS += \ + vnet/devices/af_packet/af_packet.h + +######################################## +# NETMAP interface +######################################## + +libvnet_la_SOURCES += \ + vnet/devices/netmap/netmap.c \ + vnet/devices/netmap/device.c \ + vnet/devices/netmap/node.c \ + vnet/devices/netmap/cli.c + +nobase_include_HEADERS += \ + vnet/devices/netmap/netmap.h + + ######################################## # Unix kernel related ######################################## @@ -623,13 +705,17 @@ nobase_include_HEADERS += \ vnet/unix/tuntap.h \ vnet/unix/tapcli.h -lib_LTLIBRARIES = libvnet.la +######################################## +# Plugin client library +######################################## -dpdk_libs = +libvnetplugin_la_SOURCES += \ + vnet/plugin/p1.c -if WITH_DPDK -dpdk_libs += -l:libdpdk.a -endif +nobase_include_HEADERS += \ + vnet/plugin/plugin.h + +lib_LTLIBRARIES = libvnet.la libvnetplugin.la pcap2pg_SOURCES = \ vnet/unix/pcap2pg.c \