NORM_SYNC_ALL policy improvement
parent
c29ef4adbd
commit
46a030891d
|
|
@ -0,0 +1,30 @@
|
|||
#include "grttProbe.h"
|
||||
|
||||
// This code is _not_ part of the NORM protocol library. This
|
||||
// is an independent class that can be used as an alternative
|
||||
// to conduct the sort of GRTT probing that is conducted as part
|
||||
// of NORM protocol operation. This can be used in conjunction
|
||||
// with NORM by disabling NORM's built-in GRTT probing and using
|
||||
// the information collected from this independent probing to
|
||||
// dynamically and explicitly set the NORM sender GRTT estimate.
|
||||
|
||||
|
||||
using namespace GrttProbe
|
||||
{
|
||||
// return length in 32-bit words (i.e. 1 word == 4 bytes)
|
||||
unsigned int GetIdWords(IdType idType)
|
||||
{
|
||||
switch (idType)
|
||||
{
|
||||
case ID_INT32:
|
||||
case ID_IPV4:
|
||||
return 1;
|
||||
case ID_IPV6:
|
||||
return 4;
|
||||
case ID_ETH:
|
||||
return 2; // includes padding
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
} // end GrttProbe::Message::GetIdWords()
|
||||
}; // end namespace GrttProbe
|
||||
|
|
@ -813,7 +813,7 @@ void NormSenderNode::HandleCommand(const struct timeval& currentTime,
|
|||
}
|
||||
if (!synchronized)
|
||||
{
|
||||
if (doAck)
|
||||
if ((doAck) || (SYNC_ALL == sync_policy))
|
||||
{
|
||||
// Force sync since we're expected to ACK
|
||||
// and request repair for object indicated
|
||||
|
|
@ -2012,7 +2012,7 @@ void NormSenderNode::Sync(NormObjectId objectId)
|
|||
max_pending_object = objectId;
|
||||
break;
|
||||
}
|
||||
SetPending(objectId); // inclusively sets pending mask for next_id..objectId
|
||||
SetPending(objectId); // inclusively sets pending mask for next_id..objectId
|
||||
}
|
||||
} // end NormSenderNode::Sync()
|
||||
|
||||
|
|
|
|||
|
|
@ -2397,10 +2397,10 @@ void NormSession::RxSocketRecvHandler(ProtoSocket &theSocket,
|
|||
HandleReceiveMessage(msg, wasUnicast, ecnStatus);
|
||||
msgLength = NormMsg::MAX_SIZE;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
PLOG(PL_ERROR, "NormSession::RxSocketRecvHandler() warning: received bad message\n");
|
||||
}
|
||||
} // end if/else msg.InitFromBuffer()
|
||||
// If our system gets very busy reading sockets, we should occasionally
|
||||
// execute any timeouts to keep protocol operation smooth (i.e., sending feedback)
|
||||
// TBD - perhaps this should be time based
|
||||
|
|
|
|||
|
|
@ -503,7 +503,7 @@ def get_libnorm():
|
|||
# Experimental functions
|
||||
libnorm.NormCountCompletedObjects.restype = ctypes.c_uint32
|
||||
libnorm.NormCountCompletedObjects.argtypes = [ctypes.c_void_p]
|
||||
|
||||
|
||||
return libnorm
|
||||
|
||||
# Global libnorm reference that everyone should use
|
||||
|
|
|
|||
Loading…
Reference in New Issue