@@ -115,42 +115,10 @@ static char adapter_stats_strings[][ETH_GSTRING_LEN] = {
115
115
"db_drop " ,
116
116
"db_full " ,
117
117
"db_empty " ,
118
- "tcp_ipv4_out_rsts " ,
119
- "tcp_ipv4_in_segs " ,
120
- "tcp_ipv4_out_segs " ,
121
- "tcp_ipv4_retrans_segs " ,
122
- "tcp_ipv6_out_rsts " ,
123
- "tcp_ipv6_in_segs " ,
124
- "tcp_ipv6_out_segs " ,
125
- "tcp_ipv6_retrans_segs " ,
126
- "usm_ddp_frames " ,
127
- "usm_ddp_octets " ,
128
- "usm_ddp_drops " ,
129
- "rdma_no_rqe_mod_defer " ,
130
- "rdma_no_rqe_pkt_defer " ,
131
- "tp_err_ofld_no_neigh " ,
132
- "tp_err_ofld_cong_defer " ,
133
118
"write_coal_success " ,
134
119
"write_coal_fail " ,
135
120
};
136
121
137
- static char channel_stats_strings [][ETH_GSTRING_LEN ] = {
138
- "--------Channel--------- " ,
139
- "tp_cpl_requests " ,
140
- "tp_cpl_responses " ,
141
- "tp_mac_in_errs " ,
142
- "tp_hdr_in_errs " ,
143
- "tp_tcp_in_errs " ,
144
- "tp_tcp6_in_errs " ,
145
- "tp_tnl_cong_drops " ,
146
- "tp_tnl_tx_drops " ,
147
- "tp_ofld_vlan_drops " ,
148
- "tp_ofld_chan_drops " ,
149
- "fcoe_octets_ddp " ,
150
- "fcoe_frames_ddp " ,
151
- "fcoe_frames_drop " ,
152
- };
153
-
154
122
static char loopback_stats_strings [][ETH_GSTRING_LEN ] = {
155
123
"-------Loopback----------- " ,
156
124
"octets_ok " ,
@@ -187,7 +155,6 @@ static int get_sset_count(struct net_device *dev, int sset)
187
155
case ETH_SS_STATS :
188
156
return ARRAY_SIZE (stats_strings ) +
189
157
ARRAY_SIZE (adapter_stats_strings ) +
190
- ARRAY_SIZE (channel_stats_strings ) +
191
158
ARRAY_SIZE (loopback_stats_strings );
192
159
case ETH_SS_PRIV_FLAGS :
193
160
return ARRAY_SIZE (cxgb4_priv_flags_strings );
@@ -252,9 +219,6 @@ static void get_strings(struct net_device *dev, u32 stringset, u8 *data)
252
219
memcpy (data , adapter_stats_strings ,
253
220
sizeof (adapter_stats_strings ));
254
221
data += sizeof (adapter_stats_strings );
255
- memcpy (data , channel_stats_strings ,
256
- sizeof (channel_stats_strings ));
257
- data += sizeof (channel_stats_strings );
258
222
memcpy (data , loopback_stats_strings ,
259
223
sizeof (loopback_stats_strings ));
260
224
} else if (stringset == ETH_SS_PRIV_FLAGS ) {
@@ -280,41 +244,10 @@ struct adapter_stats {
280
244
u64 db_drop ;
281
245
u64 db_full ;
282
246
u64 db_empty ;
283
- u64 tcp_v4_out_rsts ;
284
- u64 tcp_v4_in_segs ;
285
- u64 tcp_v4_out_segs ;
286
- u64 tcp_v4_retrans_segs ;
287
- u64 tcp_v6_out_rsts ;
288
- u64 tcp_v6_in_segs ;
289
- u64 tcp_v6_out_segs ;
290
- u64 tcp_v6_retrans_segs ;
291
- u64 frames ;
292
- u64 octets ;
293
- u64 drops ;
294
- u64 rqe_dfr_mod ;
295
- u64 rqe_dfr_pkt ;
296
- u64 ofld_no_neigh ;
297
- u64 ofld_cong_defer ;
298
247
u64 wc_success ;
299
248
u64 wc_fail ;
300
249
};
301
250
302
- struct channel_stats {
303
- u64 cpl_req ;
304
- u64 cpl_rsp ;
305
- u64 mac_in_errs ;
306
- u64 hdr_in_errs ;
307
- u64 tcp_in_errs ;
308
- u64 tcp6_in_errs ;
309
- u64 tnl_cong_drops ;
310
- u64 tnl_tx_drops ;
311
- u64 ofld_vlan_drops ;
312
- u64 ofld_chan_drops ;
313
- u64 octets_ddp ;
314
- u64 frames_ddp ;
315
- u64 frames_drop ;
316
- };
317
-
318
251
static void collect_sge_port_stats (const struct adapter * adap ,
319
252
const struct port_info * p ,
320
253
struct queue_port_stats * s )
@@ -337,45 +270,14 @@ static void collect_sge_port_stats(const struct adapter *adap,
337
270
338
271
static void collect_adapter_stats (struct adapter * adap , struct adapter_stats * s )
339
272
{
340
- struct tp_tcp_stats v4 , v6 ;
341
- struct tp_rdma_stats rdma_stats ;
342
- struct tp_err_stats err_stats ;
343
- struct tp_usm_stats usm_stats ;
344
273
u64 val1 , val2 ;
345
274
346
275
memset (s , 0 , sizeof (* s ));
347
276
348
- spin_lock (& adap -> stats_lock );
349
- t4_tp_get_tcp_stats (adap , & v4 , & v6 , false);
350
- t4_tp_get_rdma_stats (adap , & rdma_stats , false);
351
- t4_get_usm_stats (adap , & usm_stats , false);
352
- t4_tp_get_err_stats (adap , & err_stats , false);
353
- spin_unlock (& adap -> stats_lock );
354
-
355
277
s -> db_drop = adap -> db_stats .db_drop ;
356
278
s -> db_full = adap -> db_stats .db_full ;
357
279
s -> db_empty = adap -> db_stats .db_empty ;
358
280
359
- s -> tcp_v4_out_rsts = v4 .tcp_out_rsts ;
360
- s -> tcp_v4_in_segs = v4 .tcp_in_segs ;
361
- s -> tcp_v4_out_segs = v4 .tcp_out_segs ;
362
- s -> tcp_v4_retrans_segs = v4 .tcp_retrans_segs ;
363
- s -> tcp_v6_out_rsts = v6 .tcp_out_rsts ;
364
- s -> tcp_v6_in_segs = v6 .tcp_in_segs ;
365
- s -> tcp_v6_out_segs = v6 .tcp_out_segs ;
366
- s -> tcp_v6_retrans_segs = v6 .tcp_retrans_segs ;
367
-
368
- if (is_offload (adap )) {
369
- s -> frames = usm_stats .frames ;
370
- s -> octets = usm_stats .octets ;
371
- s -> drops = usm_stats .drops ;
372
- s -> rqe_dfr_mod = rdma_stats .rqe_dfr_mod ;
373
- s -> rqe_dfr_pkt = rdma_stats .rqe_dfr_pkt ;
374
- }
375
-
376
- s -> ofld_no_neigh = err_stats .ofld_no_neigh ;
377
- s -> ofld_cong_defer = err_stats .ofld_cong_defer ;
378
-
379
281
if (!is_t4 (adap -> params .chip )) {
380
282
int v ;
381
283
@@ -389,36 +291,6 @@ static void collect_adapter_stats(struct adapter *adap, struct adapter_stats *s)
389
291
}
390
292
}
391
293
392
- static void collect_channel_stats (struct adapter * adap , struct channel_stats * s ,
393
- u8 i )
394
- {
395
- struct tp_cpl_stats cpl_stats ;
396
- struct tp_err_stats err_stats ;
397
- struct tp_fcoe_stats fcoe_stats ;
398
-
399
- memset (s , 0 , sizeof (* s ));
400
-
401
- spin_lock (& adap -> stats_lock );
402
- t4_tp_get_cpl_stats (adap , & cpl_stats , false);
403
- t4_tp_get_err_stats (adap , & err_stats , false);
404
- t4_get_fcoe_stats (adap , i , & fcoe_stats , false);
405
- spin_unlock (& adap -> stats_lock );
406
-
407
- s -> cpl_req = cpl_stats .req [i ];
408
- s -> cpl_rsp = cpl_stats .rsp [i ];
409
- s -> mac_in_errs = err_stats .mac_in_errs [i ];
410
- s -> hdr_in_errs = err_stats .hdr_in_errs [i ];
411
- s -> tcp_in_errs = err_stats .tcp_in_errs [i ];
412
- s -> tcp6_in_errs = err_stats .tcp6_in_errs [i ];
413
- s -> tnl_cong_drops = err_stats .tnl_cong_drops [i ];
414
- s -> tnl_tx_drops = err_stats .tnl_tx_drops [i ];
415
- s -> ofld_vlan_drops = err_stats .ofld_vlan_drops [i ];
416
- s -> ofld_chan_drops = err_stats .ofld_chan_drops [i ];
417
- s -> octets_ddp = fcoe_stats .octets_ddp ;
418
- s -> frames_ddp = fcoe_stats .frames_ddp ;
419
- s -> frames_drop = fcoe_stats .frames_drop ;
420
- }
421
-
422
294
static void get_stats (struct net_device * dev , struct ethtool_stats * stats ,
423
295
u64 * data )
424
296
{
@@ -438,11 +310,6 @@ static void get_stats(struct net_device *dev, struct ethtool_stats *stats,
438
310
collect_adapter_stats (adapter , (struct adapter_stats * )data );
439
311
data += sizeof (struct adapter_stats ) / sizeof (u64 );
440
312
441
- * data ++ = (u64 )pi -> port_id ;
442
- collect_channel_stats (adapter , (struct channel_stats * )data ,
443
- pi -> port_id );
444
- data += sizeof (struct channel_stats ) / sizeof (u64 );
445
-
446
313
* data ++ = (u64 )pi -> port_id ;
447
314
memset (& s , 0 , sizeof (s ));
448
315
t4_get_lb_stats (adapter , pi -> port_id , & s );
0 commit comments