mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 12:35:28 +00:00
lwip: rework according review comments
This commit is contained in:
@@ -508,8 +508,10 @@ netconn_recv_data(struct netconn *conn, void **new_buf)
|
|||||||
}
|
}
|
||||||
#endif /* (LWIP_UDP || LWIP_RAW) */
|
#endif /* (LWIP_UDP || LWIP_RAW) */
|
||||||
|
|
||||||
#ifdef ESP_PERF
|
#if ESP_PERF
|
||||||
if (len > DBG_PERF_FILTER_LEN) { DBG_PERF_PATH_SET(DBG_PERF_DIR_RX, DBG_PERF_POINT_SOC_IN); }
|
if (len > DBG_PERF_FILTER_LEN) {
|
||||||
|
DBG_PERF_PATH_SET(DBG_PERF_DIR_RX, DBG_PERF_POINT_SOC_IN);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LWIP_SO_RCVBUF
|
#if LWIP_SO_RCVBUF
|
||||||
|
@@ -202,8 +202,10 @@ recv_udp(void *arg, struct udp_pcb *pcb, struct pbuf *p,
|
|||||||
#endif /* LWIP_NETBUF_RECVINFO */
|
#endif /* LWIP_NETBUF_RECVINFO */
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ESP_PERF
|
#if ESP_PERF
|
||||||
if (p->len > DBG_PERF_FILTER_LEN) DBG_PERF_PATH_SET(DBG_PERF_DIR_RX, DBG_PERF_POINT_LWIP_OUT);
|
if (p->len > DBG_PERF_FILTER_LEN) {
|
||||||
|
DBG_PERF_PATH_SET(DBG_PERF_DIR_RX, DBG_PERF_POINT_LWIP_OUT);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
len = p->tot_len;
|
len = p->tot_len;
|
||||||
|
@@ -1437,6 +1437,7 @@ lwip_sendto(int s, const void *data, size_t size, int flags,
|
|||||||
#else /* LWIP_NETIF_TX_SINGLE_PBUF */
|
#else /* LWIP_NETIF_TX_SINGLE_PBUF */
|
||||||
err = netbuf_ref(&buf, data, short_size);
|
err = netbuf_ref(&buf, data, short_size);
|
||||||
#endif /* LWIP_NETIF_TX_SINGLE_PBUF */
|
#endif /* LWIP_NETIF_TX_SINGLE_PBUF */
|
||||||
|
|
||||||
if (err == ERR_OK) {
|
if (err == ERR_OK) {
|
||||||
DBG_PERF_PATH_SET(DBG_PERF_DIR_TX, DBG_PERF_POINT_SOC_OUT);
|
DBG_PERF_PATH_SET(DBG_PERF_DIR_TX, DBG_PERF_POINT_SOC_OUT);
|
||||||
/* send the data */
|
/* send the data */
|
||||||
|
@@ -219,7 +219,7 @@ tcpip_inpkt(struct pbuf *p, struct netif *inp, netif_input_fn input_fn)
|
|||||||
msg->msg.inp.p = p;
|
msg->msg.inp.p = p;
|
||||||
msg->msg.inp.netif = inp;
|
msg->msg.inp.netif = inp;
|
||||||
msg->msg.inp.input_fn = input_fn;
|
msg->msg.inp.input_fn = input_fn;
|
||||||
#ifdef ESP_PERF
|
#if ESP_PERF
|
||||||
if (p->len > DBG_PERF_FILTER_LEN) {
|
if (p->len > DBG_PERF_FILTER_LEN) {
|
||||||
DBG_PERF_PATH_SET(DBG_PERF_DIR_RX, DBG_PERF_POINT_WIFI_OUT);
|
DBG_PERF_PATH_SET(DBG_PERF_DIR_RX, DBG_PERF_POINT_WIFI_OUT);
|
||||||
}
|
}
|
||||||
|
@@ -72,8 +72,10 @@ ethernet_input(struct pbuf *p, struct netif *netif)
|
|||||||
s16_t ip_hdr_offset = SIZEOF_ETH_HDR;
|
s16_t ip_hdr_offset = SIZEOF_ETH_HDR;
|
||||||
#endif /* LWIP_ARP || ETHARP_SUPPORT_VLAN */
|
#endif /* LWIP_ARP || ETHARP_SUPPORT_VLAN */
|
||||||
|
|
||||||
#ifdef ESP_PERF
|
#if ESP_PERF
|
||||||
if (p->len > DBG_PERF_FILTER_LEN) DBG_PERF_PATH_SET(DBG_PERF_DIR_RX, DBG_PERF_POINT_LWIP_IN);
|
if (p->len > DBG_PERF_FILTER_LEN) {
|
||||||
|
DBG_PERF_PATH_SET(DBG_PERF_DIR_RX, DBG_PERF_POINT_LWIP_IN);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (p->len <= SIZEOF_ETH_HDR) {
|
if (p->len <= SIZEOF_ETH_HDR) {
|
||||||
|
Reference in New Issue
Block a user