Commit graph

128 commits

Author SHA1 Message Date
Jiang Jiang Jian fc15d72038 Merge branch 'feature/implement_lwip_critical_protect_with_mutex' into 'master'
lwip: implement lwip critical session with mutex

Currently lwip critical session is based on interrupt, now replace it with mutex

See merge request !595
2017-04-01 17:27:20 +08:00
Liu Zhi Fu 68e27f8188 optimize tcpip adapter layer 2017-04-01 16:41:51 +08:00
Liu Zhi Fu 778a475136 lwip: implement lwip critical session with mutex
Currently lwip critical session is based on interrupt, now replace it with mutex
2017-04-01 16:24:58 +08:00
Liu Zhi Fu a8f9d99cae lwip: optimize dhcp renew/rebind timer 2017-03-16 09:46:43 +08:00
Ivan Grokhotkov 9463a7c594 Merge branch 'feature/lwip_numbers' into 'master'
Change max number of open sockets

Change max number of open sockets from 16 to 32 because of MFI project need support 21 open sockets at least.

See merge request !532
2017-03-06 22:37:12 +08:00
Ivan Grokhotkov 7754647e71 Merge branch 'bugfix/separate_ethernet_and_wifi' into 'master'
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
2017-03-03 11:53:32 +08:00
Jiang Jiang Jian 6451c57e52 Merge branch 'bugfix/tw10169_dhcp_release_cause_tcp_abort' into 'master'
Bugfix/tw10169 dhcp release cause tcp abort

Modify the DHCP timer granularity from 1 minutes to 1 second.

See merge request !539
2017-03-02 17:28:11 +08:00
Liu Zhi Fu 66199b1efe Check DHCP rebind timer before checking dhcp release timer in cause they have the same value.
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.
2017-03-01 20:50:58 +08:00
Liu Zhi Fu 3b3c3210a6 lwip: fix bool options default value wrong issue
menuconfig options with bool type should use 'y/n' to use the default value,
instead of '1/0'
2017-03-01 13:37:36 +08:00
Liu Han 03ea45046d lwip: Change max number of open sockets 2017-02-27 14:47:48 +08:00
Angus Gratton eb1fbaabce lwip: Refactor support for L2 pbuf free notification into each driver
Makes it easier to handle different drivers enabled at compile/link time.
2017-02-24 14:45:17 +11:00
qiyueixa 03e3b137bf lwip: optimize the dhcp client
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
2017-01-23 13:44:34 +08:00
Jan Schmidt a14f22f65b netconn_gethostbyname: Fix race reporting success
If the DNS request is dispatched and performed very quickly,
then it can complete before tcpip_callback() actually returns,
in which case we'll destroy the actual err_t error value passed
in the message. Use a local variable for the tcpip_callback
error code so that can't happen.

Resolves #269 https://github.com/espressif/esp-idf/pull/269
2017-01-20 14:57:00 +11:00
me-no-dev d3a2d6aedc Do not printf if debug level is not correct 2017-01-18 16:13:09 +02:00
Wu Jian Gang 3c8235d40d lwip: Allow config TCP_MAXRTX & TCP_SYNMAXRTX in menuconfig 2017-01-17 17:44:25 +08:00
Liu Han 6c86586e97 components/lwip: Set the ping target info
Add API for set the ping target info and get the ping result
2017-01-11 10:58:34 +08:00
Liu Han 315b3f979f components/tcpip_adapter: Allow to set different hostname for each interface 2017-01-10 12:42:14 +08:00
Wu Jian Gang 9dd5f2a952 lwip: fix compile issue when autoip option enabled 2017-01-09 10:22:36 +08:00
Ivan Grokhotkov 0efaa4f4b8 Merge branch 'feature/lwip-rcvbuf-option' into 'master'
add menuconfig option to enable SO_RCVBUF

This option is required by Arduino and enables netconn connection to be queried for amount of data available in the rx buffer.

See merge request !372
2017-01-07 18:45:37 +08:00
Wu Jian Gang c943fabcda Merge branch 'feature/CoAP' into 'master'
Add CoAP feature

Add CoAP protocol, support client and server test demo.

See merge request !303
2017-01-06 15:37:09 +08:00
me-no-dev 0feb3633fc add menuconfig option to enable SO_RCVBUF 2017-01-05 13:17:52 +02:00
Liu Zhi Fu d98b99f4f0 lwip: rework according review comments 2017-01-05 12:22:49 +08:00
Liu Zhi Fu 0fb2ab9f5c lwip/freertos/esp32: add throughput optimization related code
1. Update wifi lib which contains ampdu and other optimizations
2. Add throughput code debug code
3. Other misc modification about throughput optimization
2017-01-05 11:37:08 +08:00
liuhan d0b10ba2dd components/coap: Add libcoap port for ESP32 platform 2016-12-30 15:05:26 +08:00
Wu Jian Gang 0b79a108b8 Merge branch 'feature/add_ip_frag_option' into 'master'
lwip: add ip frag and reassembly option in menuconfig

add ip frag and reassembly option in menuconfig

