00001 /* ex: set tabstop=4 expandtab: */ 00002 /* */ 00003 /* (c) 2004-2006 Iowa State University */ 00004 /* see the LICENSE file in the top level directory */ 00005 /* */ 00006 /* $Header: /afs/scl/project/cvsroot/fountain/source/server/InfinibandPort.h,v 1.2 2006/03/05 22:05:22 samm Exp $ */ 00013 #ifndef INFINIBAND_PORT_H__ 00014 #define INFINIBAND_PORT_H__ 00015 00016 #include "define.h" 00017 #include "Timer.h" 00018 #include <bamboo/XML.h> 00019 #include <stdint.h> //for uint64_t 00020 #include <infiniband/common.h> 00021 #include <infiniband/umad.h> 00022 #include <infiniband/mad.h> 00023 00024 namespace Infiniband { 00025 //forward declaration 00026 class Node; 00027 00033 class Port { 00034 public: 00041 Port(const Node* node, int portnum); 00042 00047 Port(const Port& rhs); 00048 00054 Port& operator=(const Port& rhs); 00055 00060 void query(uint32_t lid); 00061 00066 void setGuid(uint64_t guid) { remoteNodeGuid = guid; } 00067 00072 void addInfo(BambooLib::XMLElement* portElement); 00073 00074 private: 00078 uint64_t remoteNodeGuid; 00079 00083 uint32_t portNumber; 00084 00088 uint32_t receiveBytesCurrent; 00089 00093 uint32_t receiveBytesLast; 00094 00098 double receiveRate; 00099 00103 uint32_t sendBytesCurrent; 00104 00108 uint32_t sendBytesLast; 00109 00113 double sendRate; 00114 00118 uint32_t receivePacketsCurrent; 00119 00123 uint32_t receivePacketsLast; 00124 00128 double receivePacketsRate; 00129 00133 uint32_t sendPacketsCurrent; 00134 00138 uint32_t sendPacketsLast; 00139 00143 double sendPacketsRate; 00144 00148 uint32_t symbolErrorsCurrent; 00149 00153 uint32_t symbolErrorsLast; 00154 00158 double symbolErrorsRate; 00159 00163 int width; 00164 00168 double speed; 00169 00173 Timer queryTime; 00174 00178 bool getPortCounters; 00179 00183 unsigned int timeout; 00184 00188 bool resetPortCounters; 00189 00193 uint32_t resetMask; 00194 00200 bool checkStuckPortCounters(); 00201 00205 void calculatePortBandwidth(); 00206 }; 00207 00208 } //namespace Infiniband 00209 00210 #endif
1.4.6