-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds a command to trace incoming QUIC STREAM frames to stdout. Introduces scaffold to allow other processes to join fdctl quic tile data structures. - Add fd_quic_tile.h - Add a magic number to fd_quic_ctx_t - Rename tiles/fd_quic.c => tiles/fd_quic_tile.c to fix object name collision with waltz/fd_quic.c.
- Loading branch information
1 parent
3aa2a23
commit cfb24dd
Showing
12 changed files
with
656 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#ifndef HEADER_fd_src_app_fdctl_run_tiles_fd_quic_tile_h | ||
#define HEADER_fd_src_app_fdctl_run_tiles_fd_quic_tile_h | ||
|
||
#include "../../../../disco/quic/fd_tpu.h" | ||
#include "../../../../disco/stem/fd_stem.h" | ||
#include "../../../../waltz/quic/fd_quic.h" | ||
|
||
typedef struct { | ||
fd_tpu_reasm_t * reasm; | ||
|
||
fd_stem_context_t * stem; | ||
|
||
fd_quic_t * quic; | ||
fd_aio_t quic_tx_aio[1]; | ||
|
||
# define ED25519_PRIV_KEY_SZ (32) | ||
# define ED25519_PUB_KEY_SZ (32) | ||
uchar tls_priv_key[ ED25519_PRIV_KEY_SZ ]; | ||
uchar tls_pub_key [ ED25519_PUB_KEY_SZ ]; | ||
fd_sha512_t sha512[1]; /* used for signing */ | ||
|
||
uchar buffer[ FD_NET_MTU ]; | ||
|
||
ulong round_robin_cnt; | ||
ulong round_robin_id; | ||
|
||
fd_wksp_t * in_mem; | ||
ulong in_chunk0; | ||
ulong in_wmark; | ||
|
||
fd_frag_meta_t * net_out_mcache; | ||
ulong * net_out_sync; | ||
ulong net_out_depth; | ||
ulong net_out_seq; | ||
|
||
fd_wksp_t * net_out_mem; | ||
ulong net_out_chunk0; | ||
ulong net_out_wmark; | ||
ulong net_out_chunk; | ||
|
||
fd_wksp_t * verify_out_mem; | ||
|
||
double ns_per_tick; | ||
ulong last_tick; | ||
ulong last_wall; | ||
|
||
struct { | ||
ulong txns_received_udp; | ||
ulong txns_received_quic_fast; | ||
ulong txns_received_quic_frag; | ||
ulong frag_ok_cnt; | ||
ulong frag_gap_cnt; | ||
ulong frag_dup_cnt; | ||
long reasm_active; | ||
ulong reasm_overrun; | ||
ulong reasm_abandoned; | ||
ulong reasm_started; | ||
ulong udp_pkt_too_small; | ||
ulong udp_pkt_too_large; | ||
ulong quic_pkt_too_small; | ||
ulong quic_txn_too_small; | ||
ulong quic_txn_too_large; | ||
} metrics; | ||
} fd_quic_ctx_t; | ||
|
||
#endif /* HEADER_fd_src_app_fdctl_run_tiles_fd_quic_tile_h */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
ifdef FD_HAS_SSE | ||
$(call add-objs,fd_quic_trace_frame,fd_fddev) | ||
$(call add-objs,fd_quic_trace_main,fd_fddev) | ||
$(call add-objs,fd_quic_trace_rx_tile,fd_fddev) | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#ifndef HEADER_fd_src_app_fddev_quic_trace_fd_quic_trace_h | ||
#define HEADER_fd_src_app_fddev_quic_trace_fd_quic_trace_h | ||
|
||
#include "../../../disco/topo/fd_topo.h" | ||
#include "../../fdctl/run/tiles/fd_quic_tile.h" | ||
|
||
/* fd_quic_trace_ctx is the relocated fd_quic_ctx_t of the target quic | ||
tile. fd_quic_trace_ctx_remote is the original fd_quic_ctx_t, but | ||
the pointer itself is in the local address space. */ | ||
|
||
extern fd_quic_ctx_t fd_quic_trace_ctx; | ||
extern fd_quic_ctx_t const * fd_quic_trace_ctx_remote; | ||
extern ulong fd_quic_trace_ctx_raddr; | ||
extern ulong volatile * fd_quic_trace_link_metrics; | ||
|
||
/* fd_quic_trace_target_fseq are the fseq counters published by the | ||
target quic tile */ | ||
|
||
extern ulong ** fd_quic_trace_target_fseq; | ||
|
||
/* fd_tile_quic_trace_rx is the tile in fd_quic_trace_tx_tile.c */ | ||
|
||
extern fd_topo_run_tile_t fd_tile_quic_trace_rx; | ||
|
||
|
||
struct fd_quic_trace_frame_ctx { | ||
ulong conn_id; | ||
uint src_ip; | ||
ushort src_port; | ||
ulong pkt_num; | ||
}; | ||
|
||
typedef struct fd_quic_trace_frame_ctx fd_quic_trace_frame_ctx_t; | ||
|
||
FD_PROTOTYPES_BEGIN | ||
|
||
void | ||
fd_quic_trace_frames( fd_quic_trace_frame_ctx_t * context, | ||
uchar const * data, | ||
ulong data_sz ); | ||
|
||
FD_PROTOTYPES_END | ||
|
||
|
||
#define translate_ptr( ptr ) __extension__({ \ | ||
ulong rel = (ulong)(ptr) - fd_quic_trace_ctx_raddr; \ | ||
ulong laddr = (ulong)fd_quic_trace_ctx_remote + rel; \ | ||
(__typeof__(ptr))(laddr); \ | ||
}) | ||
|
||
#endif /* HEADER_fd_src_app_fddev_quic_trace_fd_quic_trace_h */ |
Oops, something went wrong.