Line data Source code
1 : #include "topology.h"
2 : #include "config.h"
3 : #include "../shared/fd_config_file.h"
4 : #include "../shared/boot/fd_boot.h"
5 : #include "../shared/commands/configure/configure.h"
6 :
7 : char const * FD_APP_NAME = "Frankendancer";
8 : char const * FD_BINARY_NAME = "fdctl";
9 :
10 : extern fd_topo_obj_callbacks_t fd_obj_cb_mcache;
11 : extern fd_topo_obj_callbacks_t fd_obj_cb_dcache;
12 : extern fd_topo_obj_callbacks_t fd_obj_cb_fseq;
13 : extern fd_topo_obj_callbacks_t fd_obj_cb_metrics;
14 : extern fd_topo_obj_callbacks_t fd_obj_cb_dbl_buf;
15 : extern fd_topo_obj_callbacks_t fd_obj_cb_neigh4_hmap;
16 : extern fd_topo_obj_callbacks_t fd_obj_cb_fib4;
17 : extern fd_topo_obj_callbacks_t fd_obj_cb_keyswitch;
18 : extern fd_topo_obj_callbacks_t fd_obj_cb_tile;
19 :
20 : fd_topo_obj_callbacks_t * CALLBACKS[] = {
21 : &fd_obj_cb_mcache,
22 : &fd_obj_cb_dcache,
23 : &fd_obj_cb_fseq,
24 : &fd_obj_cb_metrics,
25 : &fd_obj_cb_dbl_buf,
26 : &fd_obj_cb_neigh4_hmap,
27 : &fd_obj_cb_fib4,
28 : &fd_obj_cb_keyswitch,
29 : &fd_obj_cb_tile,
30 : NULL,
31 : };
32 :
33 : configure_stage_t * STAGES[] = {
34 : &fd_cfg_stage_hugetlbfs,
35 : &fd_cfg_stage_sysctl,
36 : &fd_cfg_stage_hyperthreads,
37 : &fd_cfg_stage_bonding,
38 : &fd_cfg_stage_ethtool_channels,
39 : &fd_cfg_stage_ethtool_offloads,
40 : &fd_cfg_stage_ethtool_loopback,
41 : NULL,
42 : };
43 :
44 : extern fd_topo_run_tile_t fd_tile_net;
45 : extern fd_topo_run_tile_t fd_tile_netlnk;
46 : extern fd_topo_run_tile_t fd_tile_sock;
47 : extern fd_topo_run_tile_t fd_tile_quic;
48 : extern fd_topo_run_tile_t fd_tile_bundle;
49 : extern fd_topo_run_tile_t fd_tile_verify;
50 : extern fd_topo_run_tile_t fd_tile_dedup;
51 : extern fd_topo_run_tile_t fd_tile_pack;
52 : extern fd_topo_run_tile_t fd_tile_shred;
53 : extern fd_topo_run_tile_t fd_tile_sign;
54 : extern fd_topo_run_tile_t fd_tile_metric;
55 : extern fd_topo_run_tile_t fd_tile_cswtch;
56 : extern fd_topo_run_tile_t fd_tile_gui;
57 : extern fd_topo_run_tile_t fd_tile_plugin;
58 : extern fd_topo_run_tile_t fd_tile_resolv;
59 : extern fd_topo_run_tile_t fd_tile_poh;
60 : extern fd_topo_run_tile_t fd_tile_bank;
61 : extern fd_topo_run_tile_t fd_tile_store;
62 :
63 : fd_topo_run_tile_t * TILES[] = {
64 : &fd_tile_net,
65 : &fd_tile_netlnk,
66 : &fd_tile_sock,
67 : &fd_tile_quic,
68 : &fd_tile_bundle,
69 : &fd_tile_verify,
70 : &fd_tile_dedup,
71 : &fd_tile_pack,
72 : &fd_tile_shred,
73 : &fd_tile_sign,
74 : &fd_tile_metric,
75 : &fd_tile_cswtch,
76 : &fd_tile_gui,
77 : &fd_tile_plugin,
78 : &fd_tile_resolv,
79 : &fd_tile_poh,
80 : &fd_tile_bank,
81 : &fd_tile_store,
82 : NULL,
83 : };
84 :
85 : extern action_t fd_action_run;
86 : extern action_t fd_action_run1;
87 : extern action_t fd_action_run_agave;
88 : extern action_t fd_action_configure;
89 : extern action_t fd_action_monitor;
90 : extern action_t fd_action_keys;
91 : extern action_t fd_action_ready;
92 : extern action_t fd_action_mem;
93 : extern action_t fd_action_netconf;
94 : extern action_t fd_action_set_identity;
95 : extern action_t fd_action_get_identity;
96 : extern action_t fd_action_help;
97 : extern action_t fd_action_version;
98 : extern action_t fd_action_metrics;
99 :
100 : action_t * ACTIONS[] = {
101 : &fd_action_run,
102 : &fd_action_run1,
103 : &fd_action_run_agave,
104 : &fd_action_configure,
105 : &fd_action_monitor,
106 : &fd_action_keys,
107 : &fd_action_ready,
108 : &fd_action_mem,
109 : &fd_action_netconf,
110 : &fd_action_set_identity,
111 : &fd_action_get_identity,
112 : &fd_action_help,
113 : &fd_action_version,
114 : &fd_action_metrics,
115 : NULL,
116 : };
117 :
118 : int
119 : main( int argc,
120 9 : char ** argv ) {
121 9 : fd_config_file_t _default = (fd_config_file_t){
122 9 : .name = "default",
123 9 : .data = fdctl_default_config,
124 9 : .data_sz = fdctl_default_config_sz,
125 9 : };
126 :
127 9 : fd_config_file_t * configs[] = {
128 9 : &_default,
129 9 : NULL
130 9 : };
131 :
132 9 : return fd_main( argc, argv, 0, configs, fd_topo_initialize );
133 9 : }
134 :
135 : /* Kind of a hack for now, we sometimes want to view bench generation
136 : in the monitor binary, but it's not part of the production binary. */
137 :
138 : void
139 : add_bench_topo( fd_topo_t * topo,
140 : char const * affinity,
141 : ulong benchg_tile_cnt,
142 : ulong benchs_tile_cnt,
143 : ulong accounts_cnt,
144 : int transaction_mode,
145 : float contending_fraction,
146 : float cu_price_spread,
147 : ulong conn_cnt,
148 : ushort send_to_port,
149 : uint send_to_ip_addr,
150 : ushort rpc_port,
151 : uint rpc_ip_addr,
152 : int no_quic,
153 0 : int reserve_agave_cores ) {
154 0 : (void)topo;
155 0 : (void)affinity;
156 0 : (void)benchg_tile_cnt;
157 0 : (void)benchs_tile_cnt;
158 0 : (void)accounts_cnt;
159 0 : (void)transaction_mode;
160 0 : (void)contending_fraction;
161 0 : (void)cu_price_spread;
162 0 : (void)conn_cnt;
163 0 : (void)send_to_port;
164 0 : (void)send_to_ip_addr;
165 0 : (void)rpc_port;
166 0 : (void)rpc_ip_addr;
167 0 : (void)no_quic;
168 0 : (void)reserve_agave_cores;
169 0 : }
|