LCOV - code coverage report
Current view: top level - app/fdctl - main.c (source / functions) Hit Total Coverage
Test: cov.lcov Lines: 3 20 15.0 %
Date: 2025-07-01 05:00:49 Functions: 1 2 50.0 %

          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    = "Frankendancer";
       7             : char const * FD_BINARY_NAME = "fdctl";
       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_cnc;
      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_opaque;
      15             : extern fd_topo_obj_callbacks_t fd_obj_cb_dbl_buf;
      16             : extern fd_topo_obj_callbacks_t fd_obj_cb_neigh4_hmap;
      17             : extern fd_topo_obj_callbacks_t fd_obj_cb_fib4;
      18             : extern fd_topo_obj_callbacks_t fd_obj_cb_keyswitch;
      19             : extern fd_topo_obj_callbacks_t fd_obj_cb_tile;
      20             : 
      21             : fd_topo_obj_callbacks_t * CALLBACKS[] = {
      22             :   &fd_obj_cb_mcache,
      23             :   &fd_obj_cb_dcache,
      24             :   &fd_obj_cb_cnc,
      25             :   &fd_obj_cb_fseq,
      26             :   &fd_obj_cb_metrics,
      27             :   &fd_obj_cb_opaque,
      28             :   &fd_obj_cb_dbl_buf,
      29             :   &fd_obj_cb_neigh4_hmap,
      30             :   &fd_obj_cb_fib4,
      31             :   &fd_obj_cb_keyswitch,
      32             :   &fd_obj_cb_tile,
      33             :   NULL,
      34             : };
      35             : 
      36             : configure_stage_t * STAGES[] = {
      37             :   &fd_cfg_stage_hugetlbfs,
      38             :   &fd_cfg_stage_sysctl,
      39             :   &fd_cfg_stage_hyperthreads,
      40             :   &fd_cfg_stage_ethtool_channels,
      41             :   &fd_cfg_stage_ethtool_gro,
      42             :   &fd_cfg_stage_ethtool_loopback,
      43             :   NULL,
      44             : };
      45             : 
      46             : extern fd_topo_run_tile_t fd_tile_net;
      47             : extern fd_topo_run_tile_t fd_tile_netlnk;
      48             : extern fd_topo_run_tile_t fd_tile_sock;
      49             : extern fd_topo_run_tile_t fd_tile_quic;
      50             : extern fd_topo_run_tile_t fd_tile_bundle;
      51             : extern fd_topo_run_tile_t fd_tile_verify;
      52             : extern fd_topo_run_tile_t fd_tile_dedup;
      53             : extern fd_topo_run_tile_t fd_tile_pack;
      54             : extern fd_topo_run_tile_t fd_tile_shred;
      55             : extern fd_topo_run_tile_t fd_tile_sign;
      56             : extern fd_topo_run_tile_t fd_tile_metric;
      57             : extern fd_topo_run_tile_t fd_tile_cswtch;
      58             : extern fd_topo_run_tile_t fd_tile_gui;
      59             : extern fd_topo_run_tile_t fd_tile_plugin;
      60             : extern fd_topo_run_tile_t fd_tile_resolv;
      61             : extern fd_topo_run_tile_t fd_tile_poh;
      62             : extern fd_topo_run_tile_t fd_tile_bank;
      63             : extern fd_topo_run_tile_t fd_tile_store;
      64             : 
      65             : fd_topo_run_tile_t * TILES[] = {
      66             :   &fd_tile_net,
      67             :   &fd_tile_netlnk,
      68             :   &fd_tile_sock,
      69             :   &fd_tile_quic,
      70             :   &fd_tile_bundle,
      71             :   &fd_tile_verify,
      72             :   &fd_tile_dedup,
      73             :   &fd_tile_pack,
      74             :   &fd_tile_shred,
      75             :   &fd_tile_sign,
      76             :   &fd_tile_metric,
      77             :   &fd_tile_cswtch,
      78             :   &fd_tile_gui,
      79             :   &fd_tile_plugin,
      80             :   &fd_tile_resolv,
      81             :   &fd_tile_poh,
      82             :   &fd_tile_bank,
      83             :   &fd_tile_store,
      84             :   NULL,
      85             : };
      86             : 
      87             : extern action_t fd_action_run;
      88             : extern action_t fd_action_run1;
      89             : extern action_t fd_action_run_agave;
      90             : extern action_t fd_action_configure;
      91             : extern action_t fd_action_monitor;
      92             : extern action_t fd_action_keys;
      93             : extern action_t fd_action_ready;
      94             : extern action_t fd_action_mem;
      95             : extern action_t fd_action_netconf;
      96             : extern action_t fd_action_set_identity;
      97             : extern action_t fd_action_help;
      98             : extern action_t fd_action_version;
      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_help,
     112             :   &fd_action_version,
     113             :   NULL,
     114             : };
     115             : 
     116             : int
     117             : main( int     argc,
     118           9 :       char ** argv ) {
     119           9 :   return fd_main( argc, argv, 0, (char const *)fdctl_default_config, fdctl_default_config_sz, fd_topo_initialize );
     120           9 : }
     121             : 
     122             : /* Kind of a hack for now, we sometimes want to view bench generation
     123             :    in the monitor binary, but it's not part of the production binary. */
     124             : 
     125             : void
     126             : add_bench_topo( fd_topo_t  * topo,
     127             :                 char const * affinity,
     128             :                 ulong        benchg_tile_cnt,
     129             :                 ulong        benchs_tile_cnt,
     130             :                 ulong        accounts_cnt,
     131             :                 int          transaction_mode,
     132             :                 float        contending_fraction,
     133             :                 float        cu_price_spread,
     134             :                 ulong        conn_cnt,
     135             :                 ushort       send_to_port,
     136             :                 uint         send_to_ip_addr,
     137             :                 ushort       rpc_port,
     138             :                 uint         rpc_ip_addr,
     139             :                 int          no_quic,
     140           0 :                 int          reserve_agave_cores ) {
     141           0 :   (void)topo;
     142           0 :   (void)affinity;
     143           0 :   (void)benchg_tile_cnt;
     144           0 :   (void)benchs_tile_cnt;
     145           0 :   (void)accounts_cnt;
     146           0 :   (void)transaction_mode;
     147           0 :   (void)contending_fraction;
     148           0 :   (void)cu_price_spread;
     149           0 :   (void)conn_cnt;
     150           0 :   (void)send_to_port;
     151           0 :   (void)send_to_ip_addr;
     152           0 :   (void)rpc_port;
     153           0 :   (void)rpc_ip_addr;
     154           0 :   (void)no_quic;
     155           0 :   (void)reserve_agave_cores;
     156           0 : }

Generated by: LCOV version 1.14