mirror of
https://git.freebsd.org/src.git
synced 2026-01-16 23:02:24 +00:00
TCP Pacing system (HPTS) is missing an API
Recent changes to HPTS have broken an API that was somehow removed (used by user space programs for time calculations). This commit will add back the inline function that was removed. Differential Revision:<https://reviews.freebsd.org/D53225>
This commit is contained in:
parent
38829592dc
commit
8f2f66b323
1 changed files with 11 additions and 0 deletions
|
|
@ -32,6 +32,10 @@
|
|||
#define HPTS_MSEC_IN_SEC 1000
|
||||
#define HPTS_USEC_IN_MSEC 1000
|
||||
|
||||
/*
|
||||
* The following functions should also be available
|
||||
* to userspace as well.
|
||||
*/
|
||||
static inline uint32_t
|
||||
tcp_tv_to_usec(const struct timeval *sv)
|
||||
{
|
||||
|
|
@ -50,6 +54,13 @@ tcp_tv_to_lusec(const struct timeval *sv)
|
|||
return ((uint64_t)((sv->tv_sec * HPTS_USEC_IN_SEC) + sv->tv_usec));
|
||||
}
|
||||
|
||||
static inline uint64_t
|
||||
tcp_tv_to_lusectick(const struct timeval *sv)
|
||||
{
|
||||
return ((uint64_t)((sv->tv_sec * HPTS_USEC_IN_SEC) + sv->tv_usec));
|
||||
}
|
||||
|
||||
|
||||
struct hpts_diag {
|
||||
uint32_t p_hpts_active; /* bbr->flex7 x */
|
||||
uint32_t p_nxt_slot; /* bbr->flex1 x */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue