Skip to content

Commit 5312219

Browse files
gekyadbridge
authored andcommitted
lwip: Increased DHCP timeout to 60 seconds
This matches the timeout used in linux: https://linux.die.net/man/5/dhclient.conf This resolves several issues noticed during testing when we have a very large number of devices that try to get an IP address around the same time.
1 parent d39703b commit 5312219

File tree

14 files changed

+21
-20
lines changed

14 files changed

+21
-20
lines changed

features/FEATURE_LWIP/TESTS/mbedmicro-net/connectivity/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ void test_bring_up_down() {
5151

5252
// Test setup
5353
utest::v1::status_t test_setup(const size_t number_of_cases) {
54-
GREENTEA_SETUP(60, "default_auto");
54+
GREENTEA_SETUP(120, "default_auto");
5555
return verbose_test_setup_handler(number_of_cases);
5656
}
5757

features/FEATURE_LWIP/TESTS/mbedmicro-net/gethostbyname/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ void test_dns_literal_pref() {
9191

9292
// Test setup
9393
utest::v1::status_t test_setup(const size_t number_of_cases) {
94-
GREENTEA_SETUP(60, "default_auto");
94+
GREENTEA_SETUP(120, "default_auto");
9595
net_bringup();
9696
return verbose_test_setup_handler(number_of_cases);
9797
}

features/FEATURE_LWIP/TESTS/mbedmicro-net/tcp_echo/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ void prep_buffer(char *tx_buffer, size_t tx_size) {
2929
}
3030

3131
int main() {
32-
GREENTEA_SETUP(60, "tcp_echo");
32+
GREENTEA_SETUP(120, "tcp_echo");
3333
EthernetInterface eth;
3434
int err = eth.connect();
3535

features/FEATURE_LWIP/TESTS/mbedmicro-net/tcp_echo_parallel/main.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ class Echo {
8585
};
8686

8787
int main() {
88-
char uuid[48] = {0};
89-
GREENTEA_SETUP_UUID(60, "tcp_echo", uuid, 48);
88+
GREENTEA_SETUP(120, "tcp_echo");
9089

9190
Echo echoers[MBED_CFG_TCP_CLIENT_ECHO_THREADS];
9291

features/FEATURE_LWIP/TESTS/mbedmicro-net/tcp_hello_world/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ bool find_substring(const char *first, const char *last, const char *s_first, co
3636
}
3737

3838
int main() {
39-
GREENTEA_SETUP(60, "default_auto");
39+
GREENTEA_SETUP(120, "default_auto");
4040

4141
bool result = false;
4242
EthernetInterface eth;

features/FEATURE_LWIP/TESTS/mbedmicro-net/tcp_packet_pressure/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ void generate_buffer(uint8_t **buffer, size_t *size, size_t min, size_t max) {
108108

109109

110110
int main() {
111-
GREENTEA_SETUP(60, "tcp_echo");
111+
GREENTEA_SETUP(120, "tcp_echo");
112112
generate_buffer(&buffer, &buffer_size,
113113
MBED_CFG_TCP_CLIENT_PACKET_PRESSURE_MIN,
114114
MBED_CFG_TCP_CLIENT_PACKET_PRESSURE_MAX);
@@ -219,7 +219,7 @@ int main() {
219219
timer.stop();
220220
printf("MBED: Time taken: %fs\r\n", timer.read());
221221
printf("MBED: Speed: %.3fkb/s\r\n",
222-
8*(2*MBED_CFG_TCP_CLIENT_PACKET_PRESSURE_MAX -
222+
8*(2*MBED_CFG_TCP_CLIENT_PACKET_PRESSURE_MAX -
223223
MBED_CFG_TCP_CLIENT_PACKET_PRESSURE_MIN) / (1000*timer.read()));
224224

225225
eth.disconnect();

features/FEATURE_LWIP/TESTS/mbedmicro-net/tcp_packet_pressure_parallel/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ PressureTest *pressure_tests[MBED_CFG_TCP_CLIENT_PACKET_PRESSURE_THREADS];
225225

226226

227227
int main() {
228-
GREENTEA_SETUP(2*60, "tcp_echo");
228+
GREENTEA_SETUP(120, "tcp_echo");
229229

230230
uint8_t *buffer;
231231
size_t buffer_size;
@@ -282,7 +282,7 @@ int main() {
282282
printf("MBED: Time taken: %fs\r\n", timer.read());
283283
printf("MBED: Speed: %.3fkb/s\r\n",
284284
MBED_CFG_TCP_CLIENT_PACKET_PRESSURE_THREADS*
285-
8*(2*MBED_CFG_TCP_CLIENT_PACKET_PRESSURE_MAX -
285+
8*(2*MBED_CFG_TCP_CLIENT_PACKET_PRESSURE_MAX -
286286
MBED_CFG_TCP_CLIENT_PACKET_PRESSURE_MIN) / (1000*timer.read()));
287287

288288
net.disconnect();

features/FEATURE_LWIP/TESTS/mbedmicro-net/udp_dtls_handshake/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ int udp_dtls_handshake_pattern[] = {MBED_CFG_UDP_DTLS_HANDSHAKE_PATTERN};
2828
const int udp_dtls_handshake_count = sizeof(udp_dtls_handshake_pattern) / sizeof(int);
2929

3030
int main() {
31-
GREENTEA_SETUP(60, "udp_shotgun");
31+
GREENTEA_SETUP(120, "udp_shotgun");
3232

3333
EthernetInterface eth;
3434
int err = eth.connect();

features/FEATURE_LWIP/TESTS/mbedmicro-net/udp_echo/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ void prep_buffer(char *uuid_buffer, size_t uuid_len, char *tx_buffer, size_t tx_
4343

4444
int main() {
4545
char uuid[48] = {0};
46-
GREENTEA_SETUP_UUID(60, "udp_echo", uuid, 48);
46+
GREENTEA_SETUP_UUID(120, "udp_echo", uuid, 48);
4747
printf("Got a uuid of %s\r\n", uuid);
4848
size_t uuid_len = strlen(uuid);
4949
EthernetInterface eth;

features/FEATURE_LWIP/TESTS/mbedmicro-net/udp_echo_parallel/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ class Echo {
144144

145145
int main() {
146146
char uuid[48] = {0};
147-
GREENTEA_SETUP_UUID(60, "udp_echo", uuid, 48);
147+
GREENTEA_SETUP_UUID(120, "udp_echo", uuid, 48);
148148
printf("Got a uuid of %s\r\n", uuid);
149149
size_t uuid_len = strlen(uuid);
150150

0 commit comments

Comments
 (0)