Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
tcp: prevent timer handler being called frequently
[vpp.git]
/
src
/
vnet
/
tcp
/
tcp.h
diff --git
a/src/vnet/tcp/tcp.h
b/src/vnet/tcp/tcp.h
index
91783a6
..
1e6cf8a
100644
(file)
--- a/
src/vnet/tcp/tcp.h
+++ b/
src/vnet/tcp/tcp.h
@@
-91,15
+91,15
@@
typedef struct tcp_worker_ctx_
/** convenience pointer to this thread's vlib main */
vlib_main_t *vm;
/** convenience pointer to this thread's vlib main */
vlib_main_t *vm;
- /** worker time */
- u32 time_now;
+ /** Time used for high precision (us) measurements in seconds */
+ f64 time_us;
+
+ /** Time measured in @ref TCP_TSTAMP_TICK used for time stamps */
+ u32 time_tstamp;
/* Max timers to be handled per dispatch loop */
u32 max_timers_per_loop;
/* Max timers to be handled per dispatch loop */
u32 max_timers_per_loop;
- /** Session layer edge indices to tcp output */
- u32 tco_next_node[2];
-
/* Fifo of pending timer expirations */
u32 *pending_timers;
/* Fifo of pending timer expirations */
u32 *pending_timers;
@@
-114,6
+114,9
@@
typedef struct tcp_worker_ctx_
/* fifo of pending free requests */
tcp_cleanup_req_t *pending_cleanups;
/* fifo of pending free requests */
tcp_cleanup_req_t *pending_cleanups;
+ /** Session layer edge indices to tcp output */
+ u32 tco_next_node[2];
+
/** worker timer wheel */
tcp_timer_wheel_t timer_wheel;
/** worker timer wheel */
tcp_timer_wheel_t timer_wheel;
@@
-163,26
+166,26
@@
typedef struct tcp_configuration_
* a zero rwnd advertisement */
u32 rwnd_min_update_ack;
* a zero rwnd advertisement */
u32 rwnd_min_update_ack;
- /** Delayed ack time (disabled) */
- u16 delack_time;
-
/** Timer ticks to wait for close from app */
/** Timer ticks to wait for close from app */
- u
16
closewait_time;
+ u
32
closewait_time;
/** Timer ticks to wait in time-wait. Also known as 2MSL */
/** Timer ticks to wait in time-wait. Also known as 2MSL */
- u
16
timewait_time;
+ u
32
timewait_time;
/** Timer ticks to wait in fin-wait1 to send fin and rcv fin-ack */
/** Timer ticks to wait in fin-wait1 to send fin and rcv fin-ack */
- u
16
finwait1_time;
+ u
32
finwait1_time;
/** Timer ticks to wait in last ack for ack */
/** Timer ticks to wait in last ack for ack */
- u
16
lastack_time;
+ u
32
lastack_time;
/** Timer ticks to wait in fin-wait2 for fin */
/** Timer ticks to wait in fin-wait2 for fin */
- u
16
finwait2_time;
+ u
32
finwait2_time;
/** Timer ticks to wait in closing for fin ack */
/** Timer ticks to wait in closing for fin ack */
- u16 closing_time;
+ u32 closing_time;
+
+ /** Timer ticks to wait for free buffer */
+ u32 alloc_err_timeout;
/** Time to wait (sec) before cleaning up the connection */
f32 cleanup_time;
/** Time to wait (sec) before cleaning up the connection */
f32 cleanup_time;
@@
-193,6
+196,9
@@
typedef struct tcp_configuration_
/** Number of preallocated half-open connections */
u32 preallocated_half_open_connections;
/** Number of preallocated half-open connections */
u32 preallocated_half_open_connections;
+ /** Maxium allowed GSO packet size */
+ u32 max_gso_size;
+
/** Vectors of src addresses. Optional unless one needs > 63K active-opens */
ip4_address_t *ip4_src_addrs;
ip6_address_t *ip6_src_addrs;
/** Vectors of src addresses. Optional unless one needs > 63K active-opens */
ip4_address_t *ip4_src_addrs;
ip6_address_t *ip6_src_addrs;
@@
-209,8
+215,6
@@
typedef struct _tcp_main
/* Pool of listeners. */
tcp_connection_t *listener_pool;
/* Pool of listeners. */
tcp_connection_t *listener_pool;
- f64 tstamp_ticks_per_clock;
-
/** vlib buffer size */
u32 bytes_per_buffer;
/** vlib buffer size */
u32 bytes_per_buffer;
@@
-220,8
+224,6
@@
typedef struct _tcp_main
/** Dispatch table by state and flags */
tcp_lookup_dispatch_t dispatch_table[TCP_N_STATES][64];
/** Dispatch table by state and flags */
tcp_lookup_dispatch_t dispatch_table[TCP_N_STATES][64];
- clib_spinlock_t half_open_lock;
-
/** Pool of half-open connections on which we've sent a SYN */
tcp_connection_t *half_open_connections;
/** Pool of half-open connections on which we've sent a SYN */
tcp_connection_t *half_open_connections;
@@
-287,15
+289,6
@@
tcp_get_worker (u32 thread_index)
return &tcp_main.wrk_ctx[thread_index];
}
return &tcp_main.wrk_ctx[thread_index];
}
-#if (VLIB_BUFFER_TRACE_TRAJECTORY)
-#define tcp_trajectory_add_start(b, start) \
-{ \
- (*vlib_buffer_trace_trajectory_cb) (b, start); \
-}
-#else
-#define tcp_trajectory_add_start(b, start)
-#endif
-
tcp_connection_t *tcp_connection_alloc (u8 thread_index);
tcp_connection_t *tcp_connection_alloc_w_base (u8 thread_index,
tcp_connection_t * base);
tcp_connection_t *tcp_connection_alloc (u8 thread_index);
tcp_connection_t *tcp_connection_alloc_w_base (u8 thread_index,
tcp_connection_t * base);
@@
-335,6
+328,7
@@
void tcp_connection_tx_pacer_update (tcp_connection_t * tc);
void tcp_connection_tx_pacer_reset (tcp_connection_t * tc, u32 window,
u32 start_bucket);
void tcp_program_cleanup (tcp_worker_ctx_t * wrk, tcp_connection_t * tc);
void tcp_connection_tx_pacer_reset (tcp_connection_t * tc, u32 window,
u32 start_bucket);
void tcp_program_cleanup (tcp_worker_ctx_t * wrk, tcp_connection_t * tc);
+void tcp_check_gso (tcp_connection_t *tc);
void tcp_punt_unknown (vlib_main_t * vm, u8 is_ip4, u8 is_add);
int tcp_configure_v4_source_address_range (vlib_main_t * vm,
void tcp_punt_unknown (vlib_main_t * vm, u8 is_ip4, u8 is_add);
int tcp_configure_v4_source_address_range (vlib_main_t * vm,