|
22 | 22 | #include "../../util/tile/fd_tile_private.h" |
23 | 23 | #include "../../discof/restore/utils/fd_ssctrl.h" |
24 | 24 | #include "../../discof/restore/utils/fd_ssmsg.h" |
| 25 | +#include "../../flamenco/capture/fd_solcap_writer.h" |
25 | 26 | #include "../../flamenco/progcache/fd_progcache_admin.h" |
26 | 27 | #include "../../vinyl/meta/fd_vinyl_meta.h" |
27 | 28 | #include "../../vinyl/io/fd_vinyl_io.h" /* FD_VINYL_IO_TYPE_* */ |
@@ -285,6 +286,8 @@ fd_topo_initialize( config_t * config ) { |
285 | 286 | topo->max_page_size = fd_cstr_to_shmem_page_sz( config->hugetlbfs.max_page_size ); |
286 | 287 | topo->gigantic_page_threshold = config->hugetlbfs.gigantic_page_threshold_mib << 20; |
287 | 288 |
|
| 289 | + int solcap_enabled = strlen( config->capture.solcap_capture ) > 0; |
| 290 | + |
288 | 291 | /* topo, name */ |
289 | 292 | fd_topob_wksp( topo, "metric" ); |
290 | 293 | fd_topob_wksp( topo, "genesi" ); |
@@ -560,6 +563,11 @@ fd_topo_initialize( config_t * config ) { |
560 | 563 | /**/ fd_topob_tile( topo, "poh", "poh", "metric_in", tile_to_cpu[ topo->tile_cnt ], 0, 1 ); |
561 | 564 | FOR(sign_tile_cnt) fd_topob_tile( topo, "sign", "sign", "metric_in", tile_to_cpu[ topo->tile_cnt ], 0, 1 ); |
562 | 565 |
|
| 566 | + if( FD_UNLIKELY( solcap_enabled ) ) { |
| 567 | + fd_topob_wksp( topo, "captur" ); |
| 568 | + fd_topob_tile( topo, "captur", "captur", "metric_in", tile_to_cpu[ topo->tile_cnt ], 0, 0 ); |
| 569 | + } |
| 570 | + |
563 | 571 | /* topo, tile_name, tile_kind_id, fseq_wksp, link_name, link_kind_id, reliable, polled */ |
564 | 572 | FOR(gossvf_tile_cnt) for( ulong j=0UL; j<net_tile_cnt; j++ ) |
565 | 573 | fd_topob_tile_in( topo, "gossvf", i, "metric_in", "net_gossvf", j, FD_TOPOB_UNRELIABLE, FD_TOPOB_POLLED ); /* No reliable consumers of networking fragments, may be dropped or overrun */ |
@@ -839,6 +847,15 @@ fd_topo_initialize( config_t * config ) { |
839 | 847 | fd_topob_tile_in( topo, "replay", 0UL, "metric_in", "rpc_replay", 0UL, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED ); |
840 | 848 | } |
841 | 849 |
|
| 850 | + if( FD_UNLIKELY( solcap_enabled ) ) { |
| 851 | + fd_topob_link( topo, "cap_repl", "captur", 32UL, SOLCAP_WRITE_ACCOUNT_DATA_MTU, 1UL ); |
| 852 | + fd_topob_tile_out( topo, "replay", 0UL, "cap_repl", 0UL ); |
| 853 | + fd_topob_tile_in( topo, "captur", 0UL, "metric_in", "cap_repl", 0UL, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED ); |
| 854 | + FOR(exec_tile_cnt) fd_topob_link( topo, "cap_exec", "captur", 32UL, SOLCAP_WRITE_ACCOUNT_DATA_MTU, 1UL ); |
| 855 | + FOR(exec_tile_cnt) fd_topob_tile_out( topo, "exec", i, "cap_exec", i ); |
| 856 | + FOR(exec_tile_cnt) fd_topob_tile_in( topo, "captur", 0UL, "metric_in", "cap_exec", i, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED ); |
| 857 | + } |
| 858 | + |
842 | 859 | if( FD_LIKELY( !is_auto_affinity ) ) { |
843 | 860 | if( FD_UNLIKELY( affinity_tile_cnt<topo->tile_cnt ) ) |
844 | 861 | FD_LOG_ERR(( "The topology you are using has %lu tiles, but the CPU affinity specified in the config tile as [layout.affinity] only provides for %lu cores. " |
@@ -1394,6 +1411,13 @@ fd_topo_configure_tile( fd_topo_tile_t * tile, |
1394 | 1411 | tile->bundle.tls_cert_verify = !!config->tiles.bundle.tls_cert_verify; |
1395 | 1412 |
|
1396 | 1413 | } else if( FD_UNLIKELY( !strcmp( tile->name, "vinyl" ) ) ) { |
| 1414 | + |
| 1415 | + } else if( FD_UNLIKELY( !strcmp( tile->name, "captur" ) ) ) { |
| 1416 | + |
| 1417 | + tile->capctx.capture_start_slot = config->capture.capture_start_slot; |
| 1418 | + strncpy( tile->capctx.solcap_capture, config->capture.solcap_capture, sizeof(tile->capctx.solcap_capture) ); |
| 1419 | + tile->capctx.recent_only = config->capture.recent_only; |
| 1420 | + tile->capctx.recent_slots_per_file = config->capture.recent_slots_per_file; |
1397 | 1421 |
|
1398 | 1422 | tile->vinyl.vinyl_meta_map_obj_id = fd_pod_query_ulong( config->topo.props, "vinyl.meta_map", ULONG_MAX ); |
1399 | 1423 | tile->vinyl.vinyl_meta_pool_obj_id = fd_pod_query_ulong( config->topo.props, "vinyl.meta_pool", ULONG_MAX ); |
|
0 commit comments