See merge request !348
2016-12-29 11:26:06 +08:00
Angus Gratton 06e03ff52e Replace backwards-compatible portTICK_RATE_MS with FreeRTOS v8+ portTICK_PERIOD_MS
Closes github #51 https://github.com/espressif/esp-idf/issues/51
2016-12-28 10:23:13 +11:00
XiaXiaotian 15651b5923 lwip: add ip frag and reassembly option in menuconfig 2016-12-26 15:47:20 +08:00
shangke 5ddf6daa98 feature/ethernet_driver: update ethernet driver
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.
2016-12-26 14:50:49 +08:00
Angus Gratton d031530196 Merge branch 'feature/dhcpserver_null_gw' into 'master'
Allow gw to be null

Github Pull Request 163: https://github.com/espressif/esp-idf/pull/163

Allow interfaces to be configured without a default gateway, for
local-only communication.

In case of the AP interface, if gw is not set, do not offer it.

See merge request !312
2016-12-20 06:14:44 +08:00
Liu Zhi Fu 55726385a4 add more comments and call portYIELD when necessary 2016-12-15 15:06:00 +08:00
Liu Zhi Fu 5e2ae7ac19 lwip: fix lwip dual core issue
Call xSemaphoreGiveFromISR instead xSemaphoreGive when the calling context is in critical section.
2016-12-15 14:37:21 +08:00
Deomid Ryabkov cbff82cc44 Allow gw to be null
Allow interfaces to be configured without a default gateway, for
local-only communication.

In case of the AP interface, if gw is not set, do not offer it.
2016-12-14 19:34:04 +00:00
Angus Gratton 94d2f77643 build system: Remove FLAGS_XXX variable option, replace with per-target overrides
Use for targeted disabling of warnings in LWIP.
2016-12-07 13:49:09 -08:00
shangke e0040af7e5 ethernet: add first version of ethernet driver 2016-12-01 19:17:48 +08:00
Xia Xiaotian ad555d68d3 esp32/lwip: add check sleep
1. fix tw8911 sleep in scan leads to auth frame malloc fail.

2. fix tw8913 pm state transfer wrong leads to wdt.

3. make some comments for modem sleep and wpa2 enterprise.

4. removd duplicated debug option ESP_THREAD_SAFE_DEBUG
2016-12-01 13:34:36 +08:00
liuhan f9d2d63e75 lwip: update open socket number.
modify default number from 4 to 10
2016-11-29 16:25:17 +08:00
Liu Zhi Fu fc2883a59a lwip: modify according code review
1. Modify tcp window size/send buffer back to 4/2
2. Disable lwip statistics by default
2016-11-28 19:54:22 +08:00
Liu Zhi Fu 9a3f9af2db esp32/lwip: some misc changes
1. Update phy to fix HT40 rx issue
2. Add code about RX_DONE/TX_DONE/Lock-free optimization
3. Fix wifi ioctl return value error
4. Add lwip statistics debug code
5. Modify TCP window size to 10 and send buffer size to 5
2016-11-28 18:36:14 +08:00
Wu Jian Gang 7f2c6a9d80 Merge branch 'bugfix/tw8770_fix_socket_memory_leak' into 'master'
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
2016-11-25 13:44:02 +08:00
Wu Jian Gang e05fe28574 Merge branch 'bugfix/arp_queue_failed' into 'master'
report the arp queue fail result



See merge request !227
2016-11-22 14:45:44 +08:00
Wu Jian Gang 46c81ded73 Merge branch 'feature/tw8799_low_level_output_optimize' into 'master'
Feature/tw8799 low level output optimize

Fix a potential memory crash error in low_level_output

See merge request !224
2016-11-22 11:56:35 +08:00
tianzhongxing cc39b7b286 components/lwip/arp: change the arp dropping packet function
LWIP will drop the oldest package at the arp packet cache queue and return "ERR_OK"
We change it that ARP level will drop the current packet and return "ERR_MEM" to tell user that you should send the packet again latter.
2016-11-22 10:11:52 +08:00
Liu Zhi Fu 586c17f831 lwip: remove useless printf info 2016-11-21 16:08:39 +08:00
Liu Zhi Fu 9cc9710a27 lwip: update according to review comments
1. Define memp_malloc/memp_free as static inline function
2. When TCP pcb is out of memory, try to kill PCB in FIN_WAIT_1 when necessary
2016-11-21 15:02:36 +08:00
tzx a8fb9f2b84 ipv6 interface: add branch for ipv6 interface 2016-11-21 11:06:51 +08:00
Liu Zhi Fu 8cd48d9f9c lwip: rework for low_level_output 2016-11-20 17:05:44 +08:00
Liu Zhi Fu fa57720cdf lwip: optimize low_level_output
When the parameter pbuf for low_level_output is a list, malloc a new pbuf of
which the length equals to the total length of pbuf and send the new pbuf to L2
2016-11-19 22:25:30 +08:00
Liu Zhi Fu b08113d2b4 lwip: fix CI build issue 2016-11-19 15:14:37 +08:00
Liu Zhi Fu ab92d43bc6 lwip: fix socket memory leak issue
1. Add socket memory leak debug counter
2. Fix TCP PCB leak issue
2016-11-19 14:57:42 +08:00
Liu Zhi Fu 5e428f21b6 lwip: default ESP_L2_TO_L3_COPY to 0 2016-11-17 10:53:00 +08:00