Commit Graph

654 Commits

Author SHA1 Message Date
David Čermák
2f1d30d155 Merge branch 'bugfix/lwip_core_locking' into 'master'
esp_netif/lwip: Fix core-locking config

Closes IDFGH-8445, IDFGH-9098, and IDFGH-9063

See merge request espressif/esp-idf!20840
2023-01-18 20:31:25 +08:00
David Cermak
a71fa82177 esp_netif/lwip: Fix core-locking config
* Fix thread safety issues in non-core locking
* Add option to verify thread safety issues in lwip (core-lock assertion)
* Make esp_sntp.h thread safe API
* Fix sntp examples
* Fix openthread libs

Closes https://github.com/espressif/esp-idf/issues/9908
Closes https://github.com/espressif/esp-idf/issues/10502
Closes https://github.com/espressif/esp-idf/issues/10466
2023-01-17 16:15:58 +01:00
Cao Sen Miao
94120b82c2 esp32h2: add build test 2023-01-17 10:29:04 +08:00
David Cermak
d964aaceac lwip: Mark PPP officially supported
Closes https://github.com/espressif/esp-idf/issues/10249
2023-01-04 14:20:20 +01:00
yuexia
032ebd76cb esp32c6: support wifi 6 2022-12-29 11:48:36 +08:00
Jiang Jiang Jian
be94097eab Merge branch 'Bugfix/softap_excedes_the_range_of_subnet' into 'master'
dhcp:bugfix softap excedes the range of subnet

Closes IDF-6138

See merge request espressif/esp-idf!20831
2022-12-19 13:41:35 +08:00
xueyunfei
1ae1723d23 dhcp server:bugfix softap excedes the range of subnet 2022-12-16 14:25:04 +08:00
zhangwenxu
fd49a818f8 lwip: add menuconfig option to enable UDP debugging log 2022-12-16 06:12:50 +00:00
Abhik Roy
627d03182a Merge branch 'components/lwip/napt_debug_enable' into 'master'
components/lwip: Add menuconfig option to enable NAPT debugging.

See merge request espressif/esp-idf!21260
2022-12-14 15:27:48 +08:00
Abhik Roy
c92f5faa70 components/lwip: Add menuconfig option to enable NAPT debugging,
removed L2_TO_L3_COPY in LWIP Kconfig,
Also added DHCP server start log.
2022-12-02 21:57:53 +05:30
xueyunfei
7490a1553d lwip:optimization dns ipv4 ipv6 timeir
* Update submodule: git log --oneline 33912690ea005e8ff05b2c579ebbf0a4189c3b00..705dd71d46779bf29653f1f1d7b1af5a09fb2aa7

Detailed description of the changes:
  - dhcp: init fine timer when dhcp start(esp-lwip@705dd71d)
  - ip6 timer: optimization lwip ip6 reassembly timer (esp-lwip@9813ea9a)
  - ip4 timer: optimization lwip ip4 reassembly timer (esp-lwip@ce1a7099)
  - dns timer: optimization lwip dns timer (esp-lwip@6b0bfc2e)
2022-11-23 11:57:47 +00:00
zhangyanjiao
ff54ae22f7 lwip: fix the bug that long time to get IP
Closes WIFI-4932
2022-11-03 12:01:13 +08:00
xueyunfei
d1abdf47c4 lwip timer:optimization dhcp fine timer 2022-11-01 20:49:23 +08:00
Song Ruo Jing
be0fdfa176 soc: Add a soc cap, SOC_CLK_RC_FAST_D256_SUPPORTED, for whether the target has the RC_FAST_D256 clock 2022-11-01 11:23:26 +08:00
Song Ruo Jing
2557e24a28 ci: Enable esp32c6 example, test_apps, and unit tests CI build stage 2022-11-01 11:23:21 +08:00
Xue Yun Fei
c941691711 Merge branch 'Bugfix/increase_ping_task_stack_size' into 'master'
lwip:bugfix for increase ping task stack size

Closes WIFI-4903

See merge request espressif/esp-idf!20664
2022-10-19 19:19:25 +08:00
xueyunfei
8c17b04cef lwip:bugfix for increase ping task stack size 2022-10-19 10:49:13 +08:00
xueyunfei
bfaaa86775 Lwip:add TCP Fin2 timeout configuration 2022-10-18 15:40:43 +08:00
David Cermak
1f2c16af97 lwip/test: Add SNTP cases to check NTP timestamp overflow 2022-10-03 17:34:42 +02:00
David Cermak
ad0da9cd2b lwip: Migrate unit tests to test_apps 2022-09-29 10:40:28 +02:00
David Cermak
9e31c5077d lwip: Document 32 bit NTP timestamp converstion to 64b time_t 2022-09-21 17:38:37 +02:00
David Cermak
4959b0a213 lwip: Fix close() might block forever if SO_LINGER=y
* Update submodule: git log --oneline ec115c720b8909364ec5898dc5cc430cc898192d..316cfc17ce24f2d5d65c9f28251ec43a59a74cb1

