Commit adcfaf48 authored by Claes Sjofors's avatar Claes Sjofors

QCom monitor, segement order assert removed, ticks removed, max limit and...

QCom monitor, segement order assert removed, ticks removed, max limit and purge of export buffer, configurable ack delay, segment size, export buffer quota
parent fb2e7ec9
This diff is collapsed.
This diff is collapsed.
......@@ -12832,8 +12832,8 @@ int RTTSYS_QCOM_NODE( menu_ctx ctx,
menu_ptr->value_ptr = (char *) &np->link.pending_rack;
menu_ptr++;
/* rack_tmo */
menu_ptr->value_ptr = (char *) &np->link.rack_tmo;
/* ack delay */
menu_ptr->value_ptr = (char *) &np->ack_delay;
menu_ptr++;
/* bus */
......@@ -12864,6 +12864,10 @@ int RTTSYS_QCOM_NODE( menu_ctx ctx,
#endif
menu_ptr++;
/* seg_size */
menu_ptr->value_ptr = (char *) &np->seg_size;
menu_ptr++;
/* timer */
menu_ptr->value_ptr = (char *) &np->link.timer;
menu_ptr++;
......@@ -12876,6 +12880,22 @@ int RTTSYS_QCOM_NODE( menu_ctx ctx,
menu_ptr->value_ptr = (char *) &np->link.err_seq;
menu_ptr++;
/* err_seg_seq */
menu_ptr->value_ptr = (char *) &np->link.err_seg_seq;
menu_ptr++;
/* export_quota */
menu_ptr->value_ptr = (char *) &np->link.export_quota;
menu_ptr++;
/* export_alloc_cnt */
menu_ptr->value_ptr = (char *) &np->link.export_alloc_cnt;
menu_ptr++;
/* export_purge_cnt */
menu_ptr->value_ptr = (char *) &np->link.export_purge_cnt;
menu_ptr++;
/* node name */
menu_ptr->value_ptr = (char *) np->name;
menu_ptr++;
......
......@@ -726,6 +726,10 @@ qcom_Put (
bp = inPool(sts, pp->data);
if (bp == NULL) {
bp = qdb_Alloc(sts, qdb_eBuffer_base, pp->size);
if ( bp == NULL) {
*sts = QDB__QUOTAEXCEEDED;
break;
}
memcpy((char *)(bp + 1), pp->data, pp->size);
} else {
/* check that this buffer is really owned by this process */
......
......@@ -443,8 +443,8 @@ typedef struct {
qdb_mLink flags;
int win_count;
int win_max;
int rtt_rxmax;
int rtt_rxmin;
float rtt_rxmax;
float rtt_rxmin;
float rtt_rtt;
float rtt_srtt;
float rtt_var;
......@@ -453,12 +453,16 @@ typedef struct {
qdb_sAck rack;
int seq;
pwr_tBoolean pending_rack;
time_tClock rack_tmo;
pwr_tTime rack_tmo;
qcom_tBus bus;
struct sockaddr_in sa;
pwr_tDeltaTime timer;
int export_quota;
int export_alloc_cnt;
int export_purge_cnt;
int err_red;
int err_seq;
int err_seg_seq;
} qdb_sLink;
typedef char qdb_tQname[32];
......@@ -677,6 +681,9 @@ typedef struct {
qcom_eNodeConnection connection; /* Type of connection */
pwr_tUInt32 min_resend_time;
pwr_tUInt32 max_resend_time;
pwr_tUInt32 export_buf_quota;
pwr_tFloat32 ack_delay;
pwr_tUInt32 seg_size;
} qdb_sNode;
typedef struct {
......
......@@ -74,6 +74,9 @@ addNode (
np->connection = nep->connection;
np->min_resend_time = nep->min_resend_time;
np->max_resend_time = nep->max_resend_time;
np->export_buf_quota = nep->export_buf_quota;
np->ack_delay = nep->ack_delay;
np->seg_size = nep->seg_size;
return np;
}
......@@ -121,7 +124,7 @@ qini_ParseFile (
)
{
pwr_tStatus sts = 1;
int n;
int n, n2;
char *s;
char buffer[256];
int error = 0;
......@@ -129,9 +132,12 @@ qini_ParseFile (
char s_nid[80];
char s_naddr[80];
char s_port[80];
char s_connection[80];
char s_min_resend_time[80];
char s_max_resend_time[80];
char s_connection[10];
char s_min_resend_time[20];
char s_max_resend_time[20];
char s_export_buf_quota[20];
char s_ack_delay[20];
char s_seg_size[20];
pwr_tNodeId nid;
struct in_addr naddr;
qini_sNode *nep;
......@@ -144,8 +150,8 @@ qini_ParseFile (
continue;
}
n = sscanf(s, "%s %s %s %s %s %s %s", name, s_nid, s_naddr, s_port, s_connection,
s_min_resend_time, s_max_resend_time);
n = sscanf(s, "%s %s %s %s %s %s %s %s %s %s", name, s_nid, s_naddr, s_port, s_connection,
s_min_resend_time, s_max_resend_time, s_export_buf_quota, s_ack_delay, s_seg_size);
if (n < 3) {
errh_Error("error in line, <wrong number of arguments>, skip to next line.\n>> %s", s);
(*errors)++;
......@@ -215,6 +221,26 @@ qini_ParseFile (
if (n > 4) nep->connection = atoi(s_connection);
if (n > 5) nep->min_resend_time = atoi(s_min_resend_time);
if (n > 6) nep->max_resend_time = atoi(s_max_resend_time);
if (n > 7)
nep->export_buf_quota = atoi(s_export_buf_quota);
else
nep->export_buf_quota = 30000;
if (n > 8) {
n2 = sscanf( s_ack_delay, "%f", &nep->ack_delay);
if ( n2 != 1)
nep->ack_delay = 0.01;
}
else
nep->ack_delay = 0.01;
if (n > 9) {
nep->seg_size = atoi(s_seg_size);
if ( nep->seg_size == 0)
nep->seg_size = 8192;
}
else
nep->seg_size = 8192;
memset(&arpreq, 0, sizeof(arpreq));
memcpy(&arpreq.arp_pa.sa_data, &naddr, sizeof(naddr));
inet_GetArpEntry(&sts, 0, &arpreq);
......
......@@ -112,6 +112,9 @@ typedef struct {
unsigned int min_resend_time;
unsigned int max_resend_time;
pwr_tBoolean connect;
pwr_tUInt32 export_buf_quota;
pwr_tFloat32 ack_delay;
pwr_tUInt32 seg_size;
} qini_sNode;
int qini_ParseFile (FILE*, tree_sTable*, int*, int*, int*);
......
......@@ -125,6 +125,28 @@ SObject pwrb:Class
Attr TypeRef = "pwrs:Type-$Float32"
EndBody
EndObject
!/**
! QCom max export buffer quota.
!*/
Object QComExportBufQuota $Attribute 9
Body SysBody
Attr TypeRef = "pwrs:Type-$UInt32"
EndBody
EndObject
!/**
! QCom acknowledge delay time in seconds.
!*/
Object QComAckDelay $Attribute 15
Body SysBody
Attr TypeRef = "pwrs:Type-$Float32"
EndBody
EndObject
EndObject
Object Template FriendNodeConfig
Body RtBody
Attr QComExportBufQuota = 600000
Attr QComAckDelay = 0.002
EndBody
EndObject
EndObject
EndSObject
......@@ -197,6 +197,37 @@ SObject pwrb:Class
Attr TypeRef = "pwrs:Type-$Float32"
EndBody
EndObject
!/**
! QCom max export buffer quota.
!*/
Object QComExportBufQuota $Attribute 14
Body SysBody
Attr TypeRef = "pwrs:Type-$UInt32"
EndBody
EndObject
!/**
! QCom acknowledge delay time in seconds.
!*/
Object QComAckDelay $Attribute 15
Body SysBody
Attr TypeRef = "pwrs:Type-$Float32"
EndBody
EndObject
!/**
! QCom segment size.
!*/
Object QComSegmentSize $Attribute 16
Body SysBody
Attr TypeRef = "pwrs:Type-$UInt32"
EndBody
EndObject
EndObject
Object Template NodeConfig
Body RtBody
Attr QComExportBufQuota = 600000
Attr QComAckDelay = 0.002
Attr QComSegmentSize = 1500
EndBody
EndObject
Object PostCreate $DbCallBack
Body SysBody
......
......@@ -170,6 +170,37 @@ SObject pwrb:Class
Attr TypeRef = "pwrs:Type-$Float32"
EndBody
EndObject
!/**
! QCom max export buffer size.
!*/
Object QComExportBufQuota $Attribute 12
Body SysBody
Attr TypeRef = "pwrs:Type-$UInt32"
EndBody
EndObject
!/**
! QCom acknowledge delay time in seconds.
!*/
Object QComAckDelay $Attribute 13
Body SysBody
Attr TypeRef = "pwrs:Type-$Float32"
EndBody
EndObject
!/**
! QCom segment size.
!*/
Object QComSegmentSize $Attribute 14
Body SysBody
Attr TypeRef = "pwrs:Type-$UInt32"
EndBody
EndObject
EndObject
Object Template SevNodeConfig
Body RtBody
Attr QComExportBufQuota = 600000
Attr QComAckDelay = 0.002
Attr QComSegmentSize = 1500
EndBody
EndObject
Object PostCreate $DbCallBack
Body SysBody
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment