-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpowertcp_defs.h
More file actions
27 lines (24 loc) · 928 Bytes
/
powertcp_defs.h
File metadata and controls
27 lines (24 loc) · 928 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* SPDX-License-Identifier: GPL-2.0 OR MIT */
/*
* Constants and default values common to both PowerTCP implementations.
*/
#ifndef POWERTCP_DEFS_H
#define POWERTCP_DEFS_H
static const unsigned long cwnd_scale = (1UL << 10);
static const unsigned long fallback_host_bw = 1000; /* Mbit/s */
static const unsigned long gamma_scale = (1UL << 10);
static const unsigned long power_scale = (1UL << 16);
static const unsigned long p_norm_cutoff = 0.01 * power_scale;
/* Avoid an "initializer element is not constant" error with gcc before 8.1 by
* using an enum instead of static const variables. No, I don't want to use
* macros for constants here :-)
*/
enum {
default_base_rtt = -1, /* us */
default_beta = -1, /* Number of packets */
default_expected_flows = 10,
default_gamma = 921, /* ~= 0.9 * gamma_scale */
default_hop_bw = 1000, /* Mbit/s */
default_host_bw = 1000, /* Mbit/s */
};
#endif /* POWERTCP_DEFS_H */