Skip to content

Commit d68d6f8

Browse files
HGuillemetanwayde
authored andcommitted
Fix additional shred destinations
1 parent a13dda7 commit d68d6f8

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/app/fdctl/topology.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,11 +478,13 @@ fd_topo_initialize( config_t * config ) {
478478
config->tiles.shred.additional_shred_destinations_retransmit[ i ],
479479
&tile->shred.adtl_dests_retransmit[ i ] );
480480
}
481+
tile->shred.adtl_dests_retransmit_cnt = config->tiles.shred.additional_shred_destinations_retransmit_cnt;
481482
for( ulong i=0UL; i<config->tiles.shred.additional_shred_destinations_leader_cnt; i++ ) {
482483
parse_ip_port( "tiles.shred.additional_shred_destinations_leader",
483484
config->tiles.shred.additional_shred_destinations_leader[ i ],
484485
&tile->shred.adtl_dests_leader[ i ] );
485486
}
487+
tile->shred.adtl_dests_leader_cnt = config->tiles.shred.additional_shred_destinations_leader_cnt;
486488

487489
} else if( FD_UNLIKELY( !strcmp( tile->name, "store" ) ) ) {
488490
tile->store.disable_blockstore_from_slot = config->development.bench.disable_blockstore_from_slot;

src/disco/shred/fd_shred_tile.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,24 +1052,26 @@ after_frag( fd_shred_ctx_t * ctx,
10521052
ulong max_dest_cnt[1];
10531053
fd_shred_dest_idx_t * dests;
10541054
if( FD_LIKELY( ctx->in_kind[ in_idx ]==IN_KIND_NET ) ) {
1055+
for( ulong i=0UL; i<k; i++ ) {
1056+
for( ulong j=0UL; j<ctx->adtl_dests_retransmit_cnt; j++ ) send_shred( ctx, stem, new_shreds[ i ], ctx->adtl_dests_retransmit+j, ctx->tsorig );
1057+
}
10551058
out_stride = k;
10561059
/* In the case of feature activation, the fanout used below is
10571060
the same as the one calculated/modified previously at the
1058-
begining of after_frag() for IN_KIND_NET in this slot. */
1061+
beginning of after_frag() for IN_KIND_NET in this slot. */
10591062
dests = fd_shred_dest_compute_children( sdest, new_shreds, k, ctx->scratchpad_dests, k, fanout, fanout, max_dest_cnt );
10601063
} else {
1061-
out_stride = 1UL;
1062-
*max_dest_cnt = 1UL;
1063-
dests = fd_shred_dest_compute_first ( sdest, new_shreds, k, ctx->scratchpad_dests );
10641064
for( ulong i=0UL; i<k; i++ ) {
10651065
for( ulong j=0UL; j<ctx->adtl_dests_leader_cnt; j++ ) send_shred( ctx, stem, new_shreds[ i ], ctx->adtl_dests_leader+j, ctx->tsorig );
10661066
}
1067+
out_stride = 1UL;
1068+
*max_dest_cnt = 1UL;
1069+
dests = fd_shred_dest_compute_first ( sdest, new_shreds, k, ctx->scratchpad_dests );
10671070
}
10681071
if( FD_UNLIKELY( !dests ) ) return;
10691072

10701073
/* Send only the ones we didn't receive. */
10711074
for( ulong i=0UL; i<k; i++ ) {
1072-
for( ulong j=0UL; j<ctx->adtl_dests_retransmit_cnt; j++ ) send_shred( ctx, stem, new_shreds[ i ], ctx->adtl_dests_retransmit+j, ctx->tsorig );
10731075
for( ulong j=0UL; j<*max_dest_cnt; j++ ) send_shred( ctx, stem, new_shreds[ i ], fd_shred_dest_idx_to_dest( sdest, dests[ j*out_stride+i ]), ctx->tsorig );
10741076
}
10751077
}

0 commit comments

Comments
 (0)