User-configurable physical MTU for individual links
This patch allows users to specify the physical layer MTU for individual links when in multipath mode. For example: { "settings": { "defaultBondingPolicy": "custom-balance-xor", "policies": { "custom-balance-xor": { "basePolicy": "balance-xor", "failoverInterval": 5000, "links": { "weird_5g_link": { "mtu": 1300 }, "enp5s0": { "mtu": 1400 } } } } } }
This commit is contained in:
parent
eccc31a4b9
commit
39f3f5b2d9
6 changed files with 36 additions and 7 deletions
|
@ -92,6 +92,7 @@ public:
|
|||
_valid(true),
|
||||
_eligible(false),
|
||||
_bonded(false),
|
||||
_mtu(0),
|
||||
_givenLinkSpeed(0),
|
||||
_relativeQuality(0),
|
||||
_latency(0xffff),
|
||||
|
@ -112,6 +113,7 @@ public:
|
|||
_valid(true),
|
||||
_eligible(false),
|
||||
_bonded(false),
|
||||
_mtu(0),
|
||||
_givenLinkSpeed(0),
|
||||
_relativeQuality(0),
|
||||
_latency(0xffff),
|
||||
|
@ -334,6 +336,11 @@ public:
|
|||
*/
|
||||
inline unsigned int bonded() const { return _bonded; }
|
||||
|
||||
/**
|
||||
* @return Whether the user-specified MTU for this path (determined by MTU for parent link)
|
||||
*/
|
||||
inline unsigned int mtu() const { return _mtu; }
|
||||
|
||||
/**
|
||||
* @return Given link capacity as reported by the bonding layer
|
||||
*/
|
||||
|
@ -370,6 +377,7 @@ private:
|
|||
volatile bool _valid;
|
||||
volatile bool _eligible;
|
||||
volatile bool _bonded;
|
||||
volatile uint16_t _mtu;
|
||||
volatile uint32_t _givenLinkSpeed;
|
||||
volatile float _relativeQuality;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue