|
95 | 95 | * ATTENTION: This is required when using lwIP from more than one context! If
|
96 | 96 | * you disable this, you must be sure what you are doing!
|
97 | 97 | */
|
98 |
| -#if !defined SYS_LIGHTWEIGHT_PROT |
| 98 | +#ifndef SYS_LIGHTWEIGHT_PROT |
99 | 99 | #define SYS_LIGHTWEIGHT_PROT 0
|
100 | 100 | #endif
|
101 | 101 |
|
|
277 | 277 | * (requires the LWIP_RAW option)
|
278 | 278 | */
|
279 | 279 | #ifndef MEMP_NUM_RAW_PCB
|
280 |
| -#define MEMP_NUM_RAW_PCB 0 |
| 280 | +#define MEMP_NUM_RAW_PCB 4 |
281 | 281 | #endif
|
282 | 282 |
|
283 | 283 | /**
|
|
318 | 318 | * reassembly (whole packets, not fragments!)
|
319 | 319 | */
|
320 | 320 | #ifndef MEMP_NUM_REASSDATA
|
321 |
| -#define MEMP_NUM_REASSDATA 0 |
| 321 | +#define MEMP_NUM_REASSDATA 5 |
322 | 322 | #endif
|
323 | 323 |
|
324 | 324 | /**
|
|
329 | 329 | * where the packet is not yet sent when netif->output returns.
|
330 | 330 | */
|
331 | 331 | #ifndef MEMP_NUM_FRAG_PBUF
|
332 |
| -#define MEMP_NUM_FRAG_PBUF 0 |
| 332 | +#define MEMP_NUM_FRAG_PBUF 15 |
333 | 333 | #endif
|
334 | 334 |
|
335 | 335 | /**
|
|
353 | 353 | #endif
|
354 | 354 |
|
355 | 355 | /**
|
356 |
| - * MEMP_NUM_SYS_TIMEOUT: the number of simulateously active timeouts. |
357 |
| - * (requires NO_SYS==0) |
| 356 | + * The number of sys timeouts used by the core stack (not apps) |
| 357 | + * The default number of timeouts is calculated here for all enabled modules. |
| 358 | + */ |
| 359 | +#define LWIP_NUM_SYS_TIMEOUT_INTERNAL (LWIP_TCP + IP_REASSEMBLY + LWIP_ARP + (2*LWIP_DHCP) + LWIP_ACD + LWIP_IGMP + LWIP_DNS + PPP_NUM_TIMEOUTS + (LWIP_IPV6 * (1 + LWIP_IPV6_REASS + LWIP_IPV6_MLD + LWIP_IPV6_DHCP6))) |
| 360 | + |
| 361 | +/** |
| 362 | + * MEMP_NUM_SYS_TIMEOUT: the number of simultaneously active timeouts. |
| 363 | + * The default number of timeouts is calculated here for all enabled modules. |
| 364 | + * The formula expects settings to be either '0' or '1'. |
358 | 365 | */
|
359 | 366 | #ifndef MEMP_NUM_SYS_TIMEOUT
|
360 |
| -#define MEMP_NUM_SYS_TIMEOUT 6 |
| 367 | +#define MEMP_NUM_SYS_TIMEOUT LWIP_NUM_SYS_TIMEOUT_INTERNAL |
361 | 368 | #endif
|
362 | 369 |
|
363 | 370 | /**
|
|
416 | 423 | * PBUF_POOL_SIZE: the number of buffers in the pbuf pool.
|
417 | 424 | */
|
418 | 425 | #ifndef PBUF_POOL_SIZE
|
419 |
| -#define PBUF_POOL_SIZE 4 |
| 426 | +#define PBUF_POOL_SIZE 16 |
| 427 | +#endif |
| 428 | + |
| 429 | +#ifndef LWIP_SUPPORT_CUSTOM_PBUF |
| 430 | +#define LWIP_SUPPORT_CUSTOM_PBUF 1 |
420 | 431 | #endif
|
421 | 432 |
|
422 | 433 | /**
|
|
549 | 560 | * an upper limit on the MSS advertised by the remote host.
|
550 | 561 | */
|
551 | 562 | #ifndef TCP_MSS
|
552 |
| -#define TCP_MSS 536 |
| 563 | +#define TCP_MSS 1420 |
553 | 564 | #endif
|
554 | 565 |
|
| 566 | +/** |
| 567 | + * TCP_CALCULATE_EFF_SEND_MSS: "The maximum size of a segment that TCP really |
| 568 | + * sends, the 'effective send MSS,' MUST be the smaller of the send MSS (which |
| 569 | + * reflects the available reassembly buffer size at the remote host) and the |
| 570 | + * largest size permitted by the IP layer" (RFC 1122) |
| 571 | + * Setting this to 1 enables code that checks TCP_MSS against the MTU of the |
| 572 | + * netif used for a connection and limits the MSS if it would be too big otherwise. |
| 573 | + */ |
| 574 | +#ifndef TCP_CALCULATE_EFF_SEND_MSS |
| 575 | +#define TCP_CALCULATE_EFF_SEND_MSS 1 |
| 576 | +#endif |
555 | 577 |
|
556 | 578 | /**
|
557 | 579 | * TCP_SND_BUF: TCP sender buffer space (bytes).
|
558 | 580 | * To achieve good performance, this should be at least 2 * TCP_MSS.
|
559 | 581 | */
|
560 | 582 | #ifndef TCP_SND_BUF
|
561 |
| -#define TCP_SND_BUF 1500 |
| 583 | +#define TCP_SND_BUF (4 * TCP_MSS) |
562 | 584 | #endif
|
563 | 585 |
|
564 | 586 | /**
|
|
596 | 618 | * Define to 0 if your device is low on memory.
|
597 | 619 | */
|
598 | 620 | #ifndef TCP_QUEUE_OOSEQ
|
599 |
| -#define TCP_QUEUE_OOSEQ 0 |
| 621 | +#define TCP_QUEUE_OOSEQ (LWIP_TCP) |
600 | 622 | #endif
|
601 | 623 |
|
602 | 624 | /**
|
|
738 | 760 | /**
|
739 | 761 | * LWIP_DEBUG==1: Enable Debug.
|
740 | 762 | */
|
| 763 | + |
| 764 | +#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL |
| 765 | + |
741 | 766 | #define LWIP_DEBUG 0
|
| 767 | + |
| 768 | +#define ETHARP_DEBUG LWIP_DBG_OFF |
742 | 769 | #define NETIF_DEBUG LWIP_DBG_OFF
|
743 |
| -#define DHCP_DEBUG LWIP_DBG_OFF |
744 |
| -#define UDP_DEBUG LWIP_DBG_OFF |
745 |
| -#define MEMP_DEBUG LWIP_DBG_OFF |
746 |
| -#define MEM_DEBUG LWIP_DBG_OFF |
| 770 | +#define PBUF_DEBUG LWIP_DBG_OFF |
| 771 | +#define API_LIB_DEBUG LWIP_DBG_OFF |
| 772 | +#define API_MSG_DEBUG LWIP_DBG_OFF |
| 773 | +#define SOCKETS_DEBUG LWIP_DBG_OFF |
747 | 774 | #define ICMP_DEBUG LWIP_DBG_OFF
|
| 775 | +#define IGMP_DEBUG LWIP_DBG_OFF |
| 776 | +#define INET_DEBUG LWIP_DBG_OFF |
| 777 | +#define IP_DEBUG LWIP_DBG_OFF |
| 778 | +#define IP_REASS_DEBUG LWIP_DBG_OFF |
| 779 | +#define RAW_DEBUG LWIP_DBG_OFF |
| 780 | +#define MEM_DEBUG LWIP_DBG_OFF |
| 781 | +#define MEMP_DEBUG LWIP_DBG_OFF |
| 782 | +#define SYS_DEBUG LWIP_DBG_OFF |
| 783 | +#define TIMERS_DEBUG LWIP_DBG_OFF |
| 784 | +#define TCP_DEBUG LWIP_DBG_OFF |
| 785 | +#define TCP_INPUT_DEBUG LWIP_DBG_OFF |
| 786 | +#define TCP_FR_DEBUG LWIP_DBG_OFF |
| 787 | +#define TCP_RTO_DEBUG LWIP_DBG_OFF |
| 788 | +#define TCP_CWND_DEBUG LWIP_DBG_OFF |
| 789 | +#define TCP_WND_DEBUG LWIP_DBG_OFF |
| 790 | +#define TCP_OUTPUT_DEBUG LWIP_DBG_OFF |
| 791 | +#define TCP_RST_DEBUG LWIP_DBG_OFF |
| 792 | +#define TCP_QLEN_DEBUG LWIP_DBG_OFF |
| 793 | +#define UDP_DEBUG LWIP_DBG_OFF |
| 794 | +#define TCPIP_DEBUG LWIP_DBG_OFF |
| 795 | +#define SLIP_DEBUG LWIP_DBG_OFF |
| 796 | +#define DHCP_DEBUG LWIP_DBG_OFF |
| 797 | +#define AUTOIP_DEBUG LWIP_DBG_OFF |
| 798 | +#define ACD_DEBUG LWIP_DBG_OFF |
| 799 | +#define DNS_DEBUG LWIP_DBG_OFF |
| 800 | +#define IP6_DEBUG LWIP_DBG_OFF |
| 801 | +#define DHCP6_DEBUG LWIP_DBG_OFF |
748 | 802 | #endif
|
749 | 803 |
|
750 | 804 | //#define LWIP_USE_EXTERNAL_MBEDTLS 1
|
0 commit comments