Line data Source code
1 : #include "topology.h"
2 : #include "config.h"
3 : #include "../shared/boot/fd_boot.h"
4 : #include "../shared/commands/configure/configure.h"
5 :
6 : char const * FD_APP_NAME = "Firedancer";
7 : char const * FD_BINARY_NAME = "firedancer";
8 :
9 : extern fd_topo_obj_callbacks_t fd_obj_cb_mcache;
10 : extern fd_topo_obj_callbacks_t fd_obj_cb_dcache;
11 : extern fd_topo_obj_callbacks_t fd_obj_cb_fseq;
12 : extern fd_topo_obj_callbacks_t fd_obj_cb_metrics;
13 : extern fd_topo_obj_callbacks_t fd_obj_cb_dbl_buf;
14 : extern fd_topo_obj_callbacks_t fd_obj_cb_neigh4_hmap;
15 : extern fd_topo_obj_callbacks_t fd_obj_cb_fib4;
16 : extern fd_topo_obj_callbacks_t fd_obj_cb_keyswitch;
17 : extern fd_topo_obj_callbacks_t fd_obj_cb_tile;
18 : extern fd_topo_obj_callbacks_t fd_obj_cb_store;
19 : extern fd_topo_obj_callbacks_t fd_obj_cb_fec_sets;
20 : extern fd_topo_obj_callbacks_t fd_obj_cb_txncache;
21 : extern fd_topo_obj_callbacks_t fd_obj_cb_banks;
22 : extern fd_topo_obj_callbacks_t fd_obj_cb_funk;
23 :
24 : fd_topo_obj_callbacks_t * CALLBACKS[] = {
25 : &fd_obj_cb_mcache,
26 : &fd_obj_cb_dcache,
27 : &fd_obj_cb_fseq,
28 : &fd_obj_cb_metrics,
29 : &fd_obj_cb_dbl_buf,
30 : &fd_obj_cb_neigh4_hmap,
31 : &fd_obj_cb_fib4,
32 : &fd_obj_cb_keyswitch,
33 : &fd_obj_cb_tile,
34 : &fd_obj_cb_store,
35 : &fd_obj_cb_fec_sets,
36 : &fd_obj_cb_txncache,
37 : &fd_obj_cb_banks,
38 : &fd_obj_cb_funk,
39 : NULL,
40 : };
41 :
42 : extern configure_stage_t fd_cfg_stage_vinyl;
43 :
44 : configure_stage_t * STAGES[] = {
45 : &fd_cfg_stage_hugetlbfs,
46 : &fd_cfg_stage_sysctl,
47 : &fd_cfg_stage_bonding,
48 : &fd_cfg_stage_ethtool_channels,
49 : &fd_cfg_stage_ethtool_offloads,
50 : &fd_cfg_stage_ethtool_loopback,
51 : &fd_cfg_stage_snapshots,
52 : &fd_cfg_stage_vinyl,
53 : NULL,
54 : };
55 :
56 :
57 : extern fd_topo_run_tile_t fd_tile_net;
58 : extern fd_topo_run_tile_t fd_tile_netlnk;
59 : extern fd_topo_run_tile_t fd_tile_sock;
60 : extern fd_topo_run_tile_t fd_tile_quic;
61 : extern fd_topo_run_tile_t fd_tile_verify;
62 : extern fd_topo_run_tile_t fd_tile_dedup;
63 : extern fd_topo_run_tile_t fd_tile_resolv;
64 : extern fd_topo_run_tile_t fd_tile_pack;
65 : extern fd_topo_run_tile_t fd_tile_bank;
66 : extern fd_topo_run_tile_t fd_tile_poh;
67 : extern fd_topo_run_tile_t fd_tile_shred;
68 : extern fd_topo_run_tile_t fd_tile_sign;
69 : extern fd_topo_run_tile_t fd_tile_metric;
70 : extern fd_topo_run_tile_t fd_tile_cswtch;
71 : extern fd_topo_run_tile_t fd_tile_gui;
72 : extern fd_topo_run_tile_t fd_tile_rpc;
73 : extern fd_topo_run_tile_t fd_tile_plugin;
74 : extern fd_topo_run_tile_t fd_tile_bundle;
75 : #if FD_HAS_BZIP2
76 : extern fd_topo_run_tile_t fd_tile_genesi;
77 : #endif
78 : extern fd_topo_run_tile_t fd_tile_ipecho;
79 :
80 : extern fd_topo_run_tile_t fd_tile_gossvf;
81 : extern fd_topo_run_tile_t fd_tile_gossip;
82 : extern fd_topo_run_tile_t fd_tile_repair;
83 : extern fd_topo_run_tile_t fd_tile_replay;
84 : extern fd_topo_run_tile_t fd_tile_execor;
85 : extern fd_topo_run_tile_t fd_tile_send;
86 : extern fd_topo_run_tile_t fd_tile_tower;
87 :
88 : extern fd_topo_run_tile_t fd_tile_snapct;
89 : extern fd_topo_run_tile_t fd_tile_snapld;
90 : extern fd_topo_run_tile_t fd_tile_snapdc;
91 : extern fd_topo_run_tile_t fd_tile_snapin;
92 : extern fd_topo_run_tile_t fd_tile_snapwh;
93 : extern fd_topo_run_tile_t fd_tile_snapwr;
94 : extern fd_topo_run_tile_t fd_tile_snapla;
95 : extern fd_topo_run_tile_t fd_tile_snapls;
96 :
97 : fd_topo_run_tile_t * TILES[] = {
98 : &fd_tile_net,
99 : &fd_tile_netlnk,
100 : &fd_tile_sock,
101 : &fd_tile_quic,
102 : &fd_tile_verify,
103 : &fd_tile_dedup,
104 : &fd_tile_resolv,
105 : &fd_tile_pack,
106 : &fd_tile_bank,
107 : &fd_tile_shred,
108 : &fd_tile_sign,
109 : &fd_tile_metric,
110 : &fd_tile_cswtch,
111 : &fd_tile_gui,
112 : &fd_tile_rpc,
113 : &fd_tile_plugin,
114 : &fd_tile_bundle,
115 : &fd_tile_gossvf,
116 : &fd_tile_gossip,
117 : &fd_tile_repair,
118 : &fd_tile_replay,
119 : &fd_tile_execor,
120 : &fd_tile_poh,
121 : &fd_tile_send,
122 : &fd_tile_tower,
123 : &fd_tile_snapct,
124 : &fd_tile_snapld,
125 : &fd_tile_snapdc,
126 : &fd_tile_snapin,
127 : &fd_tile_snapwh,
128 : &fd_tile_snapwr,
129 : &fd_tile_snapla,
130 : &fd_tile_snapls,
131 : # if FD_HAS_BZIP2
132 : &fd_tile_genesi,
133 : # endif
134 : &fd_tile_ipecho,
135 : NULL,
136 : };
137 :
138 : extern action_t fd_action_run;
139 : extern action_t fd_action_run1;
140 : extern action_t fd_action_configure;
141 : extern action_t fd_action_monitor;
142 : extern action_t fd_action_keys;
143 : extern action_t fd_action_ready;
144 : extern action_t fd_action_mem;
145 : extern action_t fd_action_netconf;
146 : extern action_t fd_action_set_identity;
147 : extern action_t fd_action_help;
148 : extern action_t fd_action_metrics;
149 : extern action_t fd_action_version;
150 : extern action_t fd_action_shred_version;
151 : extern action_t fd_action_watch;
152 :
153 : action_t * ACTIONS[] = {
154 : &fd_action_run,
155 : &fd_action_run1,
156 : &fd_action_configure,
157 : &fd_action_monitor,
158 : &fd_action_keys,
159 : &fd_action_ready,
160 : &fd_action_mem,
161 : &fd_action_netconf,
162 : &fd_action_set_identity,
163 : &fd_action_help,
164 : &fd_action_metrics,
165 : &fd_action_version,
166 : &fd_action_shred_version,
167 : &fd_action_watch,
168 : NULL,
169 : };
170 :
171 : int
172 : main( int argc,
173 9 : char ** argv ) {
174 9 : fd_config_file_t _default = fd_config_file_default();
175 9 : fd_config_file_t testnet = fd_config_file_testnet();
176 9 : fd_config_file_t devnet = fd_config_file_devnet();
177 9 : fd_config_file_t mainnet = fd_config_file_mainnet();
178 :
179 9 : fd_config_file_t * configs[] = {
180 9 : &_default,
181 9 : &testnet,
182 9 : &devnet,
183 9 : &mainnet,
184 9 : NULL
185 9 : };
186 :
187 9 : return fd_main( argc, argv, 1, configs, fd_topo_initialize );
188 9 : }
189 :
190 : /* Kind of a hack for now, we sometimes want to view bench generation
191 : in the monitor binary, but it's not part of the production binary. */
192 :
193 : void
194 : add_bench_topo( fd_topo_t * topo,
195 : char const * affinity,
196 : ulong benchg_tile_cnt,
197 : ulong benchs_tile_cnt,
198 : ulong accounts_cnt,
199 : int transaction_mode,
200 : float contending_fraction,
201 : float cu_price_spread,
202 : ulong conn_cnt,
203 : ushort send_to_port,
204 : uint send_to_ip_addr,
205 : ushort rpc_port,
206 : uint rpc_ip_addr,
207 : int no_quic,
208 0 : int reserve_agave_cores ) {
209 0 : (void)topo;
210 0 : (void)affinity;
211 0 : (void)benchg_tile_cnt;
212 0 : (void)benchs_tile_cnt;
213 0 : (void)accounts_cnt;
214 0 : (void)transaction_mode;
215 0 : (void)contending_fraction;
216 0 : (void)cu_price_spread;
217 0 : (void)conn_cnt;
218 0 : (void)send_to_port;
219 0 : (void)send_to_ip_addr;
220 0 : (void)rpc_port;
221 0 : (void)rpc_ip_addr;
222 0 : (void)no_quic;
223 0 : (void)reserve_agave_cores;
224 0 : }
|