kopia lustrzana https://github.com/espressif/esp-idf
lwip: Cleanup lwipopts flags and options
* Removed unused and flags * Fixed comments * Order of flags lwip/esp-specific * Used 1/0 logic for boolean flagspull/8262/head
rodzic
f010729e74
commit
cfc52bacbc
|
@ -81,19 +81,6 @@ menu "LWIP"
|
|||
the maximum amount of sockets here. The valid value is from 1
|
||||
to 16.
|
||||
|
||||
config LWIP_USE_ONLY_LWIP_SELECT
|
||||
bool "Support LWIP socket select() only (DEPRECATED)"
|
||||
default n
|
||||
help
|
||||
This option is deprecated. Use VFS_SUPPORT_SELECT instead, which is
|
||||
the inverse of this option.
|
||||
|
||||
The virtual filesystem layer of select() redirects sockets to
|
||||
lwip_select() and non-socket file descriptors to their respective driver
|
||||
implementations. If this option is enabled then all calls of select()
|
||||
will be redirected to lwip_select(), therefore, select can be used
|
||||
for sockets only.
|
||||
|
||||
config LWIP_SO_LINGER
|
||||
bool "Enable SO_LINGER processing"
|
||||
default n
|
||||
|
@ -190,32 +177,6 @@ menu "LWIP"
|
|||
help
|
||||
Enabling this option allows LWIP statistics
|
||||
|
||||
config LWIP_ETHARP_TRUST_IP_MAC
|
||||
bool "Enable LWIP ARP trust"
|
||||
default n
|
||||
help
|
||||
Enabling this option allows ARP table to be updated.
|
||||
|
||||
If this option is enabled, the incoming IP packets cause the ARP table to be
|
||||
updated with the source MAC and IP addresses supplied in the packet.
|
||||
You may want to disable this if you do not trust LAN peers to have the
|
||||
correct addresses, or as a limited approach to attempt to handle
|
||||
spoofing. If disabled, lwIP will need to make a new ARP request if
|
||||
the peer is not already in the ARP table, adding a little latency.
|
||||
The peer *is* in the ARP table if it requested our address before.
|
||||
Also notice that this slows down input processing of every IP packet!
|
||||
|
||||
There are two known issues in real application if this feature is enabled:
|
||||
- The LAN peer may have bug to update the ARP table after the ARP entry is aged out.
|
||||
If the ARP entry on the LAN peer is aged out but failed to be updated, all IP packets
|
||||
sent from LWIP to the LAN peer will be dropped by LAN peer.
|
||||
- The LAN peer may not be trustful, the LAN peer may send IP packets to LWIP with
|
||||
two different MACs, but the same IP address. If this happens, the LWIP has problem
|
||||
to receive IP packets from LAN peer.
|
||||
|
||||
So the recommendation is to disable this option.
|
||||
Here the LAN peer means the other side to which the ESP station or soft-AP is connected.
|
||||
|
||||
config LWIP_ESP_GRATUITOUS_ARP
|
||||
bool "Send gratuitous ARP periodically"
|
||||
default y
|
||||
|
@ -420,6 +381,7 @@ menu "LWIP"
|
|||
Enabling this option means that if a packet is sent with a destination
|
||||
address equal to the interface's own IP address, it will "loop back" and
|
||||
be received by this interface.
|
||||
Disabling this option disables support of loopback interface in lwIP
|
||||
|
||||
config LWIP_LOOPBACK_MAX_PBUFS
|
||||
int "Max queued loopback packets per interface"
|
||||
|
@ -575,15 +537,6 @@ menu "LWIP"
|
|||
help
|
||||
TCP will support sending selective acknowledgements (SACKs).
|
||||
|
||||
config LWIP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES
|
||||
bool "Keep TCP connections when IP changed"
|
||||
default n
|
||||
help
|
||||
This option is enabled when the following scenario happen:
|
||||
network dropped and reconnected, IP changes is like: 192.168.0.2->0.0.0.0->192.168.0.2
|
||||
|
||||
Disable this option to keep consistent with the original LWIP code behavior.
|
||||
|
||||
|
||||
choice LWIP_TCP_OVERSIZE
|
||||
prompt "Pre-allocate transmit PBUF size"
|
||||
|
|
Plik diff jest za duży
Load Diff
|
@ -54,7 +54,7 @@
|
|||
#include "esp_netif_net_stack.h"
|
||||
#include "esp_compiler.h"
|
||||
|
||||
#if !ESP_L2_TO_L3_COPY
|
||||
#ifndef CONFIG_LWIP_L2_TO_L3_COPY
|
||||
/**
|
||||
* @brief Free resources allocated in L2 layer
|
||||
*
|
||||
|
@ -102,7 +102,7 @@ low_level_init(struct netif *netif)
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if !ESP_L2_TO_L3_COPY
|
||||
#ifndef CONFIG_LWIP_L2_TO_L3_COPY
|
||||
netif->l2_buffer_free_notify = lwip_netif_wifi_free_rx_buffer;
|
||||
#endif
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ low_level_init(struct netif *netif)
|
|||
* to become availale since the stack doesn't retry to send a packet
|
||||
* dropped because of memory failure (except for the TCP timers).
|
||||
*/
|
||||
static err_t ESP_IRAM_ATTR
|
||||
static err_t
|
||||
low_level_output(struct netif *netif, struct pbuf *p)
|
||||
{
|
||||
esp_netif_t *esp_netif = esp_netif_get_handle_from_netif_impl(netif);
|
||||
|
@ -170,7 +170,7 @@ low_level_output(struct netif *netif, struct pbuf *p)
|
|||
*
|
||||
* @param netif the lwip network interface structure for this ethernetif
|
||||
*/
|
||||
void ESP_IRAM_ATTR
|
||||
void
|
||||
wlanif_input(void *h, void *buffer, size_t len, void* eb)
|
||||
{
|
||||
struct netif * netif = h;
|
||||
|
@ -184,7 +184,7 @@ wlanif_input(void *h, void *buffer, size_t len, void* eb)
|
|||
return;
|
||||
}
|
||||
|
||||
#if (ESP_L2_TO_L3_COPY == 1)
|
||||
#ifdef CONFIG_LWIP_L2_TO_L3_COPY
|
||||
p = pbuf_alloc(PBUF_RAW, len, PBUF_RAM);
|
||||
if (p == NULL) {
|
||||
esp_netif_free_rx_buffer(esp_netif, eb);
|
||||
|
@ -202,7 +202,7 @@ wlanif_input(void *h, void *buffer, size_t len, void* eb)
|
|||
p->payload = buffer;
|
||||
p->l2_owner = netif;
|
||||
p->l2_buf = eb;
|
||||
#endif
|
||||
#endif /* CONFIG_LWIP_L2_TO_L3_COPY */
|
||||
|
||||
/* full packet send to tcpip_thread to process */
|
||||
if (unlikely(netif->input(p, netif) != ERR_OK)) {
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
# CONFIG_DEPRECATED_OPTION CONFIG_NEW_OPTION
|
||||
|
||||
CONFIG_L2_TO_L3_COPY CONFIG_LWIP_L2_TO_L3_COPY
|
||||
CONFIG_USE_ONLY_LWIP_SELECT CONFIG_LWIP_USE_ONLY_LWIP_SELECT
|
||||
CONFIG_ESP_GRATUITOUS_ARP CONFIG_LWIP_ESP_GRATUITOUS_ARP
|
||||
CONFIG_GARP_TMR_INTERVAL CONFIG_LWIP_GARP_TMR_INTERVAL
|
||||
CONFIG_TCPIP_RECVMBOX_SIZE CONFIG_LWIP_TCPIP_RECVMBOX_SIZE
|
||||
|
|
Ładowanie…
Reference in New Issue