docs(network): Update network/proto API refs and guides for ESP32P4

This commit is contained in:
David Cermak 2023-12-01 12:48:12 +01:00 committed by David Čermák
parent d3afab15bd
commit e3a02d78c8
5 changed files with 12 additions and 20 deletions

View File

@ -29,7 +29,6 @@ api-guides/tools/idf-docker-image.rst
api-guides/tools/index.rst
api-guides/RF_calibration.rst
api-guides/deep-sleep-stub.rst
api-guides/lwip.rst
api-guides/coexist.rst
api-guides/flash_psram_config.rst
api-guides/usb-serial-jtag-console.rst
@ -94,8 +93,6 @@ api-reference/peripherals/sd_pullup_requirements.rst
api-reference/peripherals/index.rst
api-reference/peripherals/uart.rst
api-reference/network/esp_openthread.rst
api-reference/network/esp_eth.rst
api-reference/network/esp_netif_driver.rst
api-reference/network/esp_dpp.rst
api-reference/network/esp_now.rst
api-reference/network/esp-wifi-mesh.rst
@ -103,7 +100,6 @@ api-reference/network/esp_smartconfig.rst
api-reference/network/esp_nan.rst
api-reference/network/esp_wifi.rst
api-reference/network/index.rst
api-reference/network/esp_netif.rst
api-reference/system/sleep_modes.rst
api-reference/system/ota.rst
api-reference/system/app_trace.rst
@ -121,7 +117,6 @@ api-reference/system/intr_alloc.rst
api-reference/index.rst
api-reference/protocols/icmp_echo.rst
api-reference/protocols/esp_serial_slave_link.rst
api-reference/protocols/mqtt.rst
api-reference/protocols/mbedtls.rst
api-reference/protocols/esp_http_server.rst
api-reference/protocols/esp_sdio_slave_protocol.rst
@ -129,11 +124,8 @@ api-reference/protocols/esp_local_ctrl.rst
api-reference/protocols/esp_crt_bundle.rst
api-reference/protocols/esp_http_client.rst
api-reference/protocols/esp_https_server.rst
api-reference/protocols/modbus.rst
api-reference/protocols/esp_tls.rst
api-reference/protocols/mdns.rst
api-reference/protocols/index.rst
api-reference/protocols/asio.rst
security/host-based-security-workflows.rst
security/flash-encryption.rst
security/security.rst

View File

@ -471,9 +471,7 @@ TCP/IP performance is a complex subject, and performance can be optimized toward
Maximum Throughput
^^^^^^^^^^^^^^^^^^
Espressif tests ESP-IDF TCP/IP throughput using the :example:`wifi/iperf` example in an RF-sealed enclosure.
The :example_file:`wifi/iperf/sdkconfig.defaults` file for the iperf example contains settings known to maximize TCP/IP throughput, usually at the expense of higher RAM usage. To get maximum TCP/IP throughput in an application at the expense of other factors, it is suggested to apply settings from this file into the project sdkconfig.
Espressif tests ESP-IDF TCP/IP throughput using the iperf test application: https://iperf.fr/, please refer to :ref:`improve-network-speed` for more details about the actual testing and using the optimized configuration.
.. important::

View File

