lwip: refractor to esp specific counter

1. Add tcp debug counter
2. Refractor other ESP specific counter
This commit is contained in:
Liu Zhi Fu
2017-04-05 15:21:55 +08:00
parent 81f71522b6
commit ece61944f4
15 changed files with 263 additions and 194 deletions

View File

@@ -180,7 +180,7 @@ stats_display(void)
}
#endif /* LWIP_STATS_DISPLAY */
#if ESP_STATS
#if ESP_STATS_DROP
void stats_display_esp(struct stats_esp *esp)
{
LWIP_PLATFORM_DIAG(("\nESP\n\t"));

View File

@@ -906,6 +906,8 @@ tcp_slowtmr_start:
" pcb->rto %"S16_F"\n",
pcb->rtime, pcb->rto));
ESP_STATS_TCP_PCB(pcb);
/* Double retransmission time-out unless we are trying to
* connect to somebody (i.e., we are in SYN_SENT). */
if (pcb->state != SYN_SENT) {

View File

@@ -213,6 +213,7 @@ tcp_create_segment(struct tcp_pcb *pcb, struct pbuf *p, u8_t flags, u32_t seqno,
TCPH_HDRLEN_FLAGS_SET(seg->tcphdr, (5 + optlen / 4), flags);
/* wnd and chksum are set in tcp_output */
seg->tcphdr->urgp = 0;
return seg;
}
@@ -1424,6 +1425,7 @@ tcp_rexmit(struct tcp_pcb *pcb)
}
#endif /* TCP_OVERSIZE */
ESP_STATS_TCP_PCB(pcb);
++pcb->nrtx;
/* Don't take any rtt measurements after retransmitting. */