net: zperf: fix incorrect statistics of zperf

The sequence id from iperf starts with 1. The commit changes the
initial value of "next_id" in zperf from 0 to 1. In addition, the
error output of "error" and "out of order" packets is corrected.

Signed-off-by: Yanqin Wei <Yanqin.Wei@arm.com>
This commit is contained in:
Yanqin Wei 2022-12-07 15:22:35 +08:00 committed by Carles Cufí
commit 00cdb7afa2
2 changed files with 3 additions and 3 deletions

View file

@ -129,7 +129,7 @@ void zperf_reset_session_stats(struct session *session)
session->counter = 0U;
session->start_time = 0U;
session->next_id = 0U;
session->next_id = 1U;
session->length = 0U;
session->outorder = 0U;
session->error = 0U;

View file

@ -195,10 +195,10 @@ static void udp_received(const struct shell *sh, int sock,
session->counter);
shell_fprintf(sh, SHELL_NORMAL,
" nb packets lost:\t%u\n",
session->outorder);
session->error);
shell_fprintf(sh, SHELL_NORMAL,
" nb packets outorder:\t%u\n",
session->error);
session->outorder);
shell_fprintf(sh, SHELL_NORMAL,
" jitter:\t\t\t");