FD.io VPP  v20.09-64-g4f7b92f0a
Vector Packet Processing
tcp_bt.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020 Cisco and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 /*
17  * Rate estimation
18  */
19 
20 #ifndef SRC_VNET_TCP_TCP_BT_H_
21 #define SRC_VNET_TCP_TCP_BT_H_
22 
23 #include <vnet/tcp/tcp_types.h>
24 
25 /**
26  * Byte tracker initialize
27  *
28  * @param tc connection for which the byte tracker should be allocated and
29  * initialized
30  */
31 void tcp_bt_init (tcp_connection_t * tc);
32 /**
33  * Byte tracker cleanup
34  *
35  * @param tc connection for which the byte tracker should be cleaned up
36  */
38 /**
39  * Flush byte tracker samples
40  *
41  * @param tc tcp connection for which samples should be flushed
42  */
44 /**
45  * Track a tcp tx burst
46  *
47  * @param tc tcp connection
48  */
50 /**
51  * Track a tcp retransmission
52  *
53  * @param tc tcp connection
54  * @param start start sequence number
55  * @param end end sequence number
56  */
57 void tcp_bt_track_rxt (tcp_connection_t * tc, u32 start, u32 end);
58 /**
59  * Generate a delivery rate sample from recently acked bytes
60  *
61  * @param tc tcp connection
62  * @param rs resulting rate sample
63  */
65  tcp_rate_sample_t * rs);
66 /**
67  * Check if sample to be generated is app limited
68  *
69  * @param tc tcp connection
70  */
72 /**
73  * Check if the byte tracker is in sane state
74  *
75  * Should be used only for testing
76  *
77  * @param bt byte tracker
78  */
80 
82 
83 #endif /* SRC_VNET_TCP_TCP_BT_H_ */
84 
85 /*
86  * fd.io coding-style-patch-verification: ON
87  *
88  * Local Variables:
89  * eval: (c-set-style "gnu")
90  * End:
91  */
void tcp_bt_flush_samples(tcp_connection_t *tc)
Flush byte tracker samples.
Definition: tcp_bt.c:627
int tcp_bt_is_sane(tcp_byte_tracker_t *bt)
Check if the byte tracker is in sane state.
Definition: tcp_bt.c:215
struct _tcp_connection tcp_connection_t
void tcp_bt_check_app_limited(tcp_connection_t *tc)
Check if sample to be generated is app limited.
Definition: tcp_bt.c:286
u8 *() format_function_t(u8 *s, va_list *args)
Definition: format.h:48
void tcp_bt_cleanup(tcp_connection_t *tc)
Byte tracker cleanup.
Definition: tcp_bt.c:652
unsigned int u32
Definition: types.h:88
u8 len
Definition: ip_types.api:92
void tcp_bt_track_rxt(tcp_connection_t *tc, u32 start, u32 end)
Track a tcp retransmission.
Definition: tcp_bt.c:337
format_function_t format_tcp_bt
Definition: tcp_bt.h:81
f64 end
end of the time range
Definition: mactime.api:44
void tcp_bt_sample_delivery_rate(tcp_connection_t *tc, tcp_rate_sample_t *rs)
Generate a delivery rate sample from recently acked bytes.
Definition: tcp_bt.c:592
void tcp_bt_track_tx(tcp_connection_t *tc, u32 len)
Track a tcp tx burst.
Definition: tcp_bt.c:301
void tcp_bt_init(tcp_connection_t *tc)
Byte tracker initialize.
Definition: tcp_bt.c:663