summaryrefslogtreecommitdiffstats
path: root/include/Settings.hpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:25:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:25:50 +0000
commit11ea4fcf515dbc4f75be538b784635085dc10db2 (patch)
treeaf05377dc5f1495935a0aa3b43258c20cb8fb5b9 /include/Settings.hpp
parentReleasing progress-linux version 2.1.9+dfsg-1~progress7.99u1. (diff)
downloadiperf-11ea4fcf515dbc4f75be538b784635085dc10db2.tar.xz
iperf-11ea4fcf515dbc4f75be538b784635085dc10db2.zip
Merging upstream version 2.2.0+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'include/Settings.hpp')
-rw-r--r--include/Settings.hpp65
1 files changed, 60 insertions, 5 deletions
diff --git a/include/Settings.hpp b/include/Settings.hpp
index 250d3a7..6d87012 100644
--- a/include/Settings.hpp
+++ b/include/Settings.hpp
@@ -77,7 +77,7 @@ extern "C" {
#define SMALLEST_INTERVAL_SEC 0.005 // 5ms
#else
#define SMALLEST_INTERVAL 100 // 100 usec
-#define SMALLEST_INTERVAL_SEC 0.0001 // 5ms
+#define SMALLEST_INTERVAL_SEC 0.0001
#endif
#define SLOPSECS 2
@@ -94,14 +94,14 @@ extern "C" {
#define CSVPEERLIMIT ((REPORT_ADDRLEN * 2) + 40)
#define NEARCONGEST_DEFAULT 0.5
#define DEFAULT_PERMITKEY_LIFE 20.0 // units is seconds
-#define TESTEXCHANGETIMEOUT (4 * 1000000) // 4 secs, units is microseconds
+#define DEFAULT_TESTEXCHANGETIMEOUT (60 * 1000000) // 60 secs, units is microseconds
#ifndef MAXTTL
#define MAXTTL 255
#endif
#define DEFAULT_BOUNCEBACK_BYTES 100
#define SMALL_WRITE_PREFETCH (1024 * 16)
-#define SHALLOW_COPY 1
+#define SHALLOW_COPY 1 // This is likley a bug, using a deep copy is safer but overkill
#define DEEP_COPY 1
// server/client mode
enum ThreadMode {
@@ -178,11 +178,12 @@ struct thread_Settings {
struct thread_Settings *runNow;
struct thread_Settings *runNext;
// int's
+ int sosndtimer;
int mThreads; // -P
int mTOS; // -S
int mRTOS; // reflected TOS
int mTransferID;
- int mConnectRetries;
+ int mPeerTransferID;
#if WIN32
SOCKET mSock;
#else
@@ -246,12 +247,16 @@ struct thread_Settings {
Socklen_t size_peer;
iperf_sockaddr local;
Socklen_t size_local;
+ iperf_sockaddr multicast_group;
+ Socklen_t size_multicast_group;
+ iperf_sockaddr multicast_group_source;
nthread_t mTID;
int incrdstip;
int incrsrcip;
int incrsrcport;
int connectonly_count;
char* mCongestion;
+ char* mLoadCCA;
int mHistBins;
int mHistBinsize;
int mHistUnits;
@@ -270,6 +275,11 @@ struct thread_Settings {
int recvflags; // used to set recv flags,e.g. MSG_TRUNC with L
double mVariance; //vbr variance
uintmax_t mFQPacingRate;
+#if (HAVE_DECL_SO_MAX_PACING_RATE)
+ int mFQPacingRateStep;
+ uintmax_t mFQPacingRateCurrent;
+ double mFQPacingRateStepInterval;
+#endif
struct timeval txholdback_timer;
struct timeval txstart_epoch;
struct timeval accept_time;
@@ -280,7 +290,7 @@ struct thread_Settings {
int numreportstructs;
int32_t peer_version_u;
int32_t peer_version_l;
- double connecttime;
+ long barrier_time; // wait in units of microseconds
double rtt_nearcongest_weight_factor;
char mPermitKey[MAX_PERMITKEY_LEN + 1]; //add some space for timestamp
struct timeval mPermitKeyTime;
@@ -289,6 +299,7 @@ struct thread_Settings {
int tuntapdev;
int firstreadbytes;
int mBounceBackBytes;
+ int mBounceBackReplyBytes;
int mBounceBackBurst;
int mWorkingLoadThreads; // number of congest threads
uint32_t mBounceBackHold; // units of usecs
@@ -300,6 +311,15 @@ struct thread_Settings {
int mWritePrefetch;
#endif
int jitter_binwidth;
+#if HAVE_DECL_TCP_TX_DELAY
+ float mTcpTxDelayMean;
+ float mTcpTxDelayProb;
+#endif
+ bool mOmit;
+ int sendfirst_pacing;
+ double connecttime;
+ double connect_retry_time; // units in seconds
+ unsigned int connect_retry_timer; // units in usecs
};
/*
@@ -398,6 +418,14 @@ struct thread_Settings {
#define FLAG_DOMAINV4 0x00008000
#define FLAG_JITTER_HISTOGRAM 0x00010000
#define FLAG_UTC 0x00020000
+#define FLAG_LOAD_CCA 0x00040000
+#define FLAG_BURSTSIZE 0x00080000
+#define FLAG_TCPTXDELAY 0x00100000
+#define FLAG_FQPACINGSTEP 0x00200000
+#define FLAG_FQPACINGSTEPINTERVAL 0x00400000
+#define FLAG_SYNCTRANSFERID 0x00800000
+#define FLAG_IGNORESHUTDOWN 0x01000000
+#define FLAG_SETTOS 0x02000000
#define isBuflenSet(settings) ((settings->flags & FLAG_BUFLENSET) != 0)
#define isCompat(settings) ((settings->flags & FLAG_COMPAT) != 0)
@@ -476,6 +504,14 @@ struct thread_Settings {
#define isWorkingLoadDown(settings) ((settings->flags_extend2 & FLAG_WORKING_LOAD_DOWN) != 0)
#define isJitterHistogram(settings) ((settings->flags_extend2 & FLAG_JITTER_HISTOGRAM) != 0)
#define isUTC(settings) ((settings->flags_extend2 & FLAG_UTC) != 0)
+#define isLoadCCA(settings) ((settings->flags_extend2 & FLAG_LOAD_CCA) != 0)
+#define isBurstSize(settings) ((settings->flags_extend2 & FLAG_BURSTSIZE) != 0)
+#define isTcpTxDelay(settings) ((settings->flags_extend2 & FLAG_TCPTXDELAY) != 0)
+#define isFQPacingStep(settings) ((settings->flags_extend2 & FLAG_FQPACINGSTEP) != 0)
+#define isFQPacingStepInterval(settings) ((settings->flags_extend2 & FLAG_FQPACINGSTEPINTERVAL) != 0)
+#define isSyncTransferID(settings) ((settings->flags_extend2 & FLAG_SYNCTRANSFERID) != 0)
+#define isIgnoreShutdown(settings) ((settings->flags_extend2 & FLAG_IGNORESHUTDOWN) != 0)
+#define isSetTOS(settings) ((settings->flags_extend2 & FLAG_SETTOS) != 0)
#define setBuflenSet(settings) settings->flags |= FLAG_BUFLENSET
#define setCompat(settings) settings->flags |= FLAG_COMPAT
@@ -551,6 +587,14 @@ struct thread_Settings {
#define setWorkingLoadDown(settings) settings->flags_extend2 |= FLAG_WORKING_LOAD_DOWN
#define setJitterHistogram(settings) settings->flags_extend2 |= FLAG_JITTER_HISTOGRAM
#define setUTC(settings) settings->flags_extend2 |= FLAG_UTC
+#define setLoadCCA(settings) settings->flags_extend2 |= FLAG_LOAD_CCA
+#define setBurstSize(settings) settings->flags_extend2 |= FLAG_BURSTSIZE
+#define setTcpTxDelay(settings) settings->flags_extend2 |= FLAG_TCPTXDELAY
+#define setFQPacingStep(settings) settings->flags_extend2 |= FLAG_FQPACINGSTEP
+#define setFQPacingStepInterval(settings) settings->flags_extend2 |= FLAG_FQPACINGSTEPINTERVAL
+#define setSyncTransferID(settings) settings->flags_extend2 |= FLAG_SYNCTRANSFERID
+#define setIgnoreShutdown(settings) settings->flags_extend2 |= FLAG_IGNORESHUTDOWN
+#define setSetTOS(settings) settings->flags_extend2 |= FLAG_SETTOS
#define unsetBuflenSet(settings) settings->flags &= ~FLAG_BUFLENSET
#define unsetCompat(settings) settings->flags &= ~FLAG_COMPAT
@@ -625,6 +669,14 @@ struct thread_Settings {
#define unsetWorkingLoadDown(settings) settings->flags_extend2 &= ~FLAG_WORKING_LOAD_DOWN
#define unsetJitterHistogram(settings) settings->flags_extend2 &= ~FLAG_JITTER_HISTOGRAM
#define unsetUTC(settings) settings->flags_extend2 &= ~FLAG_UTC
+#define unsetLoadCCA(settings) settings->flags_extend2 &= ~FLAG_LOAD_CCA
+#define unsetBurstSize(settings) settings->flags_extend2 &= ~FLAG_BURSTSIZE
+#define unsetTcpTxDelay(settings) settings->flags_extend2 &= ~FLAG_TCPTXDELAY
+#define unsetFQPacingStep(settings) settings->flags_extend2 &= ~FLAG_FQPACINGSTEP
+#define unsetFQPacingStepInterval(settings) settings->flags_extend2 &= ~FLAG_FQPACINGSTEPINTERVAL
+#define unsetSyncTransferID(settings) settings->flags_extend2 &= ~FLAG_SYNCTRANSFERID
+#define unsetIgnoreShutdown(settings) settings->flags_extend2 &= ~FLAG_IGNORESHUTDOWN
+#define unsetSetTOS(settings) settings->flags_extend2 &= ~FLAG_SETTOS
// set to defaults
void Settings_Initialize(struct thread_Settings* main);
@@ -632,6 +684,9 @@ void Settings_Initialize(struct thread_Settings* main);
// copy structure
void Settings_Copy(struct thread_Settings* from, struct thread_Settings** into, int copyall);
+// grow mBuf
+void Settings_Grow_mBuf(struct thread_Settings *mSettings, int newsize);
+
// free associated memory
void Settings_Destroy(struct thread_Settings *mSettings);