Detailed description of the changes:
  - tcp/close: Fix clean socket closure when lignering (espressif/esp-lwip@316cfc17)
  - tcp_in: Fix incomplete closure if linger active (espressif/esp-lwip@8b599aa1)
  - ci: Introduce lwip test apps (espressif/esp-lwip@0866f578)
2022-09-19 07:21:21 +02:00
David Cermak
14c6d3a889 lwip: Reference official 2.1.3-esp branch
Actual changes against 2.1.3-esp-dev:
* Fix IPv6 zoning violations
* Melted on-demand timer's commits into one
2022-08-16 13:03:53 +00:00
Ivan Grokhotkov
401c10ecfb build system: re-add -Wno-format as private flag for some components 2022-08-03 16:42:47 +04:00
Shu Chen
e380704731 Merge branch 'feature/otbr-nat64' into 'master'
openthread: add NAT64 and DNS64 support

See merge request espressif/esp-idf!18708
2022-08-03 12:01:23 +08:00
Jiacheng Guo
905856a054 openthread: add NAT64 and DNS64 support
* Add required configs and headers for NAT64 and DNS64
* Add hook for DNS name resolution
* Add NAT64 and DNS64 example commands
2022-08-01 15:31:49 +08:00
David Čermák
8d62485a12 Merge branch 'feat/lwip_dhcps_append_opts' into 'master'
lw-ip/dhcpserver: Support for adding extra opts

Closes IDFGH-973

See merge request espressif/esp-idf!19115
2022-07-29 14:02:20 +08:00
David Cermak
64f4f0ac1e esp_netif/lwip: Use netif-client-data to store esp_netif ptr
lwip/netif struct has two places to store user's data
* netif->state (1 void*) but that might be occupied in special cases
* netif->client_dtat (n void*s) but that must be enabled in opts.h
This commit stores esp_netif_t* primarily in state, but if any special
netif is enabled in menuconfig (bridgeif, pppos), it uses netif->client_data.
This commit also fixes incorrect esp_netif that is attached to
IP_EVENT_GOT_IP6 event posted by pppos interfaces in:
c585618b97/components/esp_netif/lwip/esp_netif_lwip_ppp.c (L114)

Closes https://github.com/espressif/esp-idf/issues/9345
2022-07-27 11:55:18 +00:00
David Cermak
b5d13b9837 lwip/dhcpserver: Support for adding extra opts
This enables users appending an extra, user defined options in dhcp
server messages. Example of adding captive_portal option (160) to dhcp
offer message is provided:
* Add idf-lwip hook file (project makefile):
  idf_component_get_property(lwip lwip COMPONENT_LIB)
  target_compile_options(${lwip} PRIVATE "-I${PROJECT_DIR}/main")
  target_compile_definitions(${lwip} PRIVATE "-DESP_IDF_LWIP_HOOK_FILENAME=\"add_captive_portal.h\"")
* Implement appending (add_captive_portal.h):
  #pragma once
  #define LWIP_HOOK_DHCPS_POST_APPEND_OPTS(netif, dhcp, state, pp_opts) \
  if ((state)==DHCPOFFER) { *(pp_opts) = append_captive_portal_uri(*(pp_opts)); }
  static inline uint8_t *append_captive_portal_uri(uint8_t *optptr)
  {
    const static uint8_t DHCP_OPTION_CAPTIVE_PORTAL=160;
    const static char CAPTIVE_PORTAL_URI[]="my_uri";
    int size = sizeof(CAPTIVE_PORTAL_URI) - 1;
    *optptr++ = DHCP_OPTION_CAPTIVE_PORTAL;
    *optptr++ = size;
    for(int i = 0; i < size; ++i) {
        *optptr++ = CAPTIVE_PORTAL_URI[i];
    }
    return optptr;
  }

Merges https://github.com/espressif/esp-idf/pull/3308
2022-07-26 07:09:22 +00:00
Darian Leung
781d06af73 esp_hw_support: Remove compare_set.h API
This function removes the following legacy atomic CAS functions:

From compare_set.h (file removed):
- compare_and_set_native()
- compare_and_set_extram()

From portmacro.h
- uxPortCompareSet()
- uxPortCompareSetExtram()

Users should call esp_cpu_compare_and_set() instead as this function hides the details
of atomic CAS on internal and external RAM addresses.

Due to the removal of compare_set.h, some missing header includes are also fixed in this commit.
2022-07-22 00:06:06 +08:00
David Cermak
5c383d7b73 esp_netif/lwip: Fix deps cycles to "lwip -> esp_netif -> phy-drivers"
Fix dependency tree so that lwip doesn't depend on any specific network
interface component.
Network interface drivers shall depend on esp_netif.
esp_netif shall depend on lwip (but not on any specific interface
driver) -- it optionally depends on vfs and esp_eth (need ethernet
header for L2/bridge mode)
2022-07-20 14:59:07 +02:00
David Čermák
5548f5acd6 Merge branch 'bugfix/lwip_ondemand_timers_num_system_timeout' into 'master'
lw ip: Fix on-demand timers to update internal system touts

Closes IDFGH-7595

See merge request espressif/esp-idf!18724
2022-07-18 21:56:57 +08:00
David Cermak
58b0def0d9 lwip: Fix on-demand timers to update internal system touts
If on-demand timers (IGMP+MLD6) were enabled, idf updated user config
MEMP_NUM_SYS_TIMEOUT. The implementation of these timers are in lwip
project so the internal system timeout shall be updated accordingly,
enabling port layers to modify MEMP_NUM_SYS_TIMEOUT.

Closes https://github.com/espressif/esp-idf/issues/9150
2022-07-14 05:09:53 +00:00
Fu Hanxi
c0568611dd docs: changes docs supported targets tables 2022-07-14 08:26:32 +08:00
xueyunfei
45ad770c37 Icmp: get tos parameter in icmp reply 2022-07-05 11:37:41 +08:00
xueyunfei
b569f4069a bugfix for add ttl for ping socket 2022-07-05 11:37:41 +08:00
Anton Maklakov
d2ce9abb2a lwip: suppress some GCC 11 warnings
Closes https://github.com/espressif/esp-idf/issues/9142
2022-06-29 11:42:09 +00:00
Ondrej Kosta
53082a22f7 esp_netif: added support for LwIP bridge
examples: created bridge example
2022-06-14 15:29:44 +02:00
David Cermak
343cf2696e esp_eth: Reduce internal deps onto netif-glue 2022-06-09 07:55:40 +00:00
morris
aa3ddbc3c6 Merge branch 'test/enable_c2_target_tests' into 'master'
ci: enable target tests for ESP32-C2

Closes IDF-4989

See merge request espressif/esp-idf!18182
2022-06-03 16:41:24 +08:00
David Čermák
46e599c56d Merge branch 'feature/lwip_rework_patches' into 'master'
lw-IP: Reworked patches

Closes IDFGH-6197

See merge request espressif/esp-idf!17388
2022-06-03 15:26:55 +08:00
David Cermak
c67f4c2b4c lwip: Remove vanilla-lwip config until it's fully deployable 2022-06-02 20:45:24 +02:00
Michael (XIAO Xufeng)
6a8aed12ee ci: partially enable ut tests for esp32c2
Disabled test cases are tracked in:

 IDF-4465, IDF-5045, IDF-5057, IDF-5058, IDF-5059, IDF-5060, IDF-5061, IDF-5131

- test_fatfs: IDF-5136

- test_pm: IDF-5053

- test_cache_mmu: IDF-5138

- test_partitions: IDF-5137

- test_vfs: IDF-5139

- test_freertos: IDF-5140

- test_wpa_supplicant: IDF-5046

- test_mbedtls: IDF-5141

- test_pthread: IDF-5142

- test_protocomm: IDF-5143

- test_lightsleep: IDF-5053

- test_taskwdt: IDF-5055

- test_tcp_transport: IDF-5144

- test_app_update: IDF-5145

- test_timer: IDF-5052

- test_spi: IDF-5146

- test_rtc_clk: IDF-5060

- test_heap: IDF-5167

ci: fixed issues for tests of libgcc, ets_timer, newlib

test_pm: support on C2
2022-06-02 14:23:35 +08:00
David Cermak
7efcb5e625 lwip: Add missing null-checks, rename to vanilla-lwip 2022-06-01 20:38:40 +02:00
David Cermak
00377cf2e5 lwip/ci: Cleanup public header checker ignore list 2022-06-01 14:36:58 +02:00
Djordje Nedic
facab8c5a7 tools: Increase the minimal supported CMake version to 3.16
This updates the minimal supported version of CMake to 3.16, which in turn enables us to use more CMake features and have a cleaner build system.
This is the version that provides most new features and also the one we use in our latest docker image for CI.
2022-06-01 06:35:02 +00:00
David Cermak
8b40579aa4 lwip: Move wifi's custom pbuf alloc/free to IRAM if config 2022-05-31 16:21:47 +02:00
David Cermak
0e71a325de lwip/wifi: Improve Rx throughput on the wifi defaults (sta+ap) 2022-05-31 15:23:06 +02:00
yuanjm
0ae030d0ca fix(Kconfig): Fix lw-ip Kconfig display garbled characters 2022-05-27 02:48:45 +00:00
yuanjm
667a7c6cd0 feat(netif): Add NETIF_FLAG_MLD6 flag for eth netif
Closes https://github.com/espressif/esp-idf/issues/8602
2022-05-20 11:26:27 +00:00