Skip to content

Commit 73e248f

Browse files
rluboskartben
authored andcommitted
net: zperf: Make UDP upload report retransmission count configurable
Add a Kconfig option to configure the maximum retransmission count of the UDP upload report. Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
1 parent 02530be commit 73e248f

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

subsys/net/lib/zperf/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,13 @@ config NET_ZPERF_MAX_SESSIONS
7171
help
7272
Upper size limit for connections handled by zperf.
7373

74+
config NET_ZPERF_UDP_REPORT_RETANSMISSION_COUNT
75+
int "Maximum number of UDP upload report retransmissions"
76+
depends on NET_UDP
77+
range 1 16
78+
default 4
79+
help
80+
Maximum number of retries zperf will take to retrieve the UDP upload
81+
report from the server.
82+
7483
endif

subsys/net/lib/zperf/zperf_udp_uploader.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ static inline int zperf_upload_fin(int sock,
6767
struct zperf_client_hdr_v1 *hdr;
6868
uint32_t secs = end_time_us / USEC_PER_SEC;
6969
uint32_t usecs = end_time_us % USEC_PER_SEC;
70-
int loop = 2;
70+
int loop = CONFIG_NET_ZPERF_UDP_REPORT_RETANSMISSION_COUNT;
7171
int ret = 0;
7272
struct timeval rcvtimeo = {
7373
.tv_sec = 2,

0 commit comments

Comments
 (0)