Add -A option to specify congestion control algorithm for tools (#487)

This commit is contained in:
Sijie Yang 2024-01-05 07:51:24 +08:00 committed by GitHub
parent 612a868772
commit 9d9cde9734
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View file

@ -171,6 +171,11 @@ prog_print_common_options (const struct prog *prog, FILE *out)
" sndbuf=12345 # Sets SO_SNDBUF\n"
" rcvbuf=12345 # Sets SO_RCVBUF\n"
" -W Use stock PMI (malloc & free)\n"
" -A CC_ALGO Congestion control algorithm. The following algorithms are\n"
" supported.\n"
" 1: Cubic\n"
" 2: BBRv1\n"
" 3: Adaptive congestion control (this is the default).\n"
);
#if HAVE_SENDMMSG
@ -266,6 +271,9 @@ prog_set_opt (struct prog *prog, int opt, const char *arg)
case 'W':
prog->prog_use_stock_pmi = 1;
return 0;
case 'A':
prog->prog_settings.es_cc_algo = atoi(optarg);
return 0;
case 'c':
if (prog->prog_engine_flags & LSENG_SERVER)
{

View file

@ -74,7 +74,7 @@ prog_init (struct prog *, unsigned lsquic_engine_flags, struct sport_head *,
# define IP_DONTFRAG_FLAG ""
#endif
#define PROG_OPTS "i:km:c:y:L:l:o:H:s:S:Y:z:G:W" RECVMMSG_FLAG SENDMMSG_FLAG \
#define PROG_OPTS "i:km:c:y:L:l:o:H:s:S:Y:z:G:WA:" RECVMMSG_FLAG SENDMMSG_FLAG \
IP_DONTFRAG_FLAG
/* Returns: