Fix the case where nd6_send_rs() fails: send one solicitation here,
not LWIP_ND6_MAX_MULTICAST_SOLICIT.
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
... and add a unit test for it.
Moved resetting netif->rs_count from all reports to link-up and netif-up only.
While at it, clean up the interface a bit so that netif->rs_count is touched
from nd6.c only.
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
arp table functions, nd6 destination cache and struct netif_hint
can now be u16_t or u8_t depending on table size, so up to 32K
entries can be used in these tables (s16_t)
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
This should hide the internal type used for access to the ARP table
which currently is s8_t or u8_t, depending on the use case.
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
This optimizes the netif_loop_output to only schedule a call to poll when
the first packet is enqueued. This ensures netif_poll is ran once per
burst of packets that are sent (which is typical in a TCP transfer)
The old behavior scheduled a call to poll for every packet that was
enqueued and this lead to exhaustion of the MEMP_TCPIP_MSG_API memory pool
and tcpip_mbox (if port is using static mbox size). The extra callbacks are
wasted work because netif_poll drains the entire queue when ran
This issue presented itself when large TCP transfer go across the loopback
netif
This disable checksum generation and checking for the loopback netif
when LWIP_CHECKSUM_CTRL_PER_NETIF is enabled
Checksums are not needed for the loopback adapter and this will increase
performance for loopback communication
This timeout is used to measure TFTP_TIMEOUT_MSECS fine enough.
Calling tftp_tmr at a 50ms interval to handle a 1 seconds timeout
produces way too much cpu load (and prevents sleep).
Signed-off-by: goldsimon <goldsimon@gmx.de>
Gcc complains that an array index is a 'char' when passing a 'char' to
toupper(). Quieten this by coercing to an 'unsigned char'.
Signed-off-by: goldsimon <goldsimon@gmx.de>
The comment in dhcp_handle_ack for 'offered_si_addr' states:
'boot file name copied in dhcp_parse_reply if not overloaded'
However this code was never reached if the packed was not 'overloaded'
Signed-off-by: goldsimon <goldsimon@gmx.de>
Threads blocked on the rx mbox are counted and on close,
one "netconn closed" message per thread is posted to the mbox
to ensure all threads are woken.
The netconn can then be safely deleted. In socket API, "fd_used"
and "fd_free_pending" help with auto-deleting the netconn.
Signed-off-by: goldsimon <goldsimon@gmx.de>
This is necessary to implement fullduplex sockets that are closed asynchronously:
the netconn in the socket must not be freed before all threads have given up
using it.
We now call the first part of 'netconn_delete()' (moved to 'netconn_prepare_delete()')
from lwip_close() and only actually end up calling 'netconn_free()' from
'free_socket()', which might be called later if LWIP_NETCONN_FULLDUPLEX is enabled.
Signed-off-by: goldsimon <goldsimon@gmx.de>