@ -238,15 +238,17 @@ To obtain the best performance for a particular interrupt handler:
- If you are sure the entire interrupt handler can run from IRAM (see :ref:`iram-safe-interrupt-handlers`) then set the ``ESP_INTR_FLAG_IRAM`` flag when calling :cpp:func:`esp_intr_alloc` to assign the interrupt. This prevents it being temporarily disabled if the application firmware writes to the internal SPI flash.
- Even if the interrupt handler is not IRAM-safe, if it is going to be executed frequently then consider moving the handler function to IRAM anyhow. This minimizes the chance of a flash cache miss when the interrupt code is executed (see :ref:`speed-targeted-optimizations`). It is possible to do this without adding the ``ESP_INTR_FLAG_IRAM`` flag to mark the interrupt as IRAM-safe, if only part of the handler is guaranteed to be in IRAM.
.. _improve-network-speed:
Improving Network Speed
-----------------------
.. list::
:SOC_WIFI_SUPPORTED: * For Wi-Fi, see :ref:`How-to-improve-Wi-Fi-performance` and :ref:`wifi-buffer-usage`
* For lwIP TCP/IP (Wi-Fi and Ethernet), see :ref:`lwip-performance`
:SOC_WIFI_SUPPORTED: * The :example:`wifi/iperf` example contains a configuration that is heavily optimized for Wi-Fi TCP/IP throughput. Append the contents of the files :example_file:`wifi/iperf/sdkconfig.defaults`, :example_file:`wifi/iperf/sdkconfig.defaults.{IDF_TARGET_PATH_NAME}` and :example_file:`wifi/iperf/sdkconfig.ci.99` to the ``sdkconfig`` file in your project in order to add all of these options. Note that some of these options may have trade-offs in terms of reduced debuggability, increased firmware size, increased memory usage, or reduced performance of other features. To get the best result, read the documentation pages linked above and use related information to determine exactly which options are best suited for your app.
:SOC_EMAC_SUPPORTED: * The :example:`ethernet/iperf` example contains a configuration that is heavily optimized for Ethernet TCP/IP throughput. Examine :example_file:`ethernet/iperf/sdkconfig.defaults` for more details. Note that some of these options may have trade-offs in terms of reduced debuggability, increased firmware size, increased memory usage, or reduced performance of other features. To get the best result, read the documentation pages linked above and use related information to determine exactly which options are best suited for your app.
* For lwIP TCP/IP, see :ref:`lwip-performance`
:SOC_WIFI_SUPPORTED: * The :example:`wifi/iperf` example contains a configuration that is heavily optimized for Wi-Fi TCP/IP throughput, usually at the expense of higher RAM usage. Append the contents of the files :example_file:`wifi/iperf/sdkconfig.defaults`, :example_file:`wifi/iperf/sdkconfig.defaults.{IDF_TARGET_PATH_NAME}` and :example_file:`wifi/iperf/sdkconfig.ci.99` to the ``sdkconfig`` file in your project in order to add all of these options. Note that some of these options may have trade-offs in terms of reduced debuggability, increased firmware size, increased memory usage, or reduced performance of other features. To get the best result, read the documentation pages linked above and use related information to determine exactly which options are best suited for your app.
:SOC_EMAC_SUPPORTED: * The :example:`ethernet/iperf` example contains a configuration that is heavily optimized for Ethernet TCP/IP throughput, usually at the expense of higher RAM usage. Examine :example_file:`ethernet/iperf/sdkconfig.defaults` for more details. Note that some of these options may have trade-offs in terms of reduced debuggability, increased firmware size, increased memory usage, or reduced performance of other features. To get the best result, read the documentation pages linked above and use related information to determine exactly which options are best suited for your app.
Improving I/O Performance
-------------------------

View File

@ -471,9 +471,7 @@ IP 层特性
最大吞吐量
^^^^^^^^^^^^^^^^^^
:example:`wifi/iperf` 示例中,乐鑫测试了在射频密封的封闭环境下 ESP-IDF 的 TCP/IP 吞吐量。
iperf 示例下的 :example_file:`wifi/iperf/sdkconfig.defaults` 文件包含已知可最大化 TCP/IP 吞吐量的设置,但该设置会占用更多 RAM。要牺牲其他性能在应用程序中最大化 TCP/IP 吞吐量,建议将该示例文件中的设置应用到项目的 sdkconfig 文件中。
乐鑫使用 iperf 测试应用程序 https://iperf.fr/ 测试了 ESP-IDF 的 TCP/IP 吞吐量。关于实际测试和优化配置的更多信息,请参考 :ref:`improve-network-speed`
.. important::

View File

@ -238,15 +238,17 @@ ESP-IDF 支持动态 :doc:`/api-reference/system/intr_alloc` 和中断抢占。
- 如果确定整个中断处理程序可以在 IRAM 中运行(参见 :ref:`iram-safe-interrupt-handlers` ),那么在调用 :cpp:func:`esp_intr_alloc` 分配中断时,请设置 ``ESP_INTR_FLAG_IRAM`` 标志,这样可以防止在应用程序固件写入内置 SPI flash 时临时禁用中断。
- 即使是非 IRAM 安全的中断处理程序,如果需要频繁执行,可以考虑将处理程序的函数移到 IRAM 中,从而尽可能规避执行中断代码时发生 flash 缓存缺失的可能性(参见 :ref:`speed-targeted-optimizations` )。如果可以确保只有部分处理程序位于 IRAM 中,则无需添加 ``ESP_INTR_FLAG_IRAM`` 标志将程序标记为 IRAM 安全。
.. _improve-network-speed:
提高网络速度
-----------------------------
.. list::
:SOC_WIFI_SUPPORTED: * 关于提高 Wi-Fi 网速,参见 :ref:`How-to-improve-Wi-Fi-performance` 和 :ref:`wifi-buffer-usage` 。
* 关于提高 lwIP TCP/IPWi-Fi 和以太网)网速,参见 :ref:`lwip-performance`
:SOC_WIFI_SUPPORTED: * 示例 :example:`wifi/iperf` 中的配置针对 Wi-Fi TCP/IP 吞吐量进行了大量优化。将文件 :example_file:`wifi/iperf/sdkconfig.defaults` 、 :example_file:`wifi/iperf/sdkconfig.defaults.{IDF_TARGET_PATH_NAME}` 和 :example_file:`wifi/iperf/sdkconfig.ci.99` 的内容追加到项目的 ``sdkconfig`` 文件中,即可添加所有相关选项。请注意,部分选项可能会导致可调试性降低、固件大小增加、内存使用增加或其他功能的性能降低等影响。为了获得最佳结果,请阅读上述链接文档,并据此确定哪些选项最适合当前应用程序。
:SOC_EMAC_SUPPORTED: * 示例 :example:`ethernet/iperf` 中的配置针对以太网 TCP/IP 吞吐量进行了大量优化。如需了解详情,请查看 :example_file:`ethernet/iperf/sdkconfig.defaults`。请注意,部分选项可能会导致可调试性降低、固件大小增加、内存使用增加或其他功能的性能降低等影响。为了获得最佳结果,请阅读上述链接文档,并据此确定哪些选项最适合当前应用程序。
* 关于提高 lwIP TCP/IP 网速,参见 :ref:`lwip-performance`
:SOC_WIFI_SUPPORTED: * 示例 :example:`wifi/iperf` 中的配置针对 Wi-Fi TCP/IP 吞吐量进行了大量优化,但该配置会占用更多 RAM。将文件 :example_file:`wifi/iperf/sdkconfig.defaults` 、 :example_file:`wifi/iperf/sdkconfig.defaults.{IDF_TARGET_PATH_NAME}` 和 :example_file:`wifi/iperf/sdkconfig.ci.99` 的内容追加到项目的 ``sdkconfig`` 文件中,即可添加所有相关选项。请注意,部分选项可能会导致可调试性降低、固件大小增加、内存使用增加或其他功能的性能降低等影响。为了获得最佳结果,请阅读上述链接文档,并据此确定哪些选项最适合当前应用程序。
:SOC_EMAC_SUPPORTED: * 示例 :example:`ethernet/iperf` 中的配置针对以太网 TCP/IP 吞吐量进行了大量优化,但该配置会占用更多 RAM。如需了解详情,请查看 :example_file:`ethernet/iperf/sdkconfig.defaults`。请注意,部分选项可能会导致可调试性降低、固件大小增加、内存使用增加或其他功能的性能降低等影响。为了获得最佳结果,请阅读上述链接文档,并据此确定哪些选项最适合当前应用程序。
提高 I/O 性能
----------------------------------