Skip to content

Commit dd70fa6

Browse files
two-heartakhinvasara-jumptrading
authored andcommitted
quic: use correct alignment for stream map
+ drive-by fixes: wrong doc, wrong time unit in string, wrong branch hint
1 parent 8bc6685 commit dd70fa6

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

src/waltz/quic/fd_quic.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -552,9 +552,7 @@ fd_quic_init( fd_quic_t * quic ) {
552552
state->hs_pool = hs_pool;
553553

554554
/* State: Initialize TLS handshake cache */
555-
if( FD_LIKELY( !fd_quic_tls_hs_cache_join(
556-
fd_quic_tls_hs_cache_new( &state->hs_cache )
557-
))) {
555+
if( FD_UNLIKELY( !fd_quic_tls_hs_cache_join( fd_quic_tls_hs_cache_new( &state->hs_cache ) ) ) ) {
558556
FD_LOG_WARNING(( "fd_quic_tls_hs_cache_new failed" ));
559557
return NULL;
560558
}

src/waltz/quic/fd_quic.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ struct __attribute__((aligned(16UL))) fd_quic_config {
159159
#define FD_QUIC_CONFIG_LIST(X,...) \
160160
X( role, "%d", enum, "enum", __VA_ARGS__ ) \
161161
X( retry, "%d", bool, "bool", __VA_ARGS__ ) \
162-
X( tick_per_us, "%f", units, "ticks per ms", __VA_ARGS__ ) \
162+
X( tick_per_us, "%f", units, "ticks per us", __VA_ARGS__ ) \
163163
X( idle_timeout, "%lu", units, "ns", __VA_ARGS__ ) \
164164
X( keep_alive, "%d", bool, "bool", __VA_ARGS__ ) \
165165
X( ack_delay, "%lu", units, "ns", __VA_ARGS__ ) \
@@ -591,10 +591,11 @@ fd_quic_conn_let_die( fd_quic_conn_t * conn,
591591
FD_QUIC_API ulong
592592
fd_quic_get_next_wakeup( fd_quic_t * quic );
593593

594-
/* fd_quic_service services the next QUIC connection, including stream
595-
transmit ops, ACK transmit, loss timeout, and idle timeout. The
596-
user should call service at high frequency. Returns 1 if the service
597-
call did any work, or 0 otherwise. */
594+
/* fd_quic_service services the next QUIC connection at each service
595+
level, including stream transmit ops, ACK transmit, loss timeout, and
596+
idle timeout. The user should call service at high frequency.
597+
Returns the number of connections serviced, where 0 means the call
598+
did no work. */
598599

599600
FD_QUIC_API int
600601
fd_quic_service( fd_quic_t * quic );

src/waltz/quic/fd_quic_conn.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ fd_quic_conn_footprint_ext( fd_quic_limits_t const * limits,
4646
}
4747
layout->stream_map_lg = (int)lg;
4848

49-
off = fd_ulong_align_up( off, fd_quic_stream_align() );
49+
off = fd_ulong_align_up( off, fd_quic_stream_map_align() );
5050
layout->stream_map_off = off;
5151
off += fd_quic_stream_map_footprint( (int)lg );
5252
} else {

0 commit comments

Comments
 (0)