1 # Copyright (c) 2018-2020 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
6 # http://www.apache.org/licenses/LICENSE-2.0
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
17 unset(VNET_MULTIARCH_SOURCES)
19 option(VPP_IP_FIB_MTRIE_16 "IP FIB's MTRIE Stride is 16-8-8 (if not set it's 8-8-8-8)" ON)
21 ##############################################################################
23 ##############################################################################
24 list(APPEND VNET_SOURCES
45 list(APPEND VNET_MULTIARCH_SOURCES
51 list(APPEND VNET_HEADERS
60 interface/rx_queue_funcs.h
61 interface/tx_queue_funcs.h
77 ethernet/ethernet_format_fns.h
80 list(APPEND VNET_API_FILES
88 ##############################################################################
90 ##############################################################################
91 list(APPEND VNET_SOURCES
98 list(APPEND VNET_MULTIARCH_SOURCES
102 list(APPEND VNET_HEADERS
108 list(APPEND VNET_API_FILES
110 policer/policer_types.api
113 ##############################################################################
114 # Layer 2 protocols go here
115 ##############################################################################
117 ##############################################################################
118 # Layer 2 protocol: Ethernet
119 ##############################################################################
120 list(APPEND VNET_SOURCES
121 ethernet/arp_packet.c
122 ethernet/ethernet_types_api.c
126 ethernet/mac_address.c
130 ethernet/p2p_ethernet.c
131 ethernet/p2p_ethernet_input.c
132 ethernet/p2p_ethernet_api.c
135 list(APPEND VNET_MULTIARCH_SOURCES
137 ethernet/p2p_ethernet_input.c
140 list(APPEND VNET_HEADERS
143 ethernet/mac_address.h
147 ethernet/p2p_ethernet.h
148 ethernet/arp_packet.h
151 list(APPEND VNET_API_FILES
152 ethernet/p2p_ethernet.api
153 ethernet/ethernet_types.api)
155 ##############################################################################
156 # Layer 2 protocol: Ethernet bridging
157 ##############################################################################
158 list(APPEND VNET_SOURCES
165 l2/l2_input_classify.c
166 l2/l2_output_classify.c
177 l2/l2_in_out_feat_arc.c
185 list(APPEND VNET_MULTIARCH_SOURCES
191 l2/l2_in_out_feat_arc.c
192 l2/l2_input_classify.c
194 l2/l2_output_classify.c
204 list(APPEND VNET_HEADERS
221 list(APPEND VNET_API_FILES l2/l2.api)
223 ##############################################################################
224 # Layer 2 protocol: SRP
225 ##############################################################################
226 list(APPEND VNET_SOURCES
233 list(APPEND VNET_HEADERS
238 ##############################################################################
239 # Layer 2 protocol: PPP
240 ##############################################################################
241 list(APPEND VNET_SOURCES
247 list(APPEND VNET_HEADERS
253 ##############################################################################
254 # Layer 2 protocol: HDLC
255 ##############################################################################
256 list(APPEND VNET_SOURCES
262 list(APPEND VNET_HEADERS
268 ##############################################################################
269 # Layer 2 protocol: LLC
270 ##############################################################################
271 list(APPEND VNET_SOURCES
277 list(APPEND VNET_HEADERS
281 ##############################################################################
282 # Layer 2 protocol: SNAP
283 ##############################################################################
284 list(APPEND VNET_SOURCES
290 list(APPEND VNET_HEADERS
294 ##############################################################################
296 ##############################################################################
297 list(APPEND VNET_SOURCES
304 list(APPEND VNET_MULTIARCH_SOURCES
308 list(APPEND VNET_HEADERS
311 vxlan/vxlan_error.def
314 list(APPEND VNET_MULTIARCH_SOURCES vxlan/decap.c)
316 list(APPEND VNET_API_FILES vxlan/vxlan.api)
318 ##############################################################################
320 ##############################################################################
321 list(APPEND VNET_SOURCES
328 list(APPEND VNET_HEADERS
332 list(APPEND VNET_MULTIARCH_SOURCES bonding/node.c bonding/device.c)
333 list(APPEND VNET_API_FILES bonding/bond.api)
335 ##############################################################################
336 # Layer 2/3 "classify"
337 ##############################################################################
338 list(APPEND VNET_SOURCES
339 classify/vnet_classify.c
340 classify/trace_classify.h
341 classify/ip_classify.c
342 classify/in_out_acl.c
343 classify/policer_classify.c
344 classify/flow_classify.c
345 classify/flow_classify_node.c
346 classify/vnet_classify.h
347 classify/classify_api.c
350 list(APPEND VNET_MULTIARCH_SOURCES
351 classify/ip_classify.c
352 classify/flow_classify_node.c
355 list(APPEND VNET_HEADERS
356 classify/vnet_classify.h
357 classify/trace_classify.h
358 classify/in_out_acl.h
359 classify/policer_classify.h
360 classify/flow_classify.h
363 list(APPEND VNET_API_FILES classify/classify.api)
365 ##############################################################################
366 # Layer 3 protocols go here
367 ##############################################################################
369 ##############################################################################
370 # Layer 3 protocol: IP v4/v6
371 ##############################################################################
372 list(APPEND VNET_SOURCES
386 ip/ip4_source_and_port_range_check.c
387 ip/reass/ip4_full_reass.c
388 ip/reass/ip4_sv_reass.c
398 ip/reass/ip6_full_reass.c
399 ip/reass/ip6_sv_reass.c
402 ip/ip_container_proxy.c
409 ip/ip_path_mtu_node.c
420 list(APPEND VNET_MULTIARCH_SOURCES
422 ip/reass/ip4_full_reass.c
424 ip/reass/ip6_full_reass.c
425 ip/reass/ip4_sv_reass.c
427 ip/reass/ip6_full_reass.c
428 ip/reass/ip6_sv_reass.c
433 ip/ip_path_mtu_node.c
436 list(APPEND VNET_HEADERS
451 ip/ip6_hop_by_hop_packet.h
455 ip/ip_container_proxy.h
460 ip/ip_source_and_port_range_check.h
469 list(APPEND VNET_API_FILES
474 list(APPEND VNET_MULTIARCH_SOURCES
480 ##############################################################################
482 ##############################################################################
483 list(APPEND VNET_SOURCES
484 ip-neighbor/ip_neighbor.c
485 ip-neighbor/ip_neighbor_api.c
486 ip-neighbor/ip_neighbor_dp.c
487 ip-neighbor/ip_neighbor_types.c
488 ip-neighbor/ip_neighbor_watch.c
489 ip-neighbor/ip4_neighbor.c
490 ip-neighbor/ip6_neighbor.c
493 list(APPEND VNET_HEADERS
494 ip-neighbor/ip_neighbor.h
495 ip-neighbor/ip_neighbor_types.h
498 list(APPEND VNET_API_FILES
499 ip-neighbor/ip_neighbor.api
502 ##############################################################################
503 # Bidirectional Forwarding Detection
504 ##############################################################################
506 list(APPEND VNET_HEADERS
513 list(APPEND VNET_SOURCES
522 list(APPEND VNET_API_FILES bfd/bfd.api)
524 ##############################################################################
526 ##############################################################################
528 list(APPEND VNET_SOURCES
536 list(APPEND VNET_HEADERS
540 list(APPEND VNET_MULTIARCH_SOURCES crypto/node.c)
542 list(APPEND VNET_API_FILES crypto/crypto.api)
544 ##############################################################################
545 # Layer 3 protocol: IPSec
546 ##############################################################################
547 list(APPEND VNET_SOURCES
551 ipsec/ipsec_handoff.c
557 ipsec/ipsec_spd_policy.c
566 ipsec/ipsec_types_api.c
569 list(APPEND VNET_MULTIARCH_SOURCES
574 ipsec/ipsec_handoff.c
580 list(APPEND VNET_API_FILES ipsec/ipsec_types.api)
581 list(APPEND VNET_API_FILES ipsec/ipsec.api)
583 list(APPEND VNET_SOURCES
587 list(APPEND VNET_HEADERS
590 ipsec/ipsec_spd_policy.h
593 ipsec/ipsec_types_api.h
599 ##############################################################################
600 # Layer 3 protocol: osi
601 ##############################################################################
602 list(APPEND VNET_SOURCES
608 list(APPEND VNET_HEADERS
612 ##############################################################################
613 # Layer 4 protocol: tcp
614 ##############################################################################
615 list(APPEND VNET_SOURCES
619 tcp/tcp_syn_filter4.c
632 list(APPEND VNET_MULTIARCH_SOURCES
635 tcp/tcp_syn_filter4.c
638 list(APPEND VNET_HEADERS
651 list(APPEND VNET_API_FILES tcp/tcp.api)
653 ##############################################################################
654 # Layer 4 protocol: udp
655 ##############################################################################
656 list(APPEND VNET_SOURCES
669 list(APPEND VNET_MULTIARCH_SOURCES
674 list(APPEND VNET_HEADERS
682 list(APPEND VNET_API_FILES udp/udp.api)
684 ##############################################################################
685 # Tunnel protocol: gre
686 ##############################################################################
687 list(APPEND VNET_SOURCES
695 list(APPEND VNET_MULTIARCH_SOURCES
700 list(APPEND VNET_HEADERS
706 list(APPEND VNET_API_FILES gre/gre.api)
708 ##############################################################################
709 # Tunnel protocol: ipip
710 ##############################################################################
711 list(APPEND VNET_SOURCES
719 list(APPEND VNET_MULTIARCH_SOURCES
723 list(APPEND VNET_HEADERS
727 list(APPEND VNET_API_FILES
731 ##############################################################################
733 ##############################################################################
734 list(APPEND VNET_SOURCES
736 tunnel/tunnel_types_api.c
739 list(APPEND VNET_API_FILES
740 tunnel/tunnel_types.api
743 list(APPEND VNET_HEADERS
748 ##############################################################################
749 # Tunnel protocol: gre+mpls
750 ##############################################################################
751 list(APPEND VNET_SOURCES
763 list(APPEND VNET_MULTIARCH_SOURCES
770 list(APPEND VNET_HEADERS
778 list(APPEND VNET_API_FILES mpls/mpls.api)
780 ##############################################################################
781 # Tunnel protocol: vxlan-gbp
782 ##############################################################################
783 list(APPEND VNET_SOURCES
786 vxlan-gbp/vxlan_gbp_api.c
787 vxlan-gbp/vxlan_gbp.c
788 vxlan-gbp/vxlan_gbp_packet.c
791 list (APPEND VNET_MULTIARCH_SOURCES
796 list(APPEND VNET_HEADERS
797 vxlan-gbp/vxlan_gbp.h
798 vxlan-gbp/vxlan_gbp_packet.h
799 vxlan-gbp/vxlan_gbp_error.def
802 list(APPEND VNET_API_FILES vxlan-gbp/vxlan_gbp.api)
804 ##############################################################################
805 # Tunnel protocol: vxlan-gpe
806 ##############################################################################
808 list(APPEND VNET_SOURCES
809 vxlan-gpe/vxlan_gpe.c
812 vxlan-gpe/vxlan_gpe_api.c
815 list (APPEND VNET_MULTIARCH_SOURCES
819 list(APPEND VNET_HEADERS
820 vxlan-gpe/vxlan_gpe.h
821 vxlan-gpe/vxlan_gpe_packet.h
822 vxlan-gpe/vxlan_gpe_error.def
825 list(APPEND VNET_API_FILES vxlan-gpe/vxlan_gpe.api)
827 ##############################################################################
828 # ipv6 segment routing
829 ##############################################################################
831 list(APPEND VNET_SOURCES
834 srv6/sr_policy_rewrite.c
839 list(APPEND VNET_HEADERS
844 list(APPEND VNET_API_FILES
849 ##############################################################################
850 # mpls segment routing
851 ##############################################################################
853 list(APPEND VNET_SOURCES
854 srmpls/sr_mpls_policy.c
855 srmpls/sr_mpls_steering.c
859 list(APPEND VNET_HEADERS
863 list(APPEND VNET_API_FILES
867 ##############################################################################
868 # IPFIX / netflow v10
869 ##############################################################################
870 list(APPEND VNET_SOURCES
871 ipfix-export/flow_report.c
872 ipfix-export/flow_api.c
875 list(APPEND VNET_HEADERS
876 ipfix-export/flow_report.h
877 ipfix-export/ipfix_info_elements.h
878 ipfix-export/ipfix_packet.h
881 list(APPEND VNET_API_FILES ipfix-export/ipfix_export.api)
883 ##############################################################################
885 ##############################################################################
886 list(APPEND VNET_SOURCES
893 list(APPEND VNET_HEADERS
896 gso/hdr_offset_parser.h
900 list(APPEND VNET_API_FILES
904 ##############################################################################
905 # IPFIX classify code
906 ##############################################################################
908 list(APPEND VNET_SOURCES
909 ipfix-export/flow_report_classify.c
912 list(APPEND VNET_HEADERS
913 ipfix-export/flow_report_classify.h
916 ##############################################################################
918 ##############################################################################
920 list(APPEND VNET_SOURCES
921 lawful-intercept/lawful_intercept.c
922 lawful-intercept/node.c
925 list(APPEND VNET_MULTIARCH_SOURCES
926 lawful-intercept/node.c
929 list(APPEND VNET_HEADERS
930 lawful-intercept/lawful_intercept.h
933 ##############################################################################
934 # SPAN (port mirroring)
935 ##############################################################################
937 list(APPEND VNET_SOURCES
943 list(APPEND VNET_MULTIARCH_SOURCES
947 list(APPEND VNET_HEADERS
951 list(APPEND VNET_API_FILES span/span.api)
953 ##############################################################################
955 ##############################################################################
957 list(APPEND VNET_SOURCES
967 list(APPEND VNET_HEADERS
972 list(APPEND VNET_API_FILES pg/pg.api)
974 ##############################################################################
976 ##############################################################################
978 list(APPEND VNET_SOURCES
980 devices/virtio/device.c
981 devices/virtio/format.c
982 devices/virtio/node.c
984 devices/virtio/vhost_user.c
985 devices/virtio/vhost_user_input.c
986 devices/virtio/vhost_user_output.c
987 devices/virtio/vhost_user_api.c
988 devices/virtio/virtio.c
989 devices/virtio/virtio_api.c
990 devices/virtio/virtio_pci_legacy.c
991 devices/virtio/virtio_pci_modern.c
992 devices/virtio/virtio_process.c
993 devices/virtio/virtio_types_api.c
996 list(APPEND VNET_HEADERS
998 devices/virtio/virtio.h
999 devices/virtio/virtio_buffering.h
1000 devices/virtio/virtio_std.h
1001 devices/virtio/virtio_pci_legacy.h
1002 devices/virtio/virtio_pci_modern.h
1003 devices/virtio/vhost_std.h
1004 devices/virtio/vhost_user.h
1005 devices/virtio/virtio_types_api.h
1008 list(APPEND VNET_MULTIARCH_SOURCES
1009 devices/virtio/vhost_user_input.c
1010 devices/virtio/vhost_user_output.c
1011 devices/virtio/node.c
1012 devices/af_packet/node.c
1013 devices/virtio/device.c
1016 list(APPEND VNET_API_FILES
1017 devices/virtio/vhost_user.api
1018 devices/virtio/virtio.api
1019 devices/virtio/virtio_types.api
1022 ##############################################################################
1023 # tap interface (with virtio backend)
1024 ##############################################################################
1026 list(APPEND VNET_SOURCES
1029 devices/tap/tapv2_api.c
1032 list(APPEND VNET_HEADERS
1036 list(APPEND VNET_API_FILES
1037 devices/tap/tapv2.api
1040 ##############################################################################
1041 # tap interface (with virtio backend)
1042 ##############################################################################
1044 list(APPEND VNET_SOURCES
1045 devices/pipe/pipe_api.c
1049 list(APPEND VNET_HEADERS
1053 list(APPEND VNET_API_FILES devices/pipe/pipe.api)
1055 ##############################################################################
1056 # session managmeent
1057 ##############################################################################
1059 list(APPEND VNET_SOURCES
1061 session/session_debug.c
1062 session/session_table.c
1063 session/session_rules_table.c
1064 session/session_lookup.c
1065 session/session_node.c
1067 session/application.c
1068 session/application_worker.c
1069 session/session_cli.c
1070 session/application_interface.c
1071 session/application_local.c
1072 session/application_namespace.c
1073 session/segment_manager.c
1074 session/session_api.c
1077 list(APPEND VNET_HEADERS
1079 session/session_table.h
1080 session/session_rules_table.h
1081 session/session_types.h
1082 session/session_lookup.h
1083 session/application.h
1085 session/transport_types.h
1086 session/application_interface.h
1087 session/application_local.h
1088 session/application_namespace.h
1089 session/session_debug.h
1090 session/segment_manager.h
1091 session/mma_template.h
1092 session/mma_template.c
1097 list(APPEND VNET_API_FILES session/session.api)
1099 ##############################################################################
1101 ##############################################################################
1103 list(APPEND VNET_SOURCES
1107 list(APPEND VNET_HEADERS
1112 ##############################################################################
1113 # Linux packet interface
1114 ##############################################################################
1116 list(APPEND VNET_SOURCES
1117 devices/af_packet/af_packet.c
1118 devices/af_packet/device.c
1119 devices/af_packet/node.c
1120 devices/af_packet/cli.c
1121 devices/af_packet/af_packet_api.c
1124 list(APPEND VNET_MULTIARCH_SOURCES
1125 devices/af_packet/device.c
1128 list(APPEND VNET_HEADERS
1129 devices/af_packet/af_packet.h
1132 list(APPEND VNET_API_FILES devices/af_packet/af_packet.api)
1134 ##############################################################################
1135 # Driver feature graph arc support
1136 ##############################################################################
1138 list(APPEND VNET_SOURCES
1140 feature/feature_api.c
1141 feature/registration.c
1144 list(APPEND VNET_HEADERS
1148 list(APPEND VNET_API_FILES feature/feature.api)
1150 ##############################################################################
1151 # Unix kernel related
1152 ##############################################################################
1154 # FIXME: unix/hgshm.c
1156 list(APPEND VNET_SOURCES
1161 list(APPEND VNET_HEADERS
1165 ##############################################################################
1167 ##############################################################################
1169 list(APPEND VNET_SOURCES
1184 fib/fib_entry_src_adj.c
1185 fib/fib_entry_src_api.c
1186 fib/fib_entry_src_drop.c
1187 fib/fib_entry_src_interface.c
1188 fib/fib_entry_src_interpose.c
1189 fib/fib_entry_src_lisp.c
1190 fib/fib_entry_src_mpls.c
1191 fib/fib_entry_src_simple.c
1192 fib/fib_entry_src_rr.c
1193 fib/fib_entry_cover.c
1194 fib/fib_entry_delegate.c
1195 fib/fib_entry_track.c
1202 fib/fib_attached_export.c
1207 list(APPEND VNET_HEADERS
1217 fib/fib_entry_delegate.h
1222 list(APPEND VNET_API_FILES
1227 ##############################################################################
1229 ##############################################################################
1231 list(APPEND VNET_SOURCES
1235 adj/adj_midchain_node.c
1236 adj/adj_midchain_delegate.c
1246 list(APPEND VNET_MULTIARCH_SOURCES
1249 adj/adj_midchain_node.c
1252 list(APPEND VNET_HEADERS
1262 ##############################################################################
1263 # Data-Plane Objects
1264 ##############################################################################
1266 list(APPEND VNET_SOURCES
1274 dpo/load_balance_map.c
1278 dpo/interface_rx_dpo.c
1279 dpo/interface_tx_dpo.c
1280 dpo/mpls_disposition.c
1281 dpo/mpls_label_dpo.c
1287 list(APPEND VNET_MULTIARCH_SOURCES
1289 dpo/mpls_disposition.c
1291 dpo/mpls_label_dpo.c
1292 dpo/interface_rx_dpo.c
1295 list(APPEND VNET_HEADERS
1307 ##############################################################################
1309 ##############################################################################
1311 list(APPEND VNET_SOURCES
1321 mfib/mfib_entry_cover.c
1322 mfib/mfib_entry_delegate.c
1323 mfib/mfib_entry_src.c
1324 mfib/mfib_entry_src_rr.c
1328 list(APPEND VNET_MULTIARCH_SOURCES
1332 list(APPEND VNET_HEADERS
1338 list(APPEND VNET_API_FILES mfib/mfib_types.api)
1340 ##############################################################################
1342 ##############################################################################
1344 list(APPEND VNET_SOURCES
1350 list(APPEND VNET_HEADERS
1354 ##############################################################################
1356 ##############################################################################
1358 list(APPEND VNET_SOURCES
1361 qos/qos_egress_map.c
1363 qos/qos_record_node.c
1365 qos/qos_store_node.c
1370 list(APPEND VNET_MULTIARCH_SOURCES
1371 qos/qos_record_node.c
1375 list(APPEND VNET_API_FILES qos/qos.api)
1377 ##############################################################################
1379 ##############################################################################
1381 list(APPEND VNET_SOURCES
1382 bier/bier_bit_string.c
1385 bier/bier_fmask_db.c
1394 bier/bier_imp_node.c
1396 bier/bier_disp_entry.c
1397 bier/bier_disp_lookup_node.c
1398 bier/bier_disp_dispatch_node.c
1399 bier/bier_disp_table.c
1400 bier/bier_bift_table.c
1403 list(APPEND VNET_MULTIARCH_SOURCES
1404 bier/bier_disp_dispatch_node.c
1405 bier/bier_disp_lookup_node.c
1406 bier/bier_imp_node.c
1409 list(APPEND VNET_HEADERS
1416 list(APPEND VNET_API_FILES bier/bier.api)
1418 ##############################################################################
1420 ##############################################################################
1422 list (APPEND VNET_SOURCES
1428 list(APPEND VNET_HEADERS
1433 list(APPEND VNET_API_FILES syslog/syslog.api)
1435 ##############################################################################
1436 # Tunnel Endpoint Information Base
1437 ##############################################################################
1439 list (APPEND VNET_SOURCES
1445 list(APPEND VNET_HEADERS
1449 list(APPEND VNET_API_FILES teib/teib.api)
1451 ##############################################################################
1453 ##############################################################################
1455 list (APPEND VNET_SOURCES
1461 list(APPEND VNET_HEADERS
1465 list(APPEND VNET_API_FILES arp/arp.api)
1467 list (APPEND VNET_SOURCES
1471 ip6-nd/ip6_nd_proxy.c
1477 list(APPEND VNET_HEADERS
1481 list(APPEND VNET_API_FILES
1486 ##############################################################################
1488 ##############################################################################
1490 add_vpp_library(vnet
1491 SOURCES ${VNET_SOURCES}
1492 MULTIARCH_SOURCES ${VNET_MULTIARCH_SOURCES}
1493 INSTALL_HEADERS ${VNET_HEADERS}
1494 API_FILES ${VNET_API_FILES}
1495 LINK_LIBRARIES vppinfra svm vlib
1496 DEPENDS vpp_version_h api_headers
1499 ##############################################################################
1500 # vpp api test client library
1501 ##############################################################################
1503 add_vpp_library (vatclient
1504 SOURCES ip/ip_types_api.c
1508 ##############################################################################
1510 ##############################################################################
1511 add_vpp_test_library(vnet
1515 ##############################################################################