1. Put some lwip udp rx/tx relating functions to IRAM
2. Put some wifi rx/tx relating functions to IRAMa
3. Reduce wifi dynamic malloc from 4 to 1 for each ebuf
4. Update iperf example accordingly
5. Update libphy.a to v383
* setsockopt(s, IPV6_ONLY, &one, sizeof(int)) will disable IPV6-only
mode. Incoming/outgoing IPV4 packets are dropped.
* Otherwise, sockets bound to IPV6_ANY_ADDR can receive unicast packets
for IPV4 or IPV6.
* sendto() a IPV6-mapped-IPV4 address on a UDP socket works correctly
(not supported for RAW or TCP sockets.)
* getaddrinfo() option AI_V4MAPPED is implemented.
As well as extending support to TCP & RAW, there is some potential improvement
to dropping incoming packets - the drop happens a bit late in the process and
there is no "ICMP port unreachable" response sent.
Optimize TCP close:
1. Not remove TCP pcb when IP address is changed since the lwip netconn still need the pcb
2. If the TCP connection is in TCP_FIN_WAIT_1 for too long time, remove it
If destination IP address of the packet is broadcast address, firstly compare
source IP address with the that of each network interface. If it matches,
packet is forwarded from the interface.
Allow separate ethernet & wifi configuration
If only 1/2 of ethernet & WiFi are enabled in config, the other interface is no longer linked into the firmware.
* Fixes bug where enabling Ethernet but not WiFi would fail to compile.
* Also means that enabling WiFi but not Ethernet no longer links some unused ethernet interface functions.
See merge request !525
lwip: modify dhcp timer granularity from 60s to 1s
Current DHCP granularity is 60 seconds, it's not accurate, it can cause DHCP release/rebind/renew timer
timeout at the same time, also it may renew/rebind/release at wrong time, thus cause problem.
1. modify the discover retry backoff time from (2,4,8,16,32,60,60)s to (500m,1,2,4,8,15,15)s.
2. add DHCP_DOES_ARP_CHECK to menuconfig for users to specify if do a ARP check on the offered address.
If enable, one more second will be taken in obtaining IP address.
3. update wifi libs
1. The transmitting mode of the packets from LWIP to MAC is changed from synchronous to asynchronous.
2. The receive buf mode : support pointer mode and copy mode.
3. Add get phy status func used to config mac register.
lwip: fix socket memory leak issue
1. Add socket memory leak debug counter
2. Fix TCP PCB leak issue
Currently ESP32 support maximum 16 TCP PCBs and all TCP PCB are allocated from heap memory. In some scenario, we may
have memory leak issue, for example, the application already created 16 TCP PCB, then it close 5 of them, because the TCP
state machine, the LWIP core may not free all the 5 TCP PCB immediately, maybe some is in TIME_WAIT status, some is in
FIN_WAIT_1 etc. Then the application try to malloc 17th TCP PCB (the application think they just create 12 because they already
close 5), memp_malloc() will return true because the heap is not out of memory, but actually we got 17 TCP PCB. When the
scenario repeat again and again (in our Audio application, it repeat more than 10000 times), more and more TCP PCB will be
created in the system, each TCP PCB require 200B, then memory leak happen (In Audio application, I saw more than 26 TCP PCB
are created, and 10*200=2K memory are leaked).
See merge request !223