@@ -68,12 +68,17 @@ func (r mockSysfsReader) GetMACAddressFromDeviceName(deviceName efaDeviceName) (
6868}
6969
7070var mockCounterValues = map [string ]uint64 {
71- counterRdmaReadBytes : 1 ,
72- counterRdmaWriteBytes : 2 ,
73- counterRdmaWriteRecvBytes : 3 ,
74- counterRxBytes : 4 ,
75- counterRxDrops : 5 ,
76- counterTxBytes : 6 ,
71+ counterRdmaReadBytes : 1 ,
72+ counterRdmaWriteBytes : 2 ,
73+ counterRdmaWriteRecvBytes : 3 ,
74+ counterRxBytes : 4 ,
75+ counterRxDrops : 5 ,
76+ counterTxBytes : 6 ,
77+ counterRetransBytes : 7 ,
78+ counterRetransPkts : 8 ,
79+ counterRetransTimeoutEvents : 9 ,
80+ counterUnresponsiveRemoteEvents : 10 ,
81+ counterImpairedRemoteConnEvents : 11 ,
7782}
7883
7984func (r mockSysfsReader ) ReadCounter (deviceName efaDeviceName , port string , counter string ) (uint64 , error ) {
@@ -135,12 +140,17 @@ var mockHost = &mockHostInfo{
135140var efa0Metrics = []expectation {
136141 {
137142 map [string ]uint64 {
138- "node_efa_rdma_read_bytes" : 2 ,
139- "node_efa_rdma_write_bytes" : 4 ,
140- "node_efa_rdma_write_recv_bytes" : 6 ,
141- "node_efa_rx_bytes" : 8 ,
142- "node_efa_rx_dropped" : 10 ,
143- "node_efa_tx_bytes" : 12 ,
143+ "node_efa_rdma_read_bytes" : 2 ,
144+ "node_efa_rdma_write_bytes" : 4 ,
145+ "node_efa_rdma_write_recv_bytes" : 6 ,
146+ "node_efa_rx_bytes" : 8 ,
147+ "node_efa_rx_dropped" : 10 ,
148+ "node_efa_tx_bytes" : 12 ,
149+ "node_efa_retrans_bytes" : 14 ,
150+ "node_efa_retrans_pkts" : 16 ,
151+ "node_efa_retrans_timeout_events" : 18 ,
152+ "node_efa_unresponsive_remote_events" : 20 ,
153+ "node_efa_impaired_remote_conn_events" : 22 ,
144154 },
145155 map [string ]string {
146156 ci .MetricType : ci .TypeNodeEFA ,
@@ -151,12 +161,17 @@ var efa0Metrics = []expectation{
151161 },
152162 {
153163 map [string ]uint64 {
154- "pod_efa_rdma_read_bytes" : 2 ,
155- "pod_efa_rdma_write_bytes" : 4 ,
156- "pod_efa_rdma_write_recv_bytes" : 6 ,
157- "pod_efa_rx_bytes" : 8 ,
158- "pod_efa_rx_dropped" : 10 ,
159- "pod_efa_tx_bytes" : 12 ,
164+ "pod_efa_rdma_read_bytes" : 2 ,
165+ "pod_efa_rdma_write_bytes" : 4 ,
166+ "pod_efa_rdma_write_recv_bytes" : 6 ,
167+ "pod_efa_rx_bytes" : 8 ,
168+ "pod_efa_rx_dropped" : 10 ,
169+ "pod_efa_tx_bytes" : 12 ,
170+ "pod_efa_retrans_bytes" : 14 ,
171+ "pod_efa_retrans_pkts" : 16 ,
172+ "pod_efa_retrans_timeout_events" : 18 ,
173+ "pod_efa_unresponsive_remote_events" : 20 ,
174+ "pod_efa_impaired_remote_conn_events" : 22 ,
160175 },
161176 map [string ]string {
162177 ci .MetricType : ci .TypePodEFA ,
@@ -170,12 +185,17 @@ var efa0Metrics = []expectation{
170185 },
171186 {
172187 map [string ]uint64 {
173- "container_efa_rdma_read_bytes" : 2 ,
174- "container_efa_rdma_write_bytes" : 4 ,
175- "container_efa_rdma_write_recv_bytes" : 6 ,
176- "container_efa_rx_bytes" : 8 ,
177- "container_efa_rx_dropped" : 10 ,
178- "container_efa_tx_bytes" : 12 ,
188+ "container_efa_rdma_read_bytes" : 2 ,
189+ "container_efa_rdma_write_bytes" : 4 ,
190+ "container_efa_rdma_write_recv_bytes" : 6 ,
191+ "container_efa_rx_bytes" : 8 ,
192+ "container_efa_rx_dropped" : 10 ,
193+ "container_efa_tx_bytes" : 12 ,
194+ "container_efa_retrans_bytes" : 14 ,
195+ "container_efa_retrans_pkts" : 16 ,
196+ "container_efa_retrans_timeout_events" : 18 ,
197+ "container_efa_unresponsive_remote_events" : 20 ,
198+ "container_efa_impaired_remote_conn_events" : 22 ,
179199 },
180200 map [string ]string {
181201 ci .MetricType : ci .TypeContainerEFA ,
@@ -191,12 +211,17 @@ var efa0Metrics = []expectation{
191211
192212var efa1NodeMetric = expectation {
193213 map [string ]uint64 {
194- "node_efa_rdma_read_bytes" : 2 ,
195- "node_efa_rdma_write_bytes" : 4 ,
196- "node_efa_rdma_write_recv_bytes" : 6 ,
197- "node_efa_rx_bytes" : 8 ,
198- "node_efa_rx_dropped" : 10 ,
199- "node_efa_tx_bytes" : 12 ,
214+ "node_efa_rdma_read_bytes" : 2 ,
215+ "node_efa_rdma_write_bytes" : 4 ,
216+ "node_efa_rdma_write_recv_bytes" : 6 ,
217+ "node_efa_rx_bytes" : 8 ,
218+ "node_efa_rx_dropped" : 10 ,
219+ "node_efa_tx_bytes" : 12 ,
220+ "node_efa_retrans_bytes" : 14 ,
221+ "node_efa_retrans_pkts" : 16 ,
222+ "node_efa_retrans_timeout_events" : 18 ,
223+ "node_efa_unresponsive_remote_events" : 20 ,
224+ "node_efa_impaired_remote_conn_events" : 22 ,
200225 },
201226 map [string ]string {
202227 ci .MetricType : ci .TypeNodeEFA ,
@@ -209,12 +234,17 @@ var efa1NodeMetric = expectation{
209234var efa1PodContainerMetrics = []expectation {
210235 {
211236 map [string ]uint64 {
212- "pod_efa_rdma_read_bytes" : 2 ,
213- "pod_efa_rdma_write_bytes" : 4 ,
214- "pod_efa_rdma_write_recv_bytes" : 6 ,
215- "pod_efa_rx_bytes" : 8 ,
216- "pod_efa_rx_dropped" : 10 ,
217- "pod_efa_tx_bytes" : 12 ,
237+ "pod_efa_rdma_read_bytes" : 2 ,
238+ "pod_efa_rdma_write_bytes" : 4 ,
239+ "pod_efa_rdma_write_recv_bytes" : 6 ,
240+ "pod_efa_rx_bytes" : 8 ,
241+ "pod_efa_rx_dropped" : 10 ,
242+ "pod_efa_tx_bytes" : 12 ,
243+ "pod_efa_retrans_bytes" : 14 ,
244+ "pod_efa_retrans_pkts" : 16 ,
245+ "pod_efa_retrans_timeout_events" : 18 ,
246+ "pod_efa_unresponsive_remote_events" : 20 ,
247+ "pod_efa_impaired_remote_conn_events" : 22 ,
218248 },
219249 map [string ]string {
220250 ci .MetricType : ci .TypePodEFA ,
@@ -228,12 +258,17 @@ var efa1PodContainerMetrics = []expectation{
228258 },
229259 {
230260 map [string ]uint64 {
231- "container_efa_rdma_read_bytes" : 2 ,
232- "container_efa_rdma_write_bytes" : 4 ,
233- "container_efa_rdma_write_recv_bytes" : 6 ,
234- "container_efa_rx_bytes" : 8 ,
235- "container_efa_rx_dropped" : 10 ,
236- "container_efa_tx_bytes" : 12 ,
261+ "container_efa_rdma_read_bytes" : 2 ,
262+ "container_efa_rdma_write_bytes" : 4 ,
263+ "container_efa_rdma_write_recv_bytes" : 6 ,
264+ "container_efa_rx_bytes" : 8 ,
265+ "container_efa_rx_dropped" : 10 ,
266+ "container_efa_tx_bytes" : 12 ,
267+ "container_efa_retrans_bytes" : 14 ,
268+ "container_efa_retrans_pkts" : 16 ,
269+ "container_efa_retrans_timeout_events" : 18 ,
270+ "container_efa_unresponsive_remote_events" : 20 ,
271+ "container_efa_impaired_remote_conn_events" : 22 ,
237272 },
238273 map [string ]string {
239274 ci .MetricType : ci .TypeContainerEFA ,
@@ -401,12 +436,17 @@ func TestScrape(t *testing.T) {
401436
402437 expectedCounters := efaCounters {
403438 // All values multiplied by 2 because we mock 2 ports
404- rdmaReadBytes : 2 ,
405- rdmaWriteBytes : 4 ,
406- rdmaWriteRecvBytes : 6 ,
407- rxBytes : 8 ,
408- rxDrops : 10 ,
409- txBytes : 12 ,
439+ rdmaReadBytes : 2 ,
440+ rdmaWriteBytes : 4 ,
441+ rdmaWriteRecvBytes : 6 ,
442+ rxBytes : 8 ,
443+ rxDrops : 10 ,
444+ txBytes : 12 ,
445+ retransBytes : 14 ,
446+ retransPkts : 16 ,
447+ retransTimeoutEvents : 18 ,
448+ unresponsiveRemoteEvents : 20 ,
449+ impairedRemoteConnEvents : 22 ,
410450 }
411451 expected := efaDevices {
412452 efaDevice {
0 commit comments