#define WIFI_PROTOCOL_11N 4
typedef enum {
- WIFI_BW_HT20 = 0, /* Bandwidth is HT20 */
+ WIFI_BW_HT20 = 1, /* Bandwidth is HT20 */
WIFI_BW_HT40, /* Bandwidth is HT40 */
} wifi_bandwidth_t;
-Subproject commit 02232f974b0ff1568ddd6d7015a41fb4f4870994
+Subproject commit 074303d74fc9c68823adee0a38fc1e8de42943b6
If enabled, debug information (including integrity checks) will be printed
to UART for the port-specific MUX implementation.
+if !FREERTOS_UNICORE
config FREERTOS_PORTMUX_DEBUG_RECURSIVE
bool "Debug portMUX Recursion"
depends on FREERTOS_PORTMUX_DEBUG
help
If enabled, additional debug information will be printed for recursive
portMUX usage.
+endif #FREERTOS_UNICORE
endif # FREERTOS_DEBUG_INTERNALS
#else
void vPortCPUAcquireMutex(portMUX_TYPE *mux) {
#endif
+#if !CONFIG_FREERTOS_UNICORE
uint32_t res;
uint32_t recCnt;
unsigned int irqStatus;
}
#endif
portEXIT_CRITICAL_NESTED(irqStatus);
+#endif
}
/*
#else
portBASE_TYPE vPortCPUReleaseMutex(portMUX_TYPE *mux) {
#endif
+#if !CONFIG_FREERTOS_UNICORE
uint32_t res=0;
uint32_t recCnt;
unsigned int irqStatus;
}
portEXIT_CRITICAL_NESTED(irqStatus);
return ret;
+#else //!CONFIG_FREERTOS_UNICORE
+ return 0;
+#endif
}
#if CONFIG_FREERTOS_BREAK_ON_SCHEDULER_START_JTAG
}
#endif /* (LWIP_UDP || LWIP_RAW) */
+#ifdef ESP_PERF
+ if (len > DBG_PERF_FILTER_LEN) { DBG_PERF_PATH_SET(DBG_PERF_DIR_RX, DBG_PERF_POINT_SOC_IN); }
+#endif
+
#if LWIP_SO_RCVBUF
SYS_ARCH_DEC(conn->recv_avail, len);
#endif /* LWIP_SO_RCVBUF */
#endif /* LWIP_NETBUF_RECVINFO */
}
+#ifdef ESP_PERF
+ if (p->len > DBG_PERF_FILTER_LEN) DBG_PERF_PATH_SET(DBG_PERF_DIR_RX, DBG_PERF_POINT_LWIP_OUT);
+#endif
+
len = p->tot_len;
if (sys_mbox_trypost(&conn->recvmbox, buf) != ERR_OK) {
ESP_STATS_INC(esp.rx_udpmbox_post_fail);
err = netbuf_ref(&buf, data, short_size);
#endif /* LWIP_NETIF_TX_SINGLE_PBUF */
if (err == ERR_OK) {
+ DBG_PERF_PATH_SET(DBG_PERF_DIR_TX, DBG_PERF_POINT_SOC_OUT);
/* send the data */
err = netconn_send(sock->conn, &buf);
}
msg->msg.inp.p = p;
msg->msg.inp.netif = inp;
msg->msg.inp.input_fn = input_fn;
+#ifdef ESP_PERF
+ if (p->len > DBG_PERF_FILTER_LEN) {
+ DBG_PERF_PATH_SET(DBG_PERF_DIR_RX, DBG_PERF_POINT_WIFI_OUT);
+ }
+#endif
+
if (sys_mbox_trypost(&mbox, msg) != ERR_OK) {
ESP_STATS_INC(esp.tcpip_inpkt_post_fail);
memp_free(MEMP_TCPIP_MSG_INPKT, msg);
#endif /* LWIP_TCPIP_CORE_LOCKING */
-#if ESP_LWIP
-#if ESP_DUAL_CORE
- sys_thread_t xLwipTaskHandle = 0;
- xTaskCreatePinnedToCore(tcpip_thread, TCPIP_THREAD_NAME, TCPIP_THREAD_STACKSIZE, NULL, TCPIP_THREAD_PRIO, NULL, 1);
-#else
sys_thread_t xLwipTaskHandle = sys_thread_new(TCPIP_THREAD_NAME
, tcpip_thread, NULL, TCPIP_THREAD_STACKSIZE, TCPIP_THREAD_PRIO);
-#endif
printf("tcpip_task_hdlxxx : %x, prio:%d,stack:%d\n",
(u32_t)xLwipTaskHandle,TCPIP_THREAD_PRIO,TCPIP_THREAD_STACKSIZE);
-#else
- sys_thread_new(TCPIP_THREAD_NAME, tcpip_thread, NULL, TCPIP_THREAD_STACKSIZE, TCPIP_THREAD_PRIO);
-#endif
}
* LWIP_STATS==1: Enable statistics collection in lwip_stats.
*/
#ifndef LWIP_STATS
-#define LWIP_STATS 1
+#define LWIP_STATS 0
#endif
#if LWIP_STATS
#define ESP_LIGHT_SLEEP 1
#define ESP_L2_TO_L3_COPY CONFIG_L2_TO_L3_COPY
#define ESP_CNT_DEBUG 0
-#define ESP_DUAL_CORE 0
-#define TCP_WND_DEFAULT (4*TCP_MSS)
-#define TCP_SND_BUF_DEFAULT (2*TCP_MSS)
+#define TCP_WND_DEFAULT (4*TCP_MSS)
+#define TCP_SND_BUF_DEFAULT (2*TCP_MSS)
-#if ESP_PER_SOC_TCP_WND
-#define TCP_WND(pcb) (pcb->per_soc_tcp_wnd)
-#define TCP_SND_BUF(pcb) (pcb->per_soc_tcp_snd_buf)
-#else
#if ESP_PERF
-extern unsigned char misc_prof_get_tcpw(void);
-extern unsigned char misc_prof_get_tcp_snd_buf(void);
-#define TCP_WND(pcb) (misc_prof_get_tcpw()*TCP_MSS)
-#define TCP_SND_BUF(pcb) (misc_prof_get_tcp_snd_buf()*TCP_MSS)
+#define DBG_PERF_PATH_SET(dir, point)
+#define DBG_PERF_FILTER_LEN 1000
+
+enum {
+ DBG_PERF_DIR_RX = 0,
+ DBG_PERF_DIR_TX,
+};
+
+enum {
+ DBG_PERF_POINT_INT = 0,
+ DBG_PERF_POINT_WIFI_IN = 1,
+ DBG_PERF_POINT_WIFI_OUT = 2,
+ DBG_PERF_POINT_LWIP_IN = 3,
+ DBG_PERF_POINT_LWIP_OUT = 4,
+ DBG_PERF_POINT_SOC_IN = 5,
+ DBG_PERF_POINT_SOC_OUT = 6,
+};
+
+#else
+#define DBG_PERF_PATH_SET(dir, point)
+#define DBG_PERF_FILTER_LEN 1000
#endif
+
+#if ESP_PER_SOC_TCP_WND
+#define TCP_WND(pcb) (pcb->per_soc_tcp_wnd)
+#define TCP_SND_BUF(pcb) (pcb->per_soc_tcp_snd_buf)
#endif
/**
#define DHCP_DEBUG LWIP_DBG_OFF
#define LWIP_DEBUG LWIP_DBG_OFF
#define TCP_DEBUG LWIP_DBG_OFF
+#define ESP_STATS 0
#define CHECKSUM_CHECK_UDP 0
#define CHECKSUM_CHECK_IP 0
s16_t ip_hdr_offset = SIZEOF_ETH_HDR;
#endif /* LWIP_ARP || ETHARP_SUPPORT_VLAN */
+#ifdef ESP_PERF
+ if (p->len > DBG_PERF_FILTER_LEN) DBG_PERF_PATH_SET(DBG_PERF_DIR_RX, DBG_PERF_POINT_LWIP_IN);
+#endif
+
if (p->len <= SIZEOF_ETH_HDR) {
/* a packet with only an ethernet header (or less) is not valid for us */
ETHARP_STATS_INC(etharp.proterr);
#define IFNAME1 'n'
static char hostname[16];
-#if ESP_PERF
-uint32_t g_rx_alloc_pbuf_fail_cnt = 0;
-#endif
/**
* In this function, the hardware should be initialized.
#if CONFIG_EMAC_L2_TO_L3_RX_BUF_MODE
p = pbuf_alloc(PBUF_RAW, len, PBUF_RAM);
if (p == NULL) {
- //g_rx_alloc_pbuf_fail_cnt++;
return;
}
memcpy(p->payload, buffer, len);
#define IFNAME1 'n'
static char hostname[16];
-#if ESP_PERF
-uint32_t g_rx_alloc_pbuf_fail_cnt = 0;
-#endif
/**
* In this function, the hardware should be initialized.