1 2 #ifndef MAC_STATS_H 3 #define MAC_STATS_H 4 5 6 struct emac_stats { 7 u32 rx_stat_ifhcinoctets; 8 u32 rx_stat_ifhcinbadoctets; 9 u32 rx_stat_etherstatsfragments; 10 u32 rx_stat_ifhcinucastpkts; 11 u32 rx_stat_ifhcinmulticastpkts; 12 u32 rx_stat_ifhcinbroadcastpkts; 13 u32 rx_stat_dot3statsfcserrors; 14 u32 rx_stat_dot3statsalignmenterrors; 15 u32 rx_stat_dot3statscarriersenseerrors; 16 u32 rx_stat_xonpauseframesreceived; 17 u32 rx_stat_xoffpauseframesreceived; 18 u32 rx_stat_maccontrolframesreceived; 19 u32 rx_stat_xoffstateentered; 20 u32 rx_stat_dot3statsframestoolong; 21 u32 rx_stat_etherstatsjabbers; 22 u32 rx_stat_etherstatsundersizepkts; 23 u32 rx_stat_etherstatspkts64octets; 24 u32 rx_stat_etherstatspkts65octetsto127octets; 25 u32 rx_stat_etherstatspkts128octetsto255octets; 26 u32 rx_stat_etherstatspkts256octetsto511octets; 27 u32 rx_stat_etherstatspkts512octetsto1023octets; 28 u32 rx_stat_etherstatspkts1024octetsto1522octets; 29 u32 rx_stat_etherstatspktsover1522octets; 30 31 u32 rx_stat_falsecarriererrors; 32 33 u32 tx_stat_ifhcoutoctets; 34 u32 tx_stat_ifhcoutbadoctets; 35 u32 tx_stat_etherstatscollisions; 36 u32 tx_stat_outxonsent; 37 u32 tx_stat_outxoffsent; 38 u32 tx_stat_flowcontroldone; 39 u32 tx_stat_dot3statssinglecollisionframes; 40 u32 tx_stat_dot3statsmultiplecollisionframes; 41 u32 tx_stat_dot3statsdeferredtransmissions; 42 u32 tx_stat_dot3statsexcessivecollisions; 43 u32 tx_stat_dot3statslatecollisions; 44 u32 tx_stat_ifhcoutucastpkts; 45 u32 tx_stat_ifhcoutmulticastpkts; 46 u32 tx_stat_ifhcoutbroadcastpkts; 47 u32 tx_stat_etherstatspkts64octets; 48 u32 tx_stat_etherstatspkts65octetsto127octets; 49 u32 tx_stat_etherstatspkts128octetsto255octets; 50 u32 tx_stat_etherstatspkts256octetsto511octets; 51 u32 tx_stat_etherstatspkts512octetsto1023octets; 52 u32 tx_stat_etherstatspkts1024octetsto1522octets; 53 u32 tx_stat_etherstatspktsover1522octets; 54 u32 tx_stat_dot3statsinternalmactransmiterrors; 55 }; 56 57 58 struct bmac1_stats { 59 u32 tx_stat_gtpkt_lo; 60 u32 tx_stat_gtpkt_hi; 61 u32 tx_stat_gtxpf_lo; 62 u32 tx_stat_gtxpf_hi; 63 u32 tx_stat_gtfcs_lo; 64 u32 tx_stat_gtfcs_hi; 65 u32 tx_stat_gtmca_lo; 66 u32 tx_stat_gtmca_hi; 67 u32 tx_stat_gtbca_lo; 68 u32 tx_stat_gtbca_hi; 69 u32 tx_stat_gtfrg_lo; 70 u32 tx_stat_gtfrg_hi; 71 u32 tx_stat_gtovr_lo; 72 u32 tx_stat_gtovr_hi; 73 u32 tx_stat_gt64_lo; 74 u32 tx_stat_gt64_hi; 75 u32 tx_stat_gt127_lo; 76 u32 tx_stat_gt127_hi; 77 u32 tx_stat_gt255_lo; 78 u32 tx_stat_gt255_hi; 79 u32 tx_stat_gt511_lo; 80 u32 tx_stat_gt511_hi; 81 u32 tx_stat_gt1023_lo; 82 u32 tx_stat_gt1023_hi; 83 u32 tx_stat_gt1518_lo; 84 u32 tx_stat_gt1518_hi; 85 u32 tx_stat_gt2047_lo; 86 u32 tx_stat_gt2047_hi; 87 u32 tx_stat_gt4095_lo; 88 u32 tx_stat_gt4095_hi; 89 u32 tx_stat_gt9216_lo; 90 u32 tx_stat_gt9216_hi; 91 u32 tx_stat_gt16383_lo; 92 u32 tx_stat_gt16383_hi; 93 u32 tx_stat_gtmax_lo; 94 u32 tx_stat_gtmax_hi; 95 u32 tx_stat_gtufl_lo; 96 u32 tx_stat_gtufl_hi; 97 u32 tx_stat_gterr_lo; 98 u32 tx_stat_gterr_hi; 99 u32 tx_stat_gtbyt_lo; 100 u32 tx_stat_gtbyt_hi; 101 102 u32 rx_stat_gr64_lo; 103 u32 rx_stat_gr64_hi; 104 u32 rx_stat_gr127_lo; 105 u32 rx_stat_gr127_hi; 106 u32 rx_stat_gr255_lo; 107 u32 rx_stat_gr255_hi; 108 u32 rx_stat_gr511_lo; 109 u32 rx_stat_gr511_hi; 110 u32 rx_stat_gr1023_lo; 111 u32 rx_stat_gr1023_hi; 112 u32 rx_stat_gr1518_lo; 113 u32 rx_stat_gr1518_hi; 114 u32 rx_stat_gr2047_lo; 115 u32 rx_stat_gr2047_hi; 116 u32 rx_stat_gr4095_lo; 117 u32 rx_stat_gr4095_hi; 118 u32 rx_stat_gr9216_lo; 119 u32 rx_stat_gr9216_hi; 120 u32 rx_stat_gr16383_lo; 121 u32 rx_stat_gr16383_hi; 122 u32 rx_stat_grmax_lo; 123 u32 rx_stat_grmax_hi; 124 u32 rx_stat_grpkt_lo; 125 u32 rx_stat_grpkt_hi; 126 u32 rx_stat_grfcs_lo; 127 u32 rx_stat_grfcs_hi; 128 u32 rx_stat_grmca_lo; 129 u32 rx_stat_grmca_hi; 130 u32 rx_stat_grbca_lo; 131 u32 rx_stat_grbca_hi; 132 u32 rx_stat_grxcf_lo; 133 u32 rx_stat_grxcf_hi; 134 u32 rx_stat_grxpf_lo; 135 u32 rx_stat_grxpf_hi; 136 u32 rx_stat_grxuo_lo; 137 u32 rx_stat_grxuo_hi; 138 u32 rx_stat_grjbr_lo; 139 u32 rx_stat_grjbr_hi; 140 u32 rx_stat_grovr_lo; 141 u32 rx_stat_grovr_hi; 142 u32 rx_stat_grflr_lo; 143 u32 rx_stat_grflr_hi; 144 u32 rx_stat_grmeg_lo; 145 u32 rx_stat_grmeg_hi; 146 u32 rx_stat_grmeb_lo; 147 u32 rx_stat_grmeb_hi; 148 u32 rx_stat_grbyt_lo; 149 u32 rx_stat_grbyt_hi; 150 u32 rx_stat_grund_lo; 151 u32 rx_stat_grund_hi; 152 u32 rx_stat_grfrg_lo; 153 u32 rx_stat_grfrg_hi; 154 u32 rx_stat_grerb_lo; 155 u32 rx_stat_grerb_hi; 156 u32 rx_stat_grfre_lo; 157 u32 rx_stat_grfre_hi; 158 u32 rx_stat_gripj_lo; 159 u32 rx_stat_gripj_hi; 160 }; 161 162 struct bmac2_stats { 163 u32 tx_stat_gtpk_lo; /* gtpok */ 164 u32 tx_stat_gtpk_hi; /* gtpok */ 165 u32 tx_stat_gtxpf_lo; /* gtpf */ 166 u32 tx_stat_gtxpf_hi; /* gtpf */ 167 u32 tx_stat_gtpp_lo; /* NEW BMAC2 */ 168 u32 tx_stat_gtpp_hi; /* NEW BMAC2 */ 169 u32 tx_stat_gtfcs_lo; 170 u32 tx_stat_gtfcs_hi; 171 u32 tx_stat_gtuca_lo; /* NEW BMAC2 */ 172 u32 tx_stat_gtuca_hi; /* NEW BMAC2 */ 173 u32 tx_stat_gtmca_lo; 174 u32 tx_stat_gtmca_hi; 175 u32 tx_stat_gtbca_lo; 176 u32 tx_stat_gtbca_hi; 177 u32 tx_stat_gtovr_lo; 178 u32 tx_stat_gtovr_hi; 179 u32 tx_stat_gtfrg_lo; 180 u32 tx_stat_gtfrg_hi; 181 u32 tx_stat_gtpkt1_lo; /* gtpkt */ 182 u32 tx_stat_gtpkt1_hi; /* gtpkt */ 183 u32 tx_stat_gt64_lo; 184 u32 tx_stat_gt64_hi; 185 u32 tx_stat_gt127_lo; 186 u32 tx_stat_gt127_hi; 187 u32 tx_stat_gt255_lo; 188 u32 tx_stat_gt255_hi; 189 u32 tx_stat_gt511_lo; 190 u32 tx_stat_gt511_hi; 191 u32 tx_stat_gt1023_lo; 192 u32 tx_stat_gt1023_hi; 193 u32 tx_stat_gt1518_lo; 194 u32 tx_stat_gt1518_hi; 195 u32 tx_stat_gt2047_lo; 196 u32 tx_stat_gt2047_hi; 197 u32 tx_stat_gt4095_lo; 198 u32 tx_stat_gt4095_hi; 199 u32 tx_stat_gt9216_lo; 200 u32 tx_stat_gt9216_hi; 201 u32 tx_stat_gt16383_lo; 202 u32 tx_stat_gt16383_hi; 203 u32 tx_stat_gtmax_lo; 204 u32 tx_stat_gtmax_hi; 205 u32 tx_stat_gtufl_lo; 206 u32 tx_stat_gtufl_hi; 207 u32 tx_stat_gterr_lo; 208 u32 tx_stat_gterr_hi; 209 u32 tx_stat_gtbyt_lo; 210 u32 tx_stat_gtbyt_hi; 211 212 u32 rx_stat_gr64_lo; 213 u32 rx_stat_gr64_hi; 214 u32 rx_stat_gr127_lo; 215 u32 rx_stat_gr127_hi; 216 u32 rx_stat_gr255_lo; 217 u32 rx_stat_gr255_hi; 218 u32 rx_stat_gr511_lo; 219 u32 rx_stat_gr511_hi; 220 u32 rx_stat_gr1023_lo; 221 u32 rx_stat_gr1023_hi; 222 u32 rx_stat_gr1518_lo; 223 u32 rx_stat_gr1518_hi; 224 u32 rx_stat_gr2047_lo; 225 u32 rx_stat_gr2047_hi; 226 u32 rx_stat_gr4095_lo; 227 u32 rx_stat_gr4095_hi; 228 u32 rx_stat_gr9216_lo; 229 u32 rx_stat_gr9216_hi; 230 u32 rx_stat_gr16383_lo; 231 u32 rx_stat_gr16383_hi; 232 u32 rx_stat_grmax_lo; 233 u32 rx_stat_grmax_hi; 234 u32 rx_stat_grpkt_lo; 235 u32 rx_stat_grpkt_hi; 236 u32 rx_stat_grfcs_lo; 237 u32 rx_stat_grfcs_hi; 238 u32 rx_stat_gruca_lo; 239 u32 rx_stat_gruca_hi; 240 u32 rx_stat_grmca_lo; 241 u32 rx_stat_grmca_hi; 242 u32 rx_stat_grbca_lo; 243 u32 rx_stat_grbca_hi; 244 u32 rx_stat_grxpf_lo; /* grpf */ 245 u32 rx_stat_grxpf_hi; /* grpf */ 246 u32 rx_stat_grpp_lo; 247 u32 rx_stat_grpp_hi; 248 u32 rx_stat_grxuo_lo; /* gruo */ 249 u32 rx_stat_grxuo_hi; /* gruo */ 250 u32 rx_stat_grjbr_lo; 251 u32 rx_stat_grjbr_hi; 252 u32 rx_stat_grovr_lo; 253 u32 rx_stat_grovr_hi; 254 u32 rx_stat_grxcf_lo; /* grcf */ 255 u32 rx_stat_grxcf_hi; /* grcf */ 256 u32 rx_stat_grflr_lo; 257 u32 rx_stat_grflr_hi; 258 u32 rx_stat_grpok_lo; 259 u32 rx_stat_grpok_hi; 260 u32 rx_stat_grmeg_lo; 261 u32 rx_stat_grmeg_hi; 262 u32 rx_stat_grmeb_lo; 263 u32 rx_stat_grmeb_hi; 264 u32 rx_stat_grbyt_lo; 265 u32 rx_stat_grbyt_hi; 266 u32 rx_stat_grund_lo; 267 u32 rx_stat_grund_hi; 268 u32 rx_stat_grfrg_lo; 269 u32 rx_stat_grfrg_hi; 270 u32 rx_stat_grerb_lo; /* grerrbyt */ 271 u32 rx_stat_grerb_hi; /* grerrbyt */ 272 u32 rx_stat_grfre_lo; /* grfrerr */ 273 u32 rx_stat_grfre_hi; /* grfrerr */ 274 u32 rx_stat_gripj_lo; 275 u32 rx_stat_gripj_hi; 276 }; 277 278 struct mstat_stats { 279 struct { 280 /* OTE MSTAT on E3 has a bug where this register's contents are 281 * actually tx_gtxpok + tx_gtxpf + (possibly)tx_gtxpp 282 */ 283 u32 tx_gtxpok_lo; 284 u32 tx_gtxpok_hi; 285 u32 tx_gtxpf_lo; 286 u32 tx_gtxpf_hi; 287 u32 tx_gtxpp_lo; 288 u32 tx_gtxpp_hi; 289 u32 tx_gtfcs_lo; 290 u32 tx_gtfcs_hi; 291 u32 tx_gtuca_lo; 292 u32 tx_gtuca_hi; 293 u32 tx_gtmca_lo; 294 u32 tx_gtmca_hi; 295 u32 tx_gtgca_lo; 296 u32 tx_gtgca_hi; 297 u32 tx_gtpkt_lo; 298 u32 tx_gtpkt_hi; 299 u32 tx_gt64_lo; 300 u32 tx_gt64_hi; 301 u32 tx_gt127_lo; 302 u32 tx_gt127_hi; 303 u32 tx_gt255_lo; 304 u32 tx_gt255_hi; 305 u32 tx_gt511_lo; 306 u32 tx_gt511_hi; 307 u32 tx_gt1023_lo; 308 u32 tx_gt1023_hi; 309 u32 tx_gt1518_lo; 310 u32 tx_gt1518_hi; 311 u32 tx_gt2047_lo; 312 u32 tx_gt2047_hi; 313 u32 tx_gt4095_lo; 314 u32 tx_gt4095_hi; 315 u32 tx_gt9216_lo; 316 u32 tx_gt9216_hi; 317 u32 tx_gt16383_lo; 318 u32 tx_gt16383_hi; 319 u32 tx_gtufl_lo; 320 u32 tx_gtufl_hi; 321 u32 tx_gterr_lo; 322 u32 tx_gterr_hi; 323 u32 tx_gtbyt_lo; 324 u32 tx_gtbyt_hi; 325 u32 tx_collisions_lo; 326 u32 tx_collisions_hi; 327 u32 tx_singlecollision_lo; 328 u32 tx_singlecollision_hi; 329 u32 tx_multiplecollisions_lo; 330 u32 tx_multiplecollisions_hi; 331 u32 tx_deferred_lo; 332 u32 tx_deferred_hi; 333 u32 tx_excessivecollisions_lo; 334 u32 tx_excessivecollisions_hi; 335 u32 tx_latecollisions_lo; 336 u32 tx_latecollisions_hi; 337 } stats_tx; 338 339 struct { 340 u32 rx_gr64_lo; 341 u32 rx_gr64_hi; 342 u32 rx_gr127_lo; 343 u32 rx_gr127_hi; 344 u32 rx_gr255_lo; 345 u32 rx_gr255_hi; 346 u32 rx_gr511_lo; 347 u32 rx_gr511_hi; 348 u32 rx_gr1023_lo; 349 u32 rx_gr1023_hi; 350 u32 rx_gr1518_lo; 351 u32 rx_gr1518_hi; 352 u32 rx_gr2047_lo; 353 u32 rx_gr2047_hi; 354 u32 rx_gr4095_lo; 355 u32 rx_gr4095_hi; 356 u32 rx_gr9216_lo; 357 u32 rx_gr9216_hi; 358 u32 rx_gr16383_lo; 359 u32 rx_gr16383_hi; 360 u32 rx_grpkt_lo; 361 u32 rx_grpkt_hi; 362 u32 rx_grfcs_lo; 363 u32 rx_grfcs_hi; 364 u32 rx_gruca_lo; 365 u32 rx_gruca_hi; 366 u32 rx_grmca_lo; 367 u32 rx_grmca_hi; 368 u32 rx_grbca_lo; 369 u32 rx_grbca_hi; 370 u32 rx_grxpf_lo; 371 u32 rx_grxpf_hi; 372 u32 rx_grxpp_lo; 373 u32 rx_grxpp_hi; 374 u32 rx_grxuo_lo; 375 u32 rx_grxuo_hi; 376 u32 rx_grovr_lo; 377 u32 rx_grovr_hi; 378 u32 rx_grxcf_lo; 379 u32 rx_grxcf_hi; 380 u32 rx_grflr_lo; 381 u32 rx_grflr_hi; 382 u32 rx_grpok_lo; 383 u32 rx_grpok_hi; 384 u32 rx_grbyt_lo; 385 u32 rx_grbyt_hi; 386 u32 rx_grund_lo; 387 u32 rx_grund_hi; 388 u32 rx_grfrg_lo; 389 u32 rx_grfrg_hi; 390 u32 rx_grerb_lo; 391 u32 rx_grerb_hi; 392 u32 rx_grfre_lo; 393 u32 rx_grfre_hi; 394 395 u32 rx_alignmenterrors_lo; 396 u32 rx_alignmenterrors_hi; 397 u32 rx_falsecarrier_lo; 398 u32 rx_falsecarrier_hi; 399 u32 rx_llfcmsgcnt_lo; 400 u32 rx_llfcmsgcnt_hi; 401 } stats_rx; 402 }; 403 404 union mac_stats { 405 struct emac_stats emac_stats; 406 struct bmac1_stats bmac1_stats; 407 struct bmac2_stats bmac2_stats; 408 struct mstat_stats mstat_stats; 409 }; 410 411 412 struct mac_stx { 413 /* in_bad_octets */ 414 u32 rx_stat_ifhcinbadoctets_hi; 415 u32 rx_stat_ifhcinbadoctets_lo; 416 417 /* out_bad_octets */ 418 u32 tx_stat_ifhcoutbadoctets_hi; 419 u32 tx_stat_ifhcoutbadoctets_lo; 420 421 /* crc_receive_errors */ 422 u32 rx_stat_dot3statsfcserrors_hi; 423 u32 rx_stat_dot3statsfcserrors_lo; 424 /* alignment_errors */ 425 u32 rx_stat_dot3statsalignmenterrors_hi; 426 u32 rx_stat_dot3statsalignmenterrors_lo; 427 /* carrier_sense_errors */ 428 u32 rx_stat_dot3statscarriersenseerrors_hi; 429 u32 rx_stat_dot3statscarriersenseerrors_lo; 430 /* false_carrier_detections */ 431 u32 rx_stat_falsecarriererrors_hi; 432 u32 rx_stat_falsecarriererrors_lo; 433 434 /* runt_packets_received */ 435 u32 rx_stat_etherstatsundersizepkts_hi; 436 u32 rx_stat_etherstatsundersizepkts_lo; 437 /* jabber_packets_received */ 438 u32 rx_stat_dot3statsframestoolong_hi; 439 u32 rx_stat_dot3statsframestoolong_lo; 440 441 /* error_runt_packets_received */ 442 u32 rx_stat_etherstatsfragments_hi; 443 u32 rx_stat_etherstatsfragments_lo; 444 /* error_jabber_packets_received */ 445 u32 rx_stat_etherstatsjabbers_hi; 446 u32 rx_stat_etherstatsjabbers_lo; 447 448 /* control_frames_received */ 449 u32 rx_stat_maccontrolframesreceived_hi; 450 u32 rx_stat_maccontrolframesreceived_lo; 451 u32 rx_stat_mac_xpf_hi; 452 u32 rx_stat_mac_xpf_lo; 453 u32 rx_stat_mac_xcf_hi; 454 u32 rx_stat_mac_xcf_lo; 455 456 /* xoff_state_entered */ 457 u32 rx_stat_xoffstateentered_hi; 458 u32 rx_stat_xoffstateentered_lo; 459 /* pause_xon_frames_received */ 460 u32 rx_stat_xonpauseframesreceived_hi; 461 u32 rx_stat_xonpauseframesreceived_lo; 462 /* pause_xoff_frames_received */ 463 u32 rx_stat_xoffpauseframesreceived_hi; 464 u32 rx_stat_xoffpauseframesreceived_lo; 465 /* pause_xon_frames_transmitted */ 466 u32 tx_stat_outxonsent_hi; 467 u32 tx_stat_outxonsent_lo; 468 /* pause_xoff_frames_transmitted */ 469 u32 tx_stat_outxoffsent_hi; 470 u32 tx_stat_outxoffsent_lo; 471 /* flow_control_done */ 472 u32 tx_stat_flowcontroldone_hi; 473 u32 tx_stat_flowcontroldone_lo; 474 475 /* ether_stats_collisions */ 476 u32 tx_stat_etherstatscollisions_hi; 477 u32 tx_stat_etherstatscollisions_lo; 478 /* single_collision_transmit_frames */ 479 u32 tx_stat_dot3statssinglecollisionframes_hi; 480 u32 tx_stat_dot3statssinglecollisionframes_lo; 481 /* multiple_collision_transmit_frames */ 482 u32 tx_stat_dot3statsmultiplecollisionframes_hi; 483 u32 tx_stat_dot3statsmultiplecollisionframes_lo; 484 /* deferred_transmissions */ 485 u32 tx_stat_dot3statsdeferredtransmissions_hi; 486 u32 tx_stat_dot3statsdeferredtransmissions_lo; 487 /* excessive_collision_frames */ 488 u32 tx_stat_dot3statsexcessivecollisions_hi; 489 u32 tx_stat_dot3statsexcessivecollisions_lo; 490 /* late_collision_frames */ 491 u32 tx_stat_dot3statslatecollisions_hi; 492 u32 tx_stat_dot3statslatecollisions_lo; 493 494 /* frames_transmitted_64_bytes */ 495 u32 tx_stat_etherstatspkts64octets_hi; 496 u32 tx_stat_etherstatspkts64octets_lo; 497 /* frames_transmitted_65_127_bytes */ 498 u32 tx_stat_etherstatspkts65octetsto127octets_hi; 499 u32 tx_stat_etherstatspkts65octetsto127octets_lo; 500 /* frames_transmitted_128_255_bytes */ 501 u32 tx_stat_etherstatspkts128octetsto255octets_hi; 502 u32 tx_stat_etherstatspkts128octetsto255octets_lo; 503 /* frames_transmitted_256_511_bytes */ 504 u32 tx_stat_etherstatspkts256octetsto511octets_hi; 505 u32 tx_stat_etherstatspkts256octetsto511octets_lo; 506 /* frames_transmitted_512_1023_bytes */ 507 u32 tx_stat_etherstatspkts512octetsto1023octets_hi; 508 u32 tx_stat_etherstatspkts512octetsto1023octets_lo; 509 /* frames_transmitted_1024_1522_bytes */ 510 u32 tx_stat_etherstatspkts1024octetsto1522octets_hi; 511 u32 tx_stat_etherstatspkts1024octetsto1522octets_lo; 512 /* frames_transmitted_1523_9022_bytes */ 513 u32 tx_stat_etherstatspktsover1522octets_hi; 514 u32 tx_stat_etherstatspktsover1522octets_lo; 515 u32 tx_stat_mac_2047_hi; 516 u32 tx_stat_mac_2047_lo; 517 u32 tx_stat_mac_4095_hi; 518 u32 tx_stat_mac_4095_lo; 519 u32 tx_stat_mac_9216_hi; 520 u32 tx_stat_mac_9216_lo; 521 u32 tx_stat_mac_16383_hi; 522 u32 tx_stat_mac_16383_lo; 523 524 /* internal_mac_transmit_errors */ 525 u32 tx_stat_dot3statsinternalmactransmiterrors_hi; 526 u32 tx_stat_dot3statsinternalmactransmiterrors_lo; 527 528 /* if_out_discards */ 529 u32 tx_stat_mac_ufl_hi; 530 u32 tx_stat_mac_ufl_lo; 531 }; 532 533 534 #define MAC_STX_IDX_MAX 2 535 536 struct host_port_stats { 537 u32 host_port_stats_counter; 538 539 struct mac_stx mac_stx[MAC_STX_IDX_MAX]; 540 541 u32 brb_drop_hi; 542 u32 brb_drop_lo; 543 544 u32 not_used; /* obsolete as of MFW 7.2.1 */ 545 546 u32 pfc_frames_tx_hi; 547 u32 pfc_frames_tx_lo; 548 u32 pfc_frames_rx_hi; 549 u32 pfc_frames_rx_lo; 550 551 u32 eee_lpi_count_hi; 552 u32 eee_lpi_count_lo; 553 }; 554 555 556 struct host_func_stats { 557 u32 host_func_stats_start; 558 559 u32 total_bytes_received_hi; 560 u32 total_bytes_received_lo; 561 562 u32 total_bytes_transmitted_hi; 563 u32 total_bytes_transmitted_lo; 564 565 u32 total_unicast_packets_received_hi; 566 u32 total_unicast_packets_received_lo; 567 568 u32 total_multicast_packets_received_hi; 569 u32 total_multicast_packets_received_lo; 570 571 u32 total_broadcast_packets_received_hi; 572 u32 total_broadcast_packets_received_lo; 573 574 u32 total_unicast_packets_transmitted_hi; 575 u32 total_unicast_packets_transmitted_lo; 576 577 u32 total_multicast_packets_transmitted_hi; 578 u32 total_multicast_packets_transmitted_lo; 579 580 u32 total_broadcast_packets_transmitted_hi; 581 u32 total_broadcast_packets_transmitted_lo; 582 583 u32 valid_bytes_received_hi; 584 u32 valid_bytes_received_lo; 585 586 u32 host_func_stats_end; 587 }; 588 589 /* VIC definitions */ 590 #define VICSTATST_UIF_INDEX 2 591 592 /* 593 * stats collected for afex. 594 * NOTE: structure is exactly as expected to be received by the switch. 595 * order must remain exactly as is unless protocol changes ! 596 */ 597 struct afex_stats { 598 u32 tx_unicast_frames_hi; 599 u32 tx_unicast_frames_lo; 600 u32 tx_unicast_bytes_hi; 601 u32 tx_unicast_bytes_lo; 602 u32 tx_multicast_frames_hi; 603 u32 tx_multicast_frames_lo; 604 u32 tx_multicast_bytes_hi; 605 u32 tx_multicast_bytes_lo; 606 u32 tx_broadcast_frames_hi; 607 u32 tx_broadcast_frames_lo; 608 u32 tx_broadcast_bytes_hi; 609 u32 tx_broadcast_bytes_lo; 610 u32 tx_frames_discarded_hi; 611 u32 tx_frames_discarded_lo; 612 u32 tx_frames_dropped_hi; 613 u32 tx_frames_dropped_lo; 614 615 u32 rx_unicast_frames_hi; 616 u32 rx_unicast_frames_lo; 617 u32 rx_unicast_bytes_hi; 618 u32 rx_unicast_bytes_lo; 619 u32 rx_multicast_frames_hi; 620 u32 rx_multicast_frames_lo; 621 u32 rx_multicast_bytes_hi; 622 u32 rx_multicast_bytes_lo; 623 u32 rx_broadcast_frames_hi; 624 u32 rx_broadcast_frames_lo; 625 u32 rx_broadcast_bytes_hi; 626 u32 rx_broadcast_bytes_lo; 627 u32 rx_frames_discarded_hi; 628 u32 rx_frames_discarded_lo; 629 u32 rx_frames_dropped_hi; 630 u32 rx_frames_dropped_lo; 631 }; 632 633 /* To maintain backward compatibility between FW and drivers, new elements */ 634 /* should be added to the end of the structure. */ 635 636 /* Per Port Statistics */ 637 struct port_info { 638 u32 size; /* size of this structure (i.e. sizeof(port_info)) */ 639 u32 enabled; /* 0 =Disabled, 1= Enabled */ 640 u32 link_speed; /* multiplier of 100Mb */ 641 u32 wol_support; /* WoL Support (i.e. Non-Zero if WOL supported ) */ 642 u32 flow_control; /* 802.3X Flow Ctrl. 0=off 1=RX 2=TX 3=RX&TX.*/ 643 u32 flex10; /* Flex10 mode enabled. non zero = yes */ 644 u32 rx_drops; /* RX Discards. Counters roll over, never reset */ 645 u32 rx_errors; /* RX Errors. Physical Port Stats L95, All PFs and NC-SI. 646 This is flagged by Consumer as an error. */ 647 u32 rx_uncast_lo; /* RX Unicast Packets. Free running counters: */ 648 u32 rx_uncast_hi; /* RX Unicast Packets. Free running counters: */ 649 u32 rx_mcast_lo; /* RX Multicast Packets */ 650 u32 rx_mcast_hi; /* RX Multicast Packets */ 651 u32 rx_bcast_lo; /* RX Broadcast Packets */ 652 u32 rx_bcast_hi; /* RX Broadcast Packets */ 653 u32 tx_uncast_lo; /* TX Unicast Packets */ 654 u32 tx_uncast_hi; /* TX Unicast Packets */ 655 u32 tx_mcast_lo; /* TX Multicast Packets */ 656 u32 tx_mcast_hi; /* TX Multicast Packets */ 657 u32 tx_bcast_lo; /* TX Broadcast Packets */ 658 u32 tx_bcast_hi; /* TX Broadcast Packets */ 659 u32 tx_errors; /* TX Errors */ 660 u32 tx_discards; /* TX Discards */ 661 u32 rx_frames_lo; /* RX Frames received */ 662 u32 rx_frames_hi; /* RX Frames received */ 663 u32 rx_bytes_lo; /* RX Bytes received */ 664 u32 rx_bytes_hi; /* RX Bytes received */ 665 u32 tx_frames_lo; /* TX Frames sent */ 666 u32 tx_frames_hi; /* TX Frames sent */ 667 u32 tx_bytes_lo; /* TX Bytes sent */ 668 u32 tx_bytes_hi; /* TX Bytes sent */ 669 u32 link_status; /* Port P Link Status. 1:0 bit for port enabled. 670 1:1 bit for link good, 671 2:1 Set if link changed between last poll. */ 672 u32 tx_pfc_frames_lo; /* PFC Frames sent. */ 673 u32 tx_pfc_frames_hi; /* PFC Frames sent. */ 674 u32 rx_pfc_frames_lo; /* PFC Frames Received. */ 675 u32 rx_pfc_frames_hi; /* PFC Frames Received. */ 676 }; 677 678 #endif /* MAC_STATS_H */ 679 680