#define TCP_FIB_RECHECK_PERIOD 1 * THZ /**< Recheck every 1s */
#define TCP_MAX_OPTION_SPACE 40
#define TCP_CC_DATA_SZ 24
-#define TCP_MAX_GSO_SZ 65536
#define TCP_RXT_MAX_BURST 10
#define TCP_DUPACK_THRESHOLD 3
foreach_tcp_timer
#undef _
TCP_N_TIMERS
-} tcp_timers_e;
+} __clib_packed tcp_timers_e;
#define TCP_TIMER_HANDLE_INVALID ((u32) ~0)
-#define TCP_TIMER_TICK 0.1 /**< Timer tick in seconds */
-#define TCP_TO_TIMER_TICK TCP_TICK*10 /**< Factor for converting
+#define TCP_TIMER_TICK 0.0001 /**< Timer tick in seconds */
+#define TCP_TO_TIMER_TICK TCP_TICK*10000 /**< Factor for converting
ticks to timer ticks */
#define TCP_RTO_MAX 60 * THZ /* Min max RTO (60s) as per RFC6298 */
u32 start;
u32 end;
u32 ack;
- u32 snd_una_max;
+ u32 snd_nxt;
u32 group;
} scoreboard_trace_elt_t;
/** Send sequence variables RFC793 */
u32 snd_una; /**< oldest unacknowledged sequence number */
- u32 snd_una_max; /**< newest unacknowledged sequence number + 1*/
u32 snd_wnd; /**< send window */
u32 snd_wl1; /**< seq number used for last snd.wnd update */
u32 snd_wl2; /**< ack number used for last snd.wnd update */
u32 rcv_wnd; /**< receive window we expect */
u32 rcv_las; /**< rcv_nxt at last ack sent/rcv_wnd update */
- u32 iss; /**< initial sent sequence */
- u32 irs; /**< initial remote sequence */
/* Options */
u8 snd_opts_len; /**< Tx options len */
+ u8 snd_sack_pos; /**< Position in vec of first block to send */
u8 rcv_wscale; /**< Window scale to advertise to peer */
u8 snd_wscale; /**< Window scale to use when sending */
u32 tsval_recent; /**< Last timestamp received */
u32 tsval_recent_age; /**< When last updated tstamp_recent*/
+ u32 timestamp_delta; /**< Offset for timestamp */
tcp_options_t snd_opts; /**< Tx options for connection */
tcp_options_t rcv_opts; /**< Rx options for connection */
sack_block_t *snd_sacks; /**< Vector of SACKs to send. XXX Fixed size? */
- u8 snd_sack_pos; /**< Position in vec of first block to send */
sack_block_t *snd_sacks_fl; /**< Vector for building new list */
sack_scoreboard_t sack_sb; /**< SACK "scoreboard" that tracks holes */
u32 rxt_delivered; /**< Rxt bytes delivered during current cc event */
u32 rxt_head; /**< snd_una last time we re rxted the head */
u32 tsecr_last_ack; /**< Timestamp echoed to us in last healthy ACK */
- u32 snd_congestion; /**< snd_una_max when congestion is detected */
+ u32 snd_congestion; /**< snd_nxt when congestion is detected */
u32 tx_fifo_size; /**< Tx fifo size. Used to constrain cwnd */
tcp_cc_algorithm_t *cc_algo; /**< Congestion control algorithm */
u8 cc_data[TCP_CC_DATA_SZ]; /**< Congestion control algo private data */
tcp_errors_t errors; /**< Soft connection errors */
+ u32 iss; /**< initial sent sequence */
+ u32 irs; /**< initial remote sequence */
f64 start_ts; /**< Timestamp when connection initialized */
u32 last_fib_check; /**< Last time we checked fib route for peer */
u16 mss; /**< Our max seg size that includes options */
- u32 timestamp_delta; /**< Offset for timestamp */
u32 ipv6_flow_label; /**< flow label for ipv6 header */
#define rst_state snd_wl1
} tcp_connection_t;
-/* *INDENT-OFF* */
struct _tcp_cc_algorithm
{
const char *name;
void (*event) (tcp_connection_t *tc, tcp_cc_event_t evt);
u64 (*get_pacing_rate) (tcp_connection_t *tc);
};
-/* *INDENT-ON* */
#define tcp_fastrecovery_on(tc) (tc)->flags |= TCP_CONN_FAST_RECOVERY
#define tcp_fastrecovery_off(tc) (tc)->flags &= ~TCP_CONN_FAST_RECOVERY
#undef TW_START_STOP_TRACE_SIZE
#define TW_TIMER_WHEELS 2
-#define TW_SLOTS_PER_RING 512
-#define TW_RING_SHIFT 9
+#define TW_SLOTS_PER_RING 1024
+#define TW_RING_SHIFT 10
#define TW_RING_MASK (TW_SLOTS_PER_RING -1)
#define TW_TIMERS_PER_OBJECT 16
#define LOG2_TW_TIMERS_PER_OBJECT 4