Commit 059454c4 authored by Micha Mueller's avatar Micha Mueller
Browse files

Add printConfig to OPA plugin

parent eacb14fa
......@@ -65,6 +65,94 @@ public:
void setCounterData(int counterData) { _counterData = counterData; }
void printConfig(LOG_LEVEL ll, LOGGER& lg) {
std::string cntData("unknown");
switch (_counterData) {
case portXmitData:
cntData = "portXmitData";
break;
case portRcvData:
cntData = "portRcvData";
break;
case portXmitPkts:
cntData = "portXmitPkts";
break;
case portRcvPkts:
cntData = "portRcvPkts";
break;
case portMulticastXmitPkts:
cntData = "portMulticastXmitPkts";
break;
case portMulticastRcvPkts:
cntData = "portMulticastRcvPkts";
break;
case localLinkIntegrityErrors:
cntData = "localLinkIntegrityErrors";
break;
case fmConfigErrors:
cntData = "fmConfigErrors";
break;
case portRcvErrors:
cntData = "portRcvErrors";
break;
case excessiveBufferOverruns:
cntData = "excessiveBufferOverruns";
break;
case portRcvConstraintErrors:
cntData = "portRcvConstraintErrors";
break;
case portRcvSwitchRelayErrors:
cntData = "portRcvSwitchRelayErrors";
break;
case portXmitDiscards:
cntData = "portXmitDiscards";
break;
case portXmitConstraintErrors:
cntData = "portXmitConstraintErrors";
break;
case portRcvRemotePhysicalErrors:
cntData = "portRcvRemotePhysicalErrors";
break;
case swPortCongestion:
cntData = "swPortCongestion";
break;
case portXmitWait:
cntData = "portXmitWait";
break;
case portRcvFECN:
cntData = "portRcvFECN";
break;
case portRcvBECN:
cntData = "portRcvBECN";
break;
case portXmitTimeCong:
cntData = "portXmitTimeCong";
break;
case portXmitWastedBW:
cntData = "portXmitWastedBW";
break;
case portXmitWaitData:
cntData = "portXmitWaitData";
break;
case portRcvBubble:
cntData = "portRcvBubble";
break;
case portMarkFECN:
cntData = "portMarkFECN";
break;
case linkErrorRecovery:
cntData = "linkErrorRecovery";
break;
case linkDowned:
cntData = "linkDowned";
break;
case uncorrectableErrors:
cntData = "uncorrectableErrors";
break;
}
LOG_VAR(ll) << " Counter data: " << cntData;
}
protected:
PORT_COUNTER_DATA _counterData;
......
......@@ -197,3 +197,8 @@ void OpaSensorGroup::readAsync() {
}
_pendingTasks--;
}
void OpaSensorGroup::printConfig(LOG_LEVEL ll) {
LOG_VAR(ll) << " HFI Num: " << _hfiNum;
LOG_VAR(ll) << " Port Num: " << _portNum;
}
......@@ -31,6 +31,8 @@ public:
void setHfiNum(const std::string& hfiNum) { _hfiNum = stoi(hfiNum); }
void setPortNum(const std::string& portNum) { _portNum = stoull(portNum); }
void printConfig(LOG_LEVEL ll) override;
private:
void read() override;
void readAsync() override;
......
Supports Markdown
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