mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-08-02 07:02:49 +02:00
more consistent naming and formatting
This commit is contained in:
parent
8285e0f45b
commit
25b2814916
2 changed files with 9 additions and 11 deletions
|
@ -278,9 +278,7 @@ void Switch::onLocalEthernet(void* tPtr, const SharedPtr<Network>& network, cons
|
|||
}
|
||||
|
||||
// VL2 fragmentation metric: oversized frame from TAP device (TX)
|
||||
unsigned int tap_mtu = network->config().mtu;
|
||||
bool was_fragmented_at_vl2 = (len > tap_mtu);
|
||||
if (was_fragmented_at_vl2) {
|
||||
if (len > network->config().mtu) {
|
||||
Metrics::vl2_oversized_frame_tx++;
|
||||
// Just measure, do not drop or return
|
||||
return;
|
||||
|
@ -1135,7 +1133,7 @@ bool Switch::_trySend(void* tPtr, Packet& packet, bool encrypt, int32_t flowId)
|
|||
return false;
|
||||
}
|
||||
|
||||
void Switch::_sendViaSpecificPath(void* tPtr, SharedPtr<Peer> peer, SharedPtr<Path> viaPath, uint16_t userSpecifiedMtu, int64_t now, Packet& packet, bool encrypt, int32_t flowId, bool was_fragmented_at_vl2)
|
||||
void Switch::_sendViaSpecificPath(void* tPtr, SharedPtr<Peer> peer, SharedPtr<Path> viaPath, uint16_t userSpecifiedMtu, int64_t now, Packet& packet, bool encrypt, int32_t flowId, bool fragmentedAtVl2)
|
||||
{
|
||||
unsigned int mtu = ZT_DEFAULT_PHYSMTU;
|
||||
uint64_t trustedPathId = 0;
|
||||
|
@ -1163,7 +1161,7 @@ void Switch::_sendViaSpecificPath(void* tPtr, SharedPtr<Peer> peer, SharedPtr<Pa
|
|||
if (chunkSize < packet.size()) {
|
||||
// Too big for one packet, fragment the rest
|
||||
Metrics::vl1_fragments_per_packet_hist.Observe(2);
|
||||
if (was_fragmented_at_vl2) {
|
||||
if (fragmentedAtVl2) {
|
||||
Metrics::vl1_vl2_double_fragmentation_tx++;
|
||||
}
|
||||
|
||||
|
|
|
@ -206,7 +206,7 @@ class Switch {
|
|||
private:
|
||||
bool _shouldUnite(const int64_t now, const Address& source, const Address& destination);
|
||||
bool _trySend(void* tPtr, Packet& packet, bool encrypt, int32_t flowId = ZT_QOS_NO_FLOW); // packet is modified if return is true
|
||||
void _sendViaSpecificPath(void* tPtr, SharedPtr<Peer> peer, SharedPtr<Path> viaPath, uint16_t userSpecifiedMtu, int64_t now, Packet& packet, bool encrypt, int32_t flowId, bool was_fragmented_at_vl2);
|
||||
void _sendViaSpecificPath(void* tPtr, SharedPtr<Peer> peer, SharedPtr<Path> viaPath, uint16_t userSpecifiedMtu, int64_t now, Packet& packet, bool encrypt, int32_t flowId, bool fragmentedAtVl2);
|
||||
void _recordOutgoingPacketMetrics(const Packet& p);
|
||||
|
||||
const RuntimeEnvironment* const RR;
|
||||
|
|
Loading…
Add table
Reference in a new issue