aboutsummaryrefslogtreecommitdiffstats
path: root/stacks/lwip_stack/lwip_src/api
diff options
context:
space:
mode:
Diffstat (limited to 'stacks/lwip_stack/lwip_src/api')
-rw-r--r--stacks/lwip_stack/lwip_src/api/spl_api_msg.c11
-rw-r--r--stacks/lwip_stack/lwip_src/api/spl_tcpip.c6
2 files changed, 13 insertions, 4 deletions
diff --git a/stacks/lwip_stack/lwip_src/api/spl_api_msg.c b/stacks/lwip_stack/lwip_src/api/spl_api_msg.c
index 1c9bf92..f437bce 100644
--- a/stacks/lwip_stack/lwip_src/api/spl_api_msg.c
+++ b/stacks/lwip_stack/lwip_src/api/spl_api_msg.c
@@ -22,6 +22,7 @@
//#include "sockets.h"
#include <netinet/in.h>
#include <errno.h>
+#include <netinet/tcp.h>
#include "stackx_prot_com.h"
#include "spl_api.h"
@@ -1572,6 +1573,7 @@ spl_do_connected (void *arg, struct tcp_pcb *pcb, err_t err)
conn->state = SPL_NETCONN_NONE;
SPL_NETCONN_SET_SAFE_ERR (conn, ERR_OK);
+ update_tcp_state (pcb->callback_arg, ESTABLISHED);
SPL_API_EVENT (conn, SPL_NETCONN_EVT_SENDPLUS, 1);
if (was_blocking && m != NULL)
@@ -2523,7 +2525,12 @@ do_get_tcpproto_getsockopt_internal (struct common_pcb *cpcb,
NSPOL_LOGDBG (SOCKETS_DEBUG, "]fd=%d,SPL_TCP_KEEPCNT=%d",
cpcb->socket, *(int *) optval);
break;
-
+ case SPL_TCP_INFO:
+ ((struct tcp_info *) optval)->tcpi_total_retrans = (int) tpcb->nrtx;
+ ((struct tcp_info *) optval)->tcpi_snd_mss = (int) tpcb->mss;
+ ((struct tcp_info *) optval)->tcpi_rtt = (int) tpcb->sa;
+ ((struct tcp_info *) optval)->tcpi_snd_cwnd = (int) tpcb->cwnd;
+ break;
default:
NSPOL_LOGDBG (SOCKETS_DEBUG, "unsupported]optname=%d", optname);
SET_MSG_ERR (m, EOPNOTSUPP);
@@ -3316,5 +3323,7 @@ alloc_common_pcb (enum spl_netconn_type type)
common_pcb_init (cpcb);
cpcb->type = type;
+
+ res_alloc (&cpcb->res_chk);
return cpcb;
}
diff --git a/stacks/lwip_stack/lwip_src/api/spl_tcpip.c b/stacks/lwip_stack/lwip_src/api/spl_tcpip.c
index b627bcf..b0b588a 100644
--- a/stacks/lwip_stack/lwip_src/api/spl_tcpip.c
+++ b/stacks/lwip_stack/lwip_src/api/spl_tcpip.c
@@ -61,7 +61,7 @@
#include "sys.h"
-#define NSTACK_MAIN_MAX_PARA 19
+#define NSTACK_MAIN_MAX_PARA 32
#define NSTACK_MAIN_MIN_PARA 1
#define DPDK_DEFAULT_EAL_MEM_SIZE (1024)
@@ -951,7 +951,7 @@ spl_tcpip_thread (void *arg)
u16 task_loop;
u16 num_recv_task = 0, num_send_timer_task = 0;
u16 index_task = 0;
- int tcpip_thread_sleep_interval = g_tcpip_thread_sleep_time * 1000;
+ //int tcpip_thread_sleep_interval = g_tcpip_thread_sleep_time * 1000;
void *task_queue[TASK_BURST];
data_com_msg *msg;
@@ -981,7 +981,7 @@ spl_tcpip_thread (void *arg)
if (run_count++ > 20)
{
- sys_sleep_ns (0, tcpip_thread_sleep_interval);
+ //sys_sleep_ns (0, tcpip_thread_sleep_interval);
}
continue;
}