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 : extern fd_topo_run_tile_t fd_tile_genesi;
76 : extern fd_topo_run_tile_t fd_tile_ipecho;
77 :
78 : extern fd_topo_run_tile_t fd_tile_gossvf;
79 : extern fd_topo_run_tile_t fd_tile_gossip;
80 : extern fd_topo_run_tile_t fd_tile_repair;
81 : extern fd_topo_run_tile_t fd_tile_replay;
82 : extern fd_topo_run_tile_t fd_tile_execor;
83 : extern fd_topo_run_tile_t fd_tile_send;
84 : extern fd_topo_run_tile_t fd_tile_tower;
85 :
86 : extern fd_topo_run_tile_t fd_tile_snapct;
87 : extern fd_topo_run_tile_t fd_tile_snapld;
88 : extern fd_topo_run_tile_t fd_tile_snapdc;
89 : extern fd_topo_run_tile_t fd_tile_snapin;
90 : extern fd_topo_run_tile_t fd_tile_snapwh;
91 : extern fd_topo_run_tile_t fd_tile_snapwr;
92 : extern fd_topo_run_tile_t fd_tile_snapla;
93 : extern fd_topo_run_tile_t fd_tile_snapls;
94 :
95 : fd_topo_run_tile_t * TILES[] = {
96 : &fd_tile_net,
97 : &fd_tile_netlnk,
98 : &fd_tile_sock,
99 : &fd_tile_quic,
100 : &fd_tile_verify,
101 : &fd_tile_dedup,
102 : &fd_tile_resolv,
103 : &fd_tile_pack,
104 : &fd_tile_bank,
105 : &fd_tile_shred,
106 : &fd_tile_sign,
107 : &fd_tile_metric,
108 : &fd_tile_cswtch,
109 : &fd_tile_gui,
110 : &fd_tile_rpc,
111 : &fd_tile_plugin,
112 : &fd_tile_bundle,
113 : &fd_tile_gossvf,
114 : &fd_tile_gossip,
115 : &fd_tile_repair,
116 : &fd_tile_replay,
117 : &fd_tile_execor,
118 : &fd_tile_poh,
119 : &fd_tile_send,
120 : &fd_tile_tower,
121 : &fd_tile_snapct,
122 : &fd_tile_snapld,
123 : &fd_tile_snapdc,
124 : &fd_tile_snapin,
125 : &fd_tile_snapwh,
126 : &fd_tile_snapwr,
127 : &fd_tile_snapla,
128 : &fd_tile_snapls,
129 : &fd_tile_genesi,
130 : &fd_tile_ipecho,
131 : NULL,
132 : };
133 :
134 : extern action_t fd_action_run;
135 : extern action_t fd_action_run1;
136 : extern action_t fd_action_configure;
137 : extern action_t fd_action_monitor;
138 : extern action_t fd_action_keys;
139 : extern action_t fd_action_ready;
140 : extern action_t fd_action_mem;
141 : extern action_t fd_action_netconf;
142 : extern action_t fd_action_set_identity;
143 : extern action_t fd_action_help;
144 : extern action_t fd_action_metrics;
145 : extern action_t fd_action_version;
146 : extern action_t fd_action_shred_version;
147 : extern action_t fd_action_watch;
148 :
149 : action_t * ACTIONS[] = {
150 : &fd_action_run,
151 : &fd_action_run1,
152 : &fd_action_configure,
153 : &fd_action_monitor,
154 : &fd_action_keys,
155 : &fd_action_ready,
156 : &fd_action_mem,
157 : &fd_action_netconf,
158 : &fd_action_set_identity,
159 : &fd_action_help,
160 : &fd_action_metrics,
161 : &fd_action_version,
162 : &fd_action_shred_version,
163 : &fd_action_watch,
164 : NULL,
165 : };
166 :
167 : int
168 : main( int argc,
169 9 : char ** argv ) {
170 9 : fd_config_file_t _default = fd_config_file_default();
171 9 : fd_config_file_t testnet = fd_config_file_testnet();
172 9 : fd_config_file_t devnet = fd_config_file_devnet();
173 9 : fd_config_file_t mainnet = fd_config_file_mainnet();
174 :
175 9 : fd_config_file_t * configs[] = {
176 9 : &_default,
177 9 : &testnet,
178 9 : &devnet,
179 9 : &mainnet,
180 9 : NULL
181 9 : };
182 :
183 9 : return fd_main( argc, argv, 1, configs, fd_topo_initialize );
184 9 : }
185 :
186 : /* Kind of a hack for now, we sometimes want to view bench generation
187 : in the monitor binary, but it's not part of the production binary. */
188 :
189 : void
190 : add_bench_topo( fd_topo_t * topo,
191 : char const * affinity,
192 : ulong benchg_tile_cnt,
193 : ulong benchs_tile_cnt,
194 : ulong accounts_cnt,
195 : int transaction_mode,
196 : float contending_fraction,
197 : float cu_price_spread,
198 : ulong conn_cnt,
199 : ushort send_to_port,
200 : uint send_to_ip_addr,
201 : ushort rpc_port,
202 : uint rpc_ip_addr,
203 : int no_quic,
204 0 : int reserve_agave_cores ) {
205 0 : (void)topo;
206 0 : (void)affinity;
207 0 : (void)benchg_tile_cnt;
208 0 : (void)benchs_tile_cnt;
209 0 : (void)accounts_cnt;
210 0 : (void)transaction_mode;
211 0 : (void)contending_fraction;
212 0 : (void)cu_price_spread;
213 0 : (void)conn_cnt;
214 0 : (void)send_to_port;
215 0 : (void)send_to_ip_addr;
216 0 : (void)rpc_port;
217 0 : (void)rpc_ip_addr;
218 0 : (void)no_quic;
219 0 : (void)reserve_agave_cores;
220 0 : }
|