interface: rx queue infra rework, part one
[vpp.git] / src / vnet / CMakeLists.txt
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:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
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.
13
14 add_definitions (-DWITH_LIBSSL=1)
15 include_directories(${OPENSSL_INCLUDE_DIR})
16
17 unset(VNET_SOURCES)
18 unset(VNET_HEADERS)
19 unset(VNET_API_FILES)
20 unset(VNET_MULTIARCH_SOURCES)
21
22 ##############################################################################
23 # Generic stuff
24 ##############################################################################
25 list(APPEND VNET_SOURCES
26   buffer.c
27   config.c
28   devices/devices.c
29   devices/netlink.c
30   flow/flow.c
31   flow/flow_cli.c
32   flow/flow_api.c
33   handoff.c
34   interface.c
35   interface_api.c
36   interface_cli.c
37   interface_format.c
38   interface_output.c
39   interface/rx_queue.c
40   interface/runtime.c
41   interface_stats.c
42   misc.c
43 )
44
45 list(APPEND VNET_MULTIARCH_SOURCES
46   interface_output.c
47   interface_stats.c
48   handoff.c
49 )
50
51 list(APPEND VNET_HEADERS
52   api_errno.h
53   buffer.h
54   config.h
55   devices/devices.h
56   devices/netlink.h
57   flow/flow.h
58   global_funcs.h
59   handoff.h
60   interface/rx_queue_funcs.h
61   interface.h
62   interface_funcs.h
63   interface_output.h
64   ip/ip4_to_ip6.h
65   ip/ip6_to_ip4.h
66   ip/ip_types_api.h
67   l3_types.h
68   plugin/plugin.h
69   pipeline.h
70   vnet.h
71   vnet_all_api_h.h
72   vnet_msg_enum.h
73   util/radix.h
74   util/refcount.h
75   format_fns.h
76   ip/ip_format_fns.h
77   ethernet/ethernet_format_fns.h
78 )
79
80 list(APPEND VNET_API_FILES
81   interface.api
82   interface_types.api
83   ip/ip_types.api
84   flow/flow_types.api
85   flow/flow.api
86 )
87
88 ##############################################################################
89 # Policer infra
90 ##############################################################################
91 list(APPEND VNET_SOURCES
92   policer/node_funcs.c
93   policer/policer.c
94   policer/xlate.c
95   policer/policer_api.c
96 )
97
98 list(APPEND VNET_MULTIARCH_SOURCES
99   policer/node_funcs.c
100 )
101
102 list(APPEND VNET_HEADERS
103   policer/police.h
104   policer/policer.h
105   policer/xlate.h
106 )
107
108 list(APPEND VNET_API_FILES
109   policer/policer.api
110   policer/policer_types.api
111 )
112
113 ##############################################################################
114 # Binary API compatibility until vpp 20.12, see the ADL plugin...
115 ##############################################################################
116
117 list(APPEND VNET_SOURCES
118   cop/cop_api.c
119 )
120
121 list(APPEND VNET_API_FILES cop/cop.api)
122
123 ##############################################################################
124 # Layer 2 protocols go here
125 ##############################################################################
126
127 ##############################################################################
128 # Layer 2 protocol: Ethernet
129 ##############################################################################
130 list(APPEND VNET_SOURCES
131   ethernet/arp_packet.c
132   ethernet/ethernet_types_api.c
133   ethernet/format.c
134   ethernet/init.c
135   ethernet/interface.c
136   ethernet/mac_address.c
137   ethernet/node.c
138   ethernet/pg.c
139   ethernet/sfp.c
140   ethernet/p2p_ethernet.c
141   ethernet/p2p_ethernet_input.c
142   ethernet/p2p_ethernet_api.c
143 )
144
145 list(APPEND VNET_MULTIARCH_SOURCES
146   ethernet/node.c
147   ethernet/p2p_ethernet_input.c
148 )
149
150 list(APPEND VNET_HEADERS
151   ethernet/error.def
152   ethernet/ethernet.h
153   ethernet/mac_address.h
154   ethernet/packet.h
155   ethernet/types.def
156   ethernet/sfp.h
157   ethernet/p2p_ethernet.h
158   ethernet/arp_packet.h
159 )
160
161 list(APPEND VNET_API_FILES
162   ethernet/p2p_ethernet.api
163   ethernet/ethernet_types.api)
164
165 ##############################################################################
166 # Layer 2 protocol: Ethernet bridging
167 ##############################################################################
168 list(APPEND VNET_SOURCES
169   l2/feat_bitmap.c
170   l2/l2_api.c
171   l2/l2_arp_term.c
172   l2/l2_bd.c
173   l2/l2_bvi.c
174   l2/l2_bvi_node.c
175   l2/l2_input_classify.c
176   l2/l2_output_classify.c
177   l2/l2_efp_filter.c
178   l2/l2_fib.c
179   l2/l2_flood.c
180   l2/l2_fwd.c
181   l2/l2_input.c
182   l2/l2_input_node.c
183   l2/l2_input_vtr.c
184   l2/l2_learn.c
185   l2/l2_output.c
186   l2/l2_in_out_acl.c
187   l2/l2_in_out_feat_arc.c
188   l2/l2_patch.c
189   l2/l2_rw.c
190   l2/l2_uu_fwd.c
191   l2/l2_vtr.c
192   l2/l2_xcrw.c
193 )
194
195 list(APPEND VNET_MULTIARCH_SOURCES
196   l2/l2_bvi_node.c
197   l2/l2_fwd.c
198   l2/l2_learn.c
199   l2/l2_output.c
200   l2/l2_patch.c
201   l2/l2_in_out_feat_arc.c
202   l2/l2_input_classify.c
203   l2/l2_input_node.c
204   l2/l2_output_classify.c
205   l2/l2_flood.c
206   l2/l2_uu_fwd.c
207   l2/l2_efp_filter.c
208   l2/l2_rw.c
209   l2/l2_xcrw.c
210   l2/l2_in_out_acl.c
211   l2/l2_input_vtr.c
212 )
213
214 list(APPEND VNET_HEADERS
215   l2/feat_bitmap.h
216   l2/l2_input.h
217   l2/l2_output.h
218   l2/l2_vtr.h
219   l2/l2_input_vtr.h
220   l2/l2_efp_filter.h
221   l2/l2_fwd.h
222   l2/l2_bd.h
223   l2/l2_bvi.h
224   l2/l2_flood.h
225   l2/l2_fib.h
226   l2/l2_rw.h
227   l2/l2_xcrw.h
228   l2/l2_classify.h
229 )
230
231 list(APPEND VNET_API_FILES l2/l2.api)
232
233 ##############################################################################
234 # Layer 2 protocol: SRP
235 ##############################################################################
236 list(APPEND VNET_SOURCES
237   srp/format.c
238   srp/interface.c
239   srp/node.c
240   srp/pg.c
241 )
242
243 list(APPEND VNET_HEADERS
244   srp/packet.h
245   srp/srp.h
246 )
247
248 ##############################################################################
249 # Layer 2 protocol: PPP
250 ##############################################################################
251 list(APPEND VNET_SOURCES
252   ppp/node.c
253   ppp/pg.c
254   ppp/ppp.c
255 )
256
257 list(APPEND VNET_HEADERS
258   ppp/error.def
259   ppp/ppp.h
260   ppp/packet.h
261 )
262
263 ##############################################################################
264 # Layer 2 protocol: HDLC
265 ##############################################################################
266 list(APPEND VNET_SOURCES
267   hdlc/node.c
268   hdlc/pg.c
269   hdlc/hdlc.c
270 )
271
272 list(APPEND VNET_HEADERS
273   hdlc/error.def
274   hdlc/hdlc.h
275   hdlc/packet.h
276 )
277
278 ##############################################################################
279 # Layer 2 protocol: LLC
280 ##############################################################################
281 list(APPEND VNET_SOURCES
282   llc/llc.c
283   llc/node.c
284   llc/pg.c
285 )
286
287 list(APPEND VNET_HEADERS
288   llc/llc.h
289 )
290
291 ##############################################################################
292 # Layer 2 protocol: SNAP
293 ##############################################################################
294 list(APPEND VNET_SOURCES
295   snap/snap.c
296   snap/node.c
297   snap/pg.c
298 )
299
300 list(APPEND VNET_HEADERS
301   snap/snap.h
302 )
303
304 ##############################################################################
305 # Layer 2 / vxlan
306 ##############################################################################
307 list(APPEND VNET_SOURCES
308   vxlan/vxlan.c
309   vxlan/encap.c
310   vxlan/decap.c
311   vxlan/vxlan_api.c
312 )
313
314 list(APPEND VNET_MULTIARCH_SOURCES
315   vxlan/encap.c
316 )
317
318 list(APPEND VNET_HEADERS
319   vxlan/vxlan.h
320   vxlan/vxlan_packet.h
321   vxlan/vxlan_error.def
322 )
323
324 list(APPEND VNET_MULTIARCH_SOURCES vxlan/decap.c)
325
326 list(APPEND VNET_API_FILES vxlan/vxlan.api)
327
328 ##############################################################################
329 # Layer 2 / Bonding
330 ##############################################################################
331 list(APPEND VNET_SOURCES
332   bonding/cli.c
333   bonding/node.c
334   bonding/device.c
335   bonding/bond_api.c
336 )
337
338 list(APPEND VNET_HEADERS
339   bonding/node.h
340 )
341
342 list(APPEND VNET_MULTIARCH_SOURCES bonding/node.c bonding/device.c)
343 list(APPEND VNET_API_FILES bonding/bond.api)
344
345 ##############################################################################
346 # Layer 2/3 "classify"
347 ##############################################################################
348 list(APPEND VNET_SOURCES
349   classify/vnet_classify.c
350   classify/trace_classify.h
351   classify/ip_classify.c
352   classify/in_out_acl.c
353   classify/policer_classify.c
354   classify/flow_classify.c
355   classify/flow_classify_node.c
356   classify/vnet_classify.h
357   classify/classify_api.c
358 )
359
360 list(APPEND VNET_MULTIARCH_SOURCES
361   classify/ip_classify.c
362   classify/flow_classify_node.c
363 )
364
365 list(APPEND VNET_HEADERS
366   classify/vnet_classify.h
367   classify/trace_classify.h
368   classify/in_out_acl.h
369   classify/policer_classify.h
370   classify/flow_classify.h
371 )
372
373 list(APPEND VNET_API_FILES classify/classify.api)
374
375 ##############################################################################
376 # Layer 3 protocols go here
377 ##############################################################################
378
379 ##############################################################################
380 # Layer 3 protocol: IP v4/v6
381 ##############################################################################
382 list(APPEND VNET_SOURCES
383   ip/format.c
384   ip/icmp4.c
385   ip/icmp6.c
386   ip/ip46_cli.c
387   ip/ip_types_api.c
388   ip/ip46_address.c
389   ip/ip4_format.c
390   ip/ip4_forward.c
391   ip/ip4_punt_drop.c
392   ip/ip4_input.c
393   ip/ip4_options.c
394   ip/ip4_mtrie.c
395   ip/ip4_pg.c
396   ip/ip4_source_and_port_range_check.c
397   ip/reass/ip4_full_reass.c
398   ip/reass/ip4_sv_reass.c
399   ip/ip6_format.c
400   ip/ip6_forward.c
401   ip/ip6_ll_table.c
402   ip/ip6_ll_types.c
403   ip/ip6_punt_drop.c
404   ip/ip6_hop_by_hop.c
405   ip/ip6_input.c
406   ip/ip6_link.c
407   ip/ip6_pg.c
408   ip/reass/ip6_full_reass.c
409   ip/reass/ip6_sv_reass.c
410   ip/ip_api.c
411   ip/ip_checksum.c
412   ip/ip_container_proxy.c
413   ip/ip_frag.c
414   ip/ip.c
415   ip/ip_interface.c
416   ip/ip_init.c
417   ip/ip_in_out_acl.c
418   ip/ip_punt_drop.c
419   ip/ip_types.c
420   ip/lookup.c
421   ip/punt_api.c
422   ip/punt.c
423   ip/punt_node.c
424   ip/vtep.c
425 )
426
427 list(APPEND VNET_MULTIARCH_SOURCES
428   ip/ip4_punt_drop.c
429   ip/reass/ip4_full_reass.c
430   ip/ip6_hop_by_hop.c
431   ip/reass/ip6_full_reass.c
432   ip/reass/ip4_sv_reass.c
433   ip/ip6_hop_by_hop.c
434   ip/reass/ip6_full_reass.c
435   ip/reass/ip6_sv_reass.c
436   ip/ip6_input.c
437   ip/ip6_punt_drop.c
438   ip/punt_node.c
439   ip/ip_in_out_acl.c
440 )
441
442 list(APPEND VNET_HEADERS
443   ip/format.h
444   ip/icmp46_packet.h
445   ip/icmp4.h
446   ip/icmp6.h
447   ip/igmp_packet.h
448   ip/ip4_error.h
449   ip/ip4.h
450   ip/ip4_mtrie.h
451   ip/ip4_inlines.h
452   ip/ip4_packet.h
453   ip/ip46_address.h
454   ip/ip6_error.h
455   ip/ip6.h
456   ip/ip6_hop_by_hop.h
457   ip/ip6_hop_by_hop_packet.h
458   ip/ip6_inlines.h
459   ip/ip6_packet.h
460   ip/ip.h
461   ip/ip_container_proxy.h
462   ip/ip_flow_hash.h
463   ip/ip_table.h
464   ip/ip_interface.h
465   ip/ip_packet.h
466   ip/ip_source_and_port_range_check.h
467   ip/ip_types.h
468   ip/lookup.h
469   ip/ports.def
470   ip/protocols.def
471   ip/punt_error.def
472   ip/punt.h
473 )
474
475 list(APPEND VNET_API_FILES
476   ip/ip.api
477   ip/punt.api
478 )
479
480 list(APPEND VNET_MULTIARCH_SOURCES
481   ip/ip4_forward.c
482   ip/ip6_forward.c
483   ip/ip4_input.c
484 )
485
486 ##############################################################################
487 # Layer 3 neighbours
488 ##############################################################################
489 list(APPEND VNET_SOURCES
490   ip-neighbor/ip_neighbor.c
491   ip-neighbor/ip_neighbor_api.c
492   ip-neighbor/ip_neighbor_dp.c
493   ip-neighbor/ip_neighbor_types.c
494   ip-neighbor/ip_neighbor_watch.c
495   ip-neighbor/ip4_neighbor.c
496   ip-neighbor/ip6_neighbor.c
497 )
498
499 list(APPEND VNET_HEADERS
500   ip-neighbor/ip_neighbor.h
501   ip-neighbor/ip_neighbor_types.h
502 )
503
504 list(APPEND VNET_API_FILES
505   ip-neighbor/ip_neighbor.api
506 )
507
508 ##############################################################################
509 # Bidirectional Forwarding Detection
510 ##############################################################################
511
512 list(APPEND VNET_HEADERS
513   bfd/bfd_protocol.h
514   bfd/bfd_main.h
515   bfd/bfd_api.h
516   bfd/bfd_udp.h
517 )
518
519 list(APPEND VNET_SOURCES
520   bfd/bfd_api.h
521   bfd/bfd_udp.c
522   bfd/bfd_main.c
523   bfd/bfd_protocol.c
524   bfd/bfd_cli.c
525   bfd/bfd_api.c
526 )
527
528 list(APPEND VNET_API_FILES bfd/bfd.api)
529
530 ##############################################################################
531 # Crypto
532 ##############################################################################
533
534 list(APPEND VNET_SOURCES
535   crypto/cli.c
536   crypto/crypto.c
537   crypto/format.c
538   crypto/node.c
539   crypto/crypto_api.c
540 )
541
542 list(APPEND VNET_HEADERS
543   crypto/crypto.h
544 )
545
546 list(APPEND VNET_MULTIARCH_SOURCES crypto/node.c)
547
548 list(APPEND VNET_API_FILES crypto/crypto.api)
549
550 ##############################################################################
551 # Layer 3 protocol: IPSec
552 ##############################################################################
553 list(APPEND VNET_SOURCES
554   ipsec/ipsec.c
555   ipsec/ipsec_cli.c
556   ipsec/ipsec_format.c
557   ipsec/ipsec_handoff.c
558   ipsec/ipsec_input.c
559   ipsec/ipsec_itf.c
560   ipsec/ipsec_punt.c
561   ipsec/ipsec_sa.c
562   ipsec/ipsec_spd.c
563   ipsec/ipsec_spd_policy.c
564   ipsec/ipsec_tun.c
565   ipsec/ipsec_tun_in.c
566   ipsec/esp_format.c
567   ipsec/esp_encrypt.c
568   ipsec/esp_decrypt.c
569   ipsec/ah_decrypt.c
570   ipsec/ah_encrypt.c
571   ipsec/ipsec_api.c
572   ipsec/ipsec_types_api.c
573 )
574
575 list(APPEND VNET_MULTIARCH_SOURCES
576   ipsec/esp_encrypt.c
577   ipsec/esp_decrypt.c
578   ipsec/ah_decrypt.c
579   ipsec/ah_encrypt.c
580   ipsec/ipsec_handoff.c
581   ipsec/ipsec_output.c
582   ipsec/ipsec_input.c
583   ipsec/ipsec_tun_in.c
584 )
585
586 list(APPEND VNET_API_FILES ipsec/ipsec_types.api)
587 list(APPEND VNET_API_FILES ipsec/ipsec.api)
588
589 list(APPEND VNET_SOURCES
590   ipsec/ipsec_output.c
591 )
592
593 list(APPEND VNET_HEADERS
594   ipsec/ipsec.h
595   ipsec/ipsec_spd.h
596   ipsec/ipsec_spd_policy.h
597   ipsec/ipsec_sa.h
598   ipsec/ipsec_tun.h
599   ipsec/ipsec_types_api.h
600   ipsec/ipsec_punt.h
601   ipsec/esp.h
602   ipsec/ah.h
603 )
604
605 ##############################################################################
606 # Layer 3 protocol: osi
607 ##############################################################################
608 list(APPEND VNET_SOURCES
609   osi/node.c
610   osi/osi.c
611   osi/pg.c
612 )
613
614 list(APPEND VNET_HEADERS
615   osi/osi.h
616 )
617
618 ##############################################################################
619 # Layer 4 protocol: tcp
620 ##############################################################################
621 list(APPEND VNET_SOURCES
622   tcp/tcp_api.c
623   tcp/tcp_format.c
624   tcp/tcp_pg.c
625   tcp/tcp_syn_filter4.c
626   tcp/tcp_output.c
627   tcp/tcp_input.c
628   tcp/tcp_newreno.c
629   tcp/tcp_bt.c
630   tcp/tcp_cli.c
631   tcp/tcp_cubic.c
632   tcp/tcp_debug.c
633   tcp/tcp_sack.c
634   tcp/tcp_timer.c
635   tcp/tcp.c
636 )
637
638 list(APPEND VNET_MULTIARCH_SOURCES
639   tcp/tcp_input.c
640   tcp/tcp_output.c
641   tcp/tcp_syn_filter4.c
642 )
643
644 list(APPEND VNET_HEADERS
645   tcp/tcp_packet.h
646   tcp/tcp_timer.h
647   tcp/tcp_bt.h
648   tcp/tcp_cc.h
649   tcp/tcp_debug.h
650   tcp/tcp_inlines.h
651   tcp/tcp_sack.h
652   tcp/tcp_types.h
653   tcp/tcp.h
654   tcp/tcp_error.def
655 )
656
657 list(APPEND VNET_API_FILES tcp/tcp.api)
658
659 ##############################################################################
660 # Layer 4 protocol: udp
661 ##############################################################################
662 list(APPEND VNET_SOURCES
663   udp/udp.c
664   udp/udp_cli.c
665   udp/udp_input.c
666   udp/udp_format.c
667   udp/udp_local.c
668   udp/udp_pg.c
669   udp/udp_encap_node.c
670   udp/udp_encap.c
671   udp/udp_api.c
672 )
673
674 list(APPEND VNET_MULTIARCH_SOURCES
675   udp/udp_local.c
676   udp/udp_encap_node.c
677 )
678
679 list(APPEND VNET_HEADERS
680   udp/udp_error.def
681   udp/udp.h
682   udp/udp_packet.h
683   udp/udp_inlines.h
684   udp/udp_local.h
685 )
686
687 list(APPEND VNET_API_FILES udp/udp.api)
688
689 ##############################################################################
690 # Tunnel protocol: gre
691 ##############################################################################
692 list(APPEND VNET_SOURCES
693   gre/gre.c
694   gre/node.c
695   gre/interface.c
696   gre/pg.c
697   gre/gre_api.c
698 )
699
700 list(APPEND VNET_MULTIARCH_SOURCES
701   gre/node.c
702   gre/gre.c
703 )
704
705 list(APPEND VNET_HEADERS
706   gre/gre.h
707   gre/packet.h
708   gre/error.def
709 )
710
711 list(APPEND VNET_API_FILES gre/gre.api)
712
713 ##############################################################################
714 # Tunnel protocol: ipip
715 ##############################################################################
716 list(APPEND VNET_SOURCES
717   ipip/ipip.c
718   ipip/node.c
719   ipip/sixrd.c
720   ipip/ipip_api.c
721   ipip/ipip_cli.c
722 )
723
724 list(APPEND VNET_MULTIARCH_SOURCES
725   ipip/node.c
726 )
727
728 list(APPEND VNET_HEADERS
729   ipip/ipip.h
730 )
731
732 list(APPEND VNET_API_FILES
733   ipip/ipip.api
734 )
735
736 ##############################################################################
737 # Tunnel infra
738 ##############################################################################
739 list(APPEND VNET_SOURCES
740   tunnel/tunnel.c
741   tunnel/tunnel_types_api.c
742 )
743
744 list(APPEND VNET_API_FILES
745   tunnel/tunnel_types.api
746 )
747
748 list(APPEND VNET_HEADERS
749   tunnel/tunnel.h
750   tunnel/tunnel_dp.h
751 )
752
753 ##############################################################################
754 # Tunnel protocol: gre+mpls
755 ##############################################################################
756 list(APPEND VNET_SOURCES
757   mpls/mpls.c
758   mpls/mpls_lookup.c
759   mpls/mpls_output.c
760   mpls/mpls_features.c
761   mpls/mpls_input.c
762   mpls/interface.c
763   mpls/mpls_tunnel.c
764   mpls/pg.c
765   mpls/mpls_api.c
766 )
767
768 list(APPEND VNET_MULTIARCH_SOURCES
769   mpls/mpls_output.c
770   mpls/mpls_input.c
771   mpls/mpls_lookup.c
772   mpls/mpls_features.c
773 )
774
775 list(APPEND VNET_HEADERS
776   mpls/mpls.h
777   mpls/mpls_types.h
778   mpls/mpls_tunnel.h
779   mpls/packet.h
780   mpls/error.def
781 )
782
783 list(APPEND VNET_API_FILES mpls/mpls.api)
784
785 ##############################################################################
786 # Tunnel protocol: vxlan-gbp
787 ##############################################################################
788 list(APPEND VNET_SOURCES
789   vxlan-gbp/decap.c
790   vxlan-gbp/encap.c
791   vxlan-gbp/vxlan_gbp_api.c
792   vxlan-gbp/vxlan_gbp.c
793   vxlan-gbp/vxlan_gbp_packet.c
794 )
795
796 list (APPEND VNET_MULTIARCH_SOURCES
797   vxlan-gbp/decap.c
798   vxlan-gbp/encap.c
799 )
800
801 list(APPEND VNET_HEADERS
802   vxlan-gbp/vxlan_gbp.h
803   vxlan-gbp/vxlan_gbp_packet.h
804   vxlan-gbp/vxlan_gbp_error.def
805 )
806
807 list(APPEND VNET_API_FILES vxlan-gbp/vxlan_gbp.api)
808
809 ##############################################################################
810 # Tunnel protocol: vxlan-gpe
811 ##############################################################################
812
813 list(APPEND VNET_SOURCES
814   vxlan-gpe/vxlan_gpe.c
815   vxlan-gpe/encap.c
816   vxlan-gpe/decap.c
817   vxlan-gpe/vxlan_gpe_api.c
818 )
819
820 list (APPEND VNET_MULTIARCH_SOURCES
821   vxlan-gpe/decap.c
822 )
823
824 list(APPEND VNET_HEADERS
825   vxlan-gpe/vxlan_gpe.h
826   vxlan-gpe/vxlan_gpe_packet.h
827   vxlan-gpe/vxlan_gpe_error.def
828 )
829
830 list(APPEND VNET_API_FILES vxlan-gpe/vxlan_gpe.api)
831
832 ##############################################################################
833 # ipv6 segment routing
834 ##############################################################################
835
836 list(APPEND VNET_SOURCES
837   srv6/sr.c
838   srv6/sr_localsid.c
839   srv6/sr_policy_rewrite.c
840   srv6/sr_steering.c
841   srv6/sr_api.c
842 )
843
844 list(APPEND VNET_HEADERS
845   srv6/sr_packet.h
846   srv6/sr.h
847 )
848
849 list(APPEND VNET_API_FILES
850   srv6/sr.api
851   srv6/sr_types.api
852 )
853
854 ##############################################################################
855 # mpls segment routing
856 ##############################################################################
857
858 list(APPEND VNET_SOURCES
859   srmpls/sr_mpls_policy.c
860   srmpls/sr_mpls_steering.c
861   srmpls/sr_mpls_api.c
862 )
863
864 list(APPEND VNET_HEADERS
865   srmpls/sr_mpls.h
866 )
867
868 list(APPEND VNET_API_FILES
869   srmpls/sr_mpls.api
870 )
871
872 ##############################################################################
873 # IPFIX / netflow v10
874 ##############################################################################
875 list(APPEND VNET_SOURCES
876   ipfix-export/flow_report.c
877   ipfix-export/flow_api.c
878 )
879
880 list(APPEND VNET_HEADERS
881   ipfix-export/flow_report.h
882   ipfix-export/ipfix_info_elements.h
883   ipfix-export/ipfix_packet.h
884 )
885
886 list(APPEND VNET_API_FILES ipfix-export/ipfix_export.api)
887
888 ##############################################################################
889 # GSO
890 ##############################################################################
891 list(APPEND VNET_SOURCES
892   gso/cli.c
893   gso/gso.c
894   gso/gso_api.c
895   gso/node.c
896 )
897
898 list(APPEND VNET_HEADERS
899   gso/gro.h
900   gso/gro_func.h
901   gso/hdr_offset_parser.h
902   gso/gso.h
903 )
904
905 list(APPEND VNET_API_FILES
906   gso/gso.api
907 )
908
909 ##############################################################################
910 # IPFIX classify code
911 ##############################################################################
912
913 list(APPEND VNET_SOURCES
914   ipfix-export/flow_report_classify.c
915 )
916
917 list(APPEND VNET_HEADERS
918   ipfix-export/flow_report_classify.h
919 )
920
921 ##############################################################################
922 # lawful intercept
923 ##############################################################################
924
925 list(APPEND VNET_SOURCES
926   lawful-intercept/lawful_intercept.c
927   lawful-intercept/node.c
928 )
929
930 list(APPEND VNET_MULTIARCH_SOURCES
931   lawful-intercept/node.c
932 )
933
934 list(APPEND VNET_HEADERS
935   lawful-intercept/lawful_intercept.h
936 )
937
938 ##############################################################################
939 # SPAN (port mirroring)
940 ##############################################################################
941
942 list(APPEND VNET_SOURCES
943   span/span_api.c
944   span/span.c
945   span/node.c
946 )
947
948 list(APPEND VNET_MULTIARCH_SOURCES
949   span/node.c
950 )
951
952 list(APPEND VNET_HEADERS
953   span/span.h
954 )
955
956 list(APPEND VNET_API_FILES span/span.api)
957
958 ##############################################################################
959 # Packet generator
960 ##############################################################################
961
962 list(APPEND VNET_SOURCES
963   pg/cli.c
964   pg/edit.c
965   pg/init.c
966   pg/input.c
967   pg/output.c
968   pg/stream.c
969   pg/pg_api.c
970 )
971
972 list(APPEND VNET_HEADERS
973   pg/pg.h
974   pg/edit.h
975 )
976
977 list(APPEND VNET_API_FILES pg/pg.api)
978
979 ##############################################################################
980 # virtio
981 ##############################################################################
982
983 list(APPEND VNET_SOURCES
984   devices/virtio/cli.c
985   devices/virtio/device.c
986   devices/virtio/format.c
987   devices/virtio/node.c
988   devices/virtio/pci.c
989   devices/virtio/vhost_user.c
990   devices/virtio/vhost_user_input.c
991   devices/virtio/vhost_user_output.c
992   devices/virtio/vhost_user_api.c
993   devices/virtio/virtio.c
994   devices/virtio/virtio_api.c
995   devices/virtio/virtio_pci_legacy.c
996   devices/virtio/virtio_pci_modern.c
997   devices/virtio/virtio_process.c
998   devices/virtio/virtio_types_api.c
999 )
1000
1001 list(APPEND VNET_HEADERS
1002   devices/virtio/pci.h
1003   devices/virtio/virtio.h
1004   devices/virtio/virtio_buffering.h
1005   devices/virtio/virtio_std.h
1006   devices/virtio/virtio_pci_legacy.h
1007   devices/virtio/virtio_pci_modern.h
1008   devices/virtio/vhost_std.h
1009   devices/virtio/vhost_user.h
1010   devices/virtio/virtio_types_api.h
1011 )
1012
1013 list(APPEND VNET_MULTIARCH_SOURCES
1014   devices/virtio/vhost_user_input.c
1015   devices/virtio/vhost_user_output.c
1016   devices/virtio/node.c
1017   devices/af_packet/node.c
1018   devices/virtio/device.c
1019 )
1020
1021 list(APPEND VNET_API_FILES
1022   devices/virtio/vhost_user.api
1023   devices/virtio/virtio.api
1024   devices/virtio/virtio_types.api
1025 )
1026
1027 ##############################################################################
1028 # tap interface (with virtio backend)
1029 ##############################################################################
1030
1031 list(APPEND VNET_SOURCES
1032   devices/tap/cli.c
1033   devices/tap/tap.c
1034   devices/tap/tapv2_api.c
1035 )
1036
1037 list(APPEND VNET_HEADERS
1038   devices/tap/tap.h
1039 )
1040
1041 list(APPEND VNET_API_FILES
1042   devices/tap/tapv2.api
1043 )
1044
1045 ##############################################################################
1046 # tap interface (with virtio backend)
1047 ##############################################################################
1048
1049 list(APPEND VNET_SOURCES
1050   devices/pipe/pipe_api.c
1051   devices/pipe/pipe.c
1052 )
1053
1054 list(APPEND VNET_HEADERS
1055   devices/pipe/pipe.h
1056 )
1057
1058 list(APPEND VNET_API_FILES devices/pipe/pipe.api)
1059
1060 ##############################################################################
1061 # session managmeent
1062 ##############################################################################
1063
1064 list(APPEND VNET_SOURCES
1065   session/session.c
1066   session/session_debug.c
1067   session/session_table.c
1068   session/session_rules_table.c
1069   session/session_lookup.c
1070   session/session_node.c
1071   session/transport.c
1072   session/application.c
1073   session/application_worker.c
1074   session/session_cli.c
1075   session/application_interface.c
1076   session/application_local.c
1077   session/application_namespace.c
1078   session/segment_manager.c
1079   session/session_api.c
1080 )
1081
1082 list(APPEND VNET_HEADERS
1083   session/session.h
1084   session/session_table.h
1085   session/session_rules_table.h
1086   session/session_types.h
1087   session/session_lookup.h
1088   session/application.h
1089   session/transport.h
1090   session/transport_types.h
1091   session/application_interface.h
1092   session/application_local.h
1093   session/application_namespace.h
1094   session/session_debug.h
1095   session/segment_manager.h
1096   session/mma_template.h
1097   session/mma_template.c
1098   session/mma_16.h
1099   session/mma_40.h
1100 )
1101
1102 list(APPEND VNET_API_FILES session/session.api)
1103
1104 ##############################################################################
1105 # TLS protocol
1106 ##############################################################################
1107
1108 list(APPEND VNET_SOURCES
1109   tls/tls.c
1110 )
1111
1112 list(APPEND VNET_HEADERS
1113   tls/tls.h
1114   tls/tls_test.h
1115 )
1116
1117 ##############################################################################
1118 # Linux packet interface
1119 ##############################################################################
1120
1121 list(APPEND VNET_SOURCES
1122   devices/af_packet/af_packet.c
1123   devices/af_packet/device.c
1124   devices/af_packet/node.c
1125   devices/af_packet/cli.c
1126   devices/af_packet/af_packet_api.c
1127 )
1128
1129 list(APPEND VNET_MULTIARCH_SOURCES
1130   devices/af_packet/device.c
1131 )
1132
1133 list(APPEND VNET_HEADERS
1134   devices/af_packet/af_packet.h
1135 )
1136
1137 list(APPEND VNET_API_FILES devices/af_packet/af_packet.api)
1138
1139 ##############################################################################
1140 # Driver feature graph arc support
1141 ##############################################################################
1142
1143 list(APPEND VNET_SOURCES
1144   feature/feature.c
1145   feature/feature_api.c
1146   feature/registration.c
1147 )
1148
1149 list(APPEND VNET_HEADERS
1150   feature/feature.h
1151 )
1152
1153 list(APPEND VNET_API_FILES feature/feature.api)
1154
1155 ##############################################################################
1156 # Unix kernel related
1157 ##############################################################################
1158
1159 # FIXME: unix/hgshm.c
1160
1161 list(APPEND VNET_SOURCES
1162   unix/gdb_funcs.c
1163   unix/tuntap.c
1164 )
1165
1166 list(APPEND VNET_HEADERS
1167   unix/tuntap.h
1168 )
1169
1170 ##############################################################################
1171 # FIB
1172 ##############################################################################
1173
1174 list(APPEND VNET_SOURCES
1175   fib/fib.c
1176   fib/ip4_fib.c
1177   fib/ip6_fib.c
1178   fib/mpls_fib.c
1179   fib/fib_table.c
1180   fib/fib_walk.c
1181   fib/fib_types.c
1182   fib/fib_node.c
1183   fib/fib_node_list.c
1184   fib/fib_entry.c
1185   fib/fib_entry_src.c
1186   fib/fib_entry_src_adj.c
1187   fib/fib_entry_src_api.c
1188   fib/fib_entry_src_drop.c
1189   fib/fib_entry_src_interface.c
1190   fib/fib_entry_src_interpose.c
1191   fib/fib_entry_src_lisp.c
1192   fib/fib_entry_src_mpls.c
1193   fib/fib_entry_src_simple.c
1194   fib/fib_entry_src_rr.c
1195   fib/fib_entry_cover.c
1196   fib/fib_entry_delegate.c
1197   fib/fib_entry_track.c
1198   fib/fib_path_list.c
1199   fib/fib_path.c
1200   fib/fib_path_ext.c
1201   fib/fib_sas.c
1202   fib/fib_source.c
1203   fib/fib_urpf_list.c
1204   fib/fib_attached_export.c
1205   fib/fib_api.c
1206   fib/fib_bfd.c
1207 )
1208
1209 list(APPEND VNET_HEADERS
1210   fib/fib.h
1211   fib/fib_api.h
1212   fib/ip4_fib.h
1213   fib/ip6_fib.h
1214   fib/fib_types.h
1215   fib/fib_table.h
1216   fib/fib_node.h
1217   fib/fib_node_list.h
1218   fib/fib_entry.h
1219   fib/fib_entry_delegate.h
1220   fib/fib_sas.h
1221   fib/fib_source.h
1222 )
1223
1224 list(APPEND VNET_API_FILES fib/fib_types.api)
1225
1226 ##############################################################################
1227 # ADJ
1228 ##############################################################################
1229
1230 list(APPEND VNET_SOURCES
1231   adj/adj_nbr.c
1232   adj/adj_glean.c
1233   adj/adj_midchain.c
1234   adj/adj_midchain_delegate.c
1235   adj/adj_mcast.c
1236   adj/adj_l2.c
1237   adj/adj_nsh.c
1238   adj/adj.c
1239   adj/rewrite.c
1240   adj/adj_bfd.c
1241   adj/adj_delegate.c
1242 )
1243
1244 list(APPEND VNET_MULTIARCH_SOURCES
1245   adj/adj_nsh.c
1246   adj/adj_l2.c
1247   adj/adj_midchain.c
1248 )
1249
1250 list(APPEND VNET_HEADERS
1251   adj/adj.h
1252   adj/adj_types.h
1253   adj/adj_glean.h
1254   adj/adj_nsh.h
1255   adj/adj_nbr.h
1256   adj/adj_midchain.h
1257   adj/rewrite.h
1258 )
1259
1260 ##############################################################################
1261 # Data-Plane Objects
1262 ##############################################################################
1263
1264 list(APPEND VNET_SOURCES
1265   dpo/dpo.c
1266   dpo/drop_dpo.c
1267   dpo/ip_null_dpo.c
1268   dpo/ip6_ll_dpo.c
1269   dpo/punt_dpo.c
1270   dpo/receive_dpo.c
1271   dpo/load_balance.c
1272   dpo/load_balance_map.c
1273   dpo/lookup_dpo.c
1274   dpo/classify_dpo.c
1275   dpo/replicate_dpo.c
1276   dpo/interface_rx_dpo.c
1277   dpo/interface_tx_dpo.c
1278   dpo/mpls_disposition.c
1279   dpo/mpls_label_dpo.c
1280   dpo/l3_proxy_dpo.c
1281   dpo/dvr_dpo.c
1282   dpo/pw_cw.c
1283 )
1284
1285 list(APPEND VNET_MULTIARCH_SOURCES
1286   dpo/lookup_dpo.h
1287   dpo/mpls_disposition.c
1288   dpo/dvr_dpo.c
1289   dpo/mpls_label_dpo.c
1290   dpo/interface_rx_dpo.c
1291 )
1292
1293 list(APPEND VNET_HEADERS
1294   dpo/load_balance.h
1295   dpo/drop_dpo.h
1296   dpo/lookup_dpo.h
1297   dpo/punt_dpo.h
1298   dpo/classify_dpo.h
1299   dpo/receive_dpo.h
1300   dpo/ip_null_dpo.h
1301   dpo/replicate_dpo.h
1302   dpo/dpo.h
1303 )
1304
1305 ##############################################################################
1306 # Multicast FIB
1307 ##############################################################################
1308
1309 list(APPEND VNET_SOURCES
1310   mfib/mfib_forward.c
1311   mfib/ip4_mfib.c
1312   mfib/ip6_mfib.c
1313   mfib/mfib_api.c
1314   mfib/mfib_types.c
1315   mfib/mfib_signal.c
1316   mfib/mfib_itf.c
1317   mfib/mfib_entry.c
1318   mfib/mfib_entry.c
1319   mfib/mfib_entry_cover.c
1320   mfib/mfib_entry_delegate.c
1321   mfib/mfib_entry_src.c
1322   mfib/mfib_entry_src_rr.c
1323   mfib/mfib_table.c
1324 )
1325
1326 list(APPEND VNET_MULTIARCH_SOURCES
1327   mfib/mfib_forward.c
1328 )
1329
1330 list(APPEND VNET_HEADERS
1331   mfib/ip4_mfib.h
1332   mfib/mfib_types.h
1333   mfib/mfib_table.h
1334 )
1335
1336 list(APPEND VNET_API_FILES mfib/mfib_types.api)
1337
1338 ##############################################################################
1339 # Utilities
1340 ##############################################################################
1341
1342 list(APPEND VNET_SOURCES
1343   util/radix.c
1344   util/refcount.c
1345   util/throttle.c
1346   util/trajectory.c
1347 )
1348
1349 list(APPEND VNET_HEADERS
1350   util/throttle.h
1351 )
1352
1353 ##############################################################################
1354 # QoS
1355 ##############################################################################
1356
1357 list(APPEND VNET_SOURCES
1358   qos/qos_types.c
1359   qos/qos_api.c
1360   qos/qos_egress_map.c
1361   qos/qos_record.c
1362   qos/qos_record_node.c
1363   qos/qos_store.c
1364   qos/qos_store_node.c
1365   qos/qos_mark.c
1366   qos/qos_mark_node.c
1367 )
1368
1369 list(APPEND VNET_MULTIARCH_SOURCES
1370   qos/qos_record_node.c
1371   qos/qos_mark_node.c
1372 )
1373
1374 list(APPEND VNET_API_FILES qos/qos.api)
1375
1376 ##############################################################################
1377 # BIER
1378 ##############################################################################
1379
1380 list(APPEND VNET_SOURCES
1381   bier/bier_bit_string.c
1382   bier/bier_entry.c
1383   bier/bier_fmask.c
1384   bier/bier_fmask_db.c
1385   bier/bier_input.c
1386   bier/bier_lookup.c
1387   bier/bier_output.c
1388   bier/bier_table.c
1389   bier/bier_types.c
1390   bier/bier_api.c
1391   bier/bier_drop.c
1392   bier/bier_update.c
1393   bier/bier_imp_node.c
1394   bier/bier_imp.c
1395   bier/bier_disp_entry.c
1396   bier/bier_disp_lookup_node.c
1397   bier/bier_disp_dispatch_node.c
1398   bier/bier_disp_table.c
1399   bier/bier_bift_table.c
1400 )
1401
1402 list(APPEND VNET_MULTIARCH_SOURCES
1403   bier/bier_disp_dispatch_node.c
1404   bier/bier_disp_lookup_node.c
1405   bier/bier_imp_node.c
1406 )
1407
1408 list(APPEND VNET_HEADERS
1409   bier/bier_types.h
1410   bier/bier_entry.h
1411   bier/bier_update.h
1412   bier/bier_table.h
1413 )
1414
1415 list(APPEND VNET_API_FILES bier/bier.api)
1416
1417 ##############################################################################
1418 # SYSLOG
1419 ##############################################################################
1420
1421 list (APPEND VNET_SOURCES
1422   syslog/syslog_api.c
1423   syslog/syslog_udp.c
1424   syslog/syslog.c
1425 )
1426
1427 list(APPEND VNET_HEADERS
1428   syslog/syslog_udp.h
1429   syslog/syslog.h
1430 )
1431
1432 list(APPEND VNET_API_FILES syslog/syslog.api)
1433
1434 ##############################################################################
1435 # Tunnel Endpoint Information Base
1436 ##############################################################################
1437
1438 list (APPEND VNET_SOURCES
1439   teib/teib_api.c
1440   teib/teib_cli.c
1441   teib/teib.c
1442 )
1443
1444 list(APPEND VNET_HEADERS
1445   teib/teib.h
1446 )
1447
1448 list(APPEND VNET_API_FILES teib/teib.api)
1449
1450 ##############################################################################
1451 # ARP/ND
1452 ##############################################################################
1453
1454 list (APPEND VNET_SOURCES
1455   arp/arp_api.c
1456   arp/arp.c
1457   arp/arp_proxy.c
1458 )
1459
1460 list(APPEND VNET_HEADERS
1461   arp/arp.h
1462 )
1463
1464 list(APPEND VNET_API_FILES arp/arp.api)
1465
1466 list (APPEND VNET_SOURCES
1467   ip6-nd/ip6_mld.c
1468   ip6-nd/ip6_nd.c
1469   ip6-nd/ip6_nd_api.c
1470   ip6-nd/ip6_nd_proxy.c
1471   ip6-nd/ip6_ra.c
1472   ip6-nd/rd_cp.c
1473   ip6-nd/rd_cp_api.c
1474 )
1475
1476 list(APPEND VNET_HEADERS
1477   ip6-nd/ip6_nd.h
1478 )
1479
1480 list(APPEND VNET_API_FILES
1481   ip6-nd/ip6_nd.api
1482   ip6-nd/rd_cp.api
1483 )
1484
1485 ##############################################################################
1486 # VNET Library
1487 ##############################################################################
1488
1489 add_vpp_library(vnet
1490   SOURCES ${VNET_SOURCES}
1491   MULTIARCH_SOURCES ${VNET_MULTIARCH_SOURCES}
1492   INSTALL_HEADERS ${VNET_HEADERS}
1493   API_FILES ${VNET_API_FILES}
1494   LINK_LIBRARIES vppinfra svm vlib ${OPENSSL_LIBRARIES}
1495   DEPENDS vpp_version_h api_headers
1496 )
1497
1498 ##############################################################################
1499 # vpp api test client library
1500 ##############################################################################
1501
1502 add_vpp_library (vatclient
1503   SOURCES ip/ip_types_api.c
1504   DEPENDS api_headers
1505 )
1506
1507 ##############################################################################
1508 # VAT2 plugins
1509 ##############################################################################
1510 add_vpp_test_library(vnet
1511   ${VNET_API_FILES}
1512 )
1513
1514 ##############################################################################