Skip to content

Commit

Permalink
Merge branch 'master' of github.com:private-octopus/picoquic into suhas
Browse files Browse the repository at this point in the history
  • Loading branch information
suhasHere committed Feb 23, 2024
2 parents 2af55c4 + f33e1df commit d6af600
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 19 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ else()
endif()

project(picoquic
VERSION 1.1.19.0
VERSION 1.1.19.1
DESCRIPTION "picoquic library"
LANGUAGES C CXX)

Expand Down
4 changes: 4 additions & 0 deletions picoquic/bbr.c
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,10 @@ static void BBROnExitRecovery(picoquic_bbr_state_t* bbr_state, picoquic_path_t*
bbr_state->packet_conservation = 0;

if (bbr_state->is_pto_recovery) {
/* TODO:
* we should try to enter startup with a high enough BW. However,
* simple attempts to restore the BW parameters have proven ineffective.
*/
BBRReEnterStartup(bbr_state, path_x, current_time);
}
else if(bbr_state->state == picoquic_bbr_alg_probe_bw_up) {
Expand Down
2 changes: 1 addition & 1 deletion picoquic/picoquic.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
extern "C" {
#endif

#define PICOQUIC_VERSION "1.1.19.0"
#define PICOQUIC_VERSION "1.1.19.1"
#define PICOQUIC_ERROR_CLASS 0x400
#define PICOQUIC_ERROR_DUPLICATE (PICOQUIC_ERROR_CLASS + 1)
#define PICOQUIC_ERROR_AEAD_CHECK (PICOQUIC_ERROR_CLASS + 3)
Expand Down
44 changes: 27 additions & 17 deletions picoquictest/mediatest.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ typedef struct st_mediatest_spec_t {
size_t data_size;
size_t datagram_data_size;
double bandwidth;
uint64_t latency_average;
uint64_t latency_max;
int do_not_check_video2;
} mediatest_spec_t;

int mediatest_callback(picoquic_cnx_t* cnx,
Expand Down Expand Up @@ -324,7 +327,7 @@ void mediatest_record_stats(mediatest_ctx_t* mt_ctx, mediatest_stream_ctx_t* str
}
}

int mediatest_check_stats(mediatest_ctx_t* mt_ctx, media_test_type_enum media_type)
int mediatest_check_stats(mediatest_ctx_t* mt_ctx, mediatest_spec_t * spec, media_test_type_enum media_type)
{
int ret = 0;

Expand All @@ -341,8 +344,19 @@ int mediatest_check_stats(mediatest_ctx_t* mt_ctx, media_test_type_enum media_ty
uint64_t variance = (stats->sum_square_delays / stats->nb_frames) - (average * average);
uint64_t sigma = picoquic_sqrt_for_tests(variance);

if (average > 25000 || sigma > 12500 || stats->max_delay > 100000) {
ret = -1;
if (spec->latency_average == 0)
{
if (average > 25000 || sigma > 12500 || stats->max_delay > 100000) {
ret = -1;
}
}
else {
if (average > spec->latency_average) {
ret = -1;
}
else if (spec->latency_max > 0 && stats->max_delay > spec->latency_max) {
ret = -1;
}
}
}
}
Expand Down Expand Up @@ -1237,13 +1251,13 @@ int mediatest_one(mediatest_id_enum media_test_id, mediatest_spec_t * spec)
}
/* Check that the results are as expected. */
if (ret == 0 && spec->do_audio) {
ret = mediatest_check_stats(mt_ctx, media_test_audio);
ret = mediatest_check_stats(mt_ctx, spec, media_test_audio);
}
if (ret == 0 && spec->do_video) {
ret = mediatest_check_stats(mt_ctx, media_test_video);
ret = mediatest_check_stats(mt_ctx, spec, media_test_video);
}
if (ret == 0 && spec->do_video2 && media_test_id != 5) {
ret = mediatest_check_stats(mt_ctx, media_test_video2);
if (ret == 0 && spec->do_video2 && !spec->do_not_check_video2) {
ret = mediatest_check_stats(mt_ctx, spec, media_test_video2);
}
}
if (mt_ctx != NULL) {
Expand Down Expand Up @@ -1302,13 +1316,11 @@ int mediatest_video2_down_test()
spec.do_video2 = 1;
spec.do_audio = 1;
spec.data_size = 0;
spec.latency_average = 100000;
spec.latency_max = 500000;
spec.do_not_check_video2 = 1;
ret = mediatest_one(mediatest_video2_down, &spec);

#if 1
/* TODO: remove this once BBR is debugged. */
ret = 0;
#endif

return ret;
}

Expand Down Expand Up @@ -1336,12 +1348,10 @@ int mediatest_wifi_test()
spec.do_video2 = 1;
spec.do_audio = 1;
spec.data_size = 0;
spec.latency_average = 45000;
spec.latency_max = 240000;
spec.do_not_check_video2 = 1;
ret = mediatest_one(mediatest_wifi, &spec);

#if 1
/* TODO: remove this once BBR is debugged. */
ret = 0;
#endif

return ret;
}

0 comments on commit d6af600

Please sign in to comment.