Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'standardized-ethtool-counters-for-nxp-enetc'

Vladimir Oltean says:

====================
Standardized ethtool counters for NXP ENETC

This is another preparation patch for the introduction of MAC Merge
Layer statistics, this time for the enetc driver (endpoint ports on the
NXP LS1028A). The same set of stats groups is supported as in the case
of the Felix DSA switch.
====================

Link: https://lore.kernel.org/r/20220909113800.55225-1-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+227 -114
+173 -62
drivers/net/ethernet/freescale/enetc/enetc_ethtool.c
··· 125 125 int reg; 126 126 char name[ETH_GSTRING_LEN]; 127 127 } enetc_port_counters[] = { 128 - { ENETC_PM0_REOCT, "MAC rx ethernet octets" }, 129 - { ENETC_PM0_RALN, "MAC rx alignment errors" }, 130 - { ENETC_PM0_RXPF, "MAC rx valid pause frames" }, 131 - { ENETC_PM0_RFRM, "MAC rx valid frames" }, 132 - { ENETC_PM0_RFCS, "MAC rx fcs errors" }, 133 - { ENETC_PM0_RVLAN, "MAC rx VLAN frames" }, 134 - { ENETC_PM0_RERR, "MAC rx frame errors" }, 135 - { ENETC_PM0_RUCA, "MAC rx unicast frames" }, 136 - { ENETC_PM0_RMCA, "MAC rx multicast frames" }, 137 - { ENETC_PM0_RBCA, "MAC rx broadcast frames" }, 138 - { ENETC_PM0_RDRP, "MAC rx dropped packets" }, 139 - { ENETC_PM0_RPKT, "MAC rx packets" }, 140 - { ENETC_PM0_RUND, "MAC rx undersized packets" }, 141 - { ENETC_PM0_R64, "MAC rx 64 byte packets" }, 142 - { ENETC_PM0_R127, "MAC rx 65-127 byte packets" }, 143 - { ENETC_PM0_R255, "MAC rx 128-255 byte packets" }, 144 - { ENETC_PM0_R511, "MAC rx 256-511 byte packets" }, 145 - { ENETC_PM0_R1023, "MAC rx 512-1023 byte packets" }, 146 - { ENETC_PM0_R1522, "MAC rx 1024-1522 byte packets" }, 147 - { ENETC_PM0_R1523X, "MAC rx 1523 to max-octet packets" }, 148 - { ENETC_PM0_ROVR, "MAC rx oversized packets" }, 149 - { ENETC_PM0_RJBR, "MAC rx jabber packets" }, 150 - { ENETC_PM0_RFRG, "MAC rx fragment packets" }, 151 - { ENETC_PM0_RCNP, "MAC rx control packets" }, 152 - { ENETC_PM0_RDRNTP, "MAC rx fifo drop" }, 153 - { ENETC_PM0_TEOCT, "MAC tx ethernet octets" }, 154 - { ENETC_PM0_TOCT, "MAC tx octets" }, 155 - { ENETC_PM0_TCRSE, "MAC tx carrier sense errors" }, 156 - { ENETC_PM0_TXPF, "MAC tx valid pause frames" }, 157 - { ENETC_PM0_TFRM, "MAC tx frames" }, 158 - { ENETC_PM0_TFCS, "MAC tx fcs errors" }, 159 - { ENETC_PM0_TVLAN, "MAC tx VLAN frames" }, 160 - { ENETC_PM0_TERR, "MAC tx frame errors" }, 161 - { ENETC_PM0_TUCA, "MAC tx unicast frames" }, 162 - { ENETC_PM0_TMCA, "MAC tx multicast frames" }, 163 - { ENETC_PM0_TBCA, "MAC tx broadcast frames" }, 164 - { ENETC_PM0_TPKT, "MAC tx packets" }, 165 - { ENETC_PM0_TUND, "MAC tx undersized packets" }, 166 - { ENETC_PM0_T64, "MAC tx 64 byte packets" }, 167 - { ENETC_PM0_T127, "MAC tx 65-127 byte packets" }, 168 - { ENETC_PM0_T255, "MAC tx 128-255 byte packets" }, 169 - { ENETC_PM0_T511, "MAC tx 256-511 byte packets" }, 170 - { ENETC_PM0_T1023, "MAC tx 512-1023 byte packets" }, 171 - { ENETC_PM0_T1522, "MAC tx 1024-1522 byte packets" }, 172 - { ENETC_PM0_T1523X, "MAC tx 1523 to max-octet packets" }, 173 - { ENETC_PM0_TCNP, "MAC tx control packets" }, 174 - { ENETC_PM0_TDFR, "MAC tx deferred packets" }, 175 - { ENETC_PM0_TMCOL, "MAC tx multiple collisions" }, 176 - { ENETC_PM0_TSCOL, "MAC tx single collisions" }, 177 - { ENETC_PM0_TLCOL, "MAC tx late collisions" }, 178 - { ENETC_PM0_TECOL, "MAC tx excessive collisions" }, 179 - { ENETC_UFDMF, "SI MAC nomatch u-cast discards" }, 180 - { ENETC_MFDMF, "SI MAC nomatch m-cast discards" }, 181 - { ENETC_PBFDSIR, "SI MAC nomatch b-cast discards" }, 182 - { ENETC_PUFDVFR, "SI VLAN nomatch u-cast discards" }, 183 - { ENETC_PMFDVFR, "SI VLAN nomatch m-cast discards" }, 184 - { ENETC_PBFDVFR, "SI VLAN nomatch b-cast discards" }, 185 - { ENETC_PFDMSAPR, "SI pruning discarded frames" }, 186 - { ENETC_PICDR(0), "ICM DR0 discarded frames" }, 187 - { ENETC_PICDR(1), "ICM DR1 discarded frames" }, 188 - { ENETC_PICDR(2), "ICM DR2 discarded frames" }, 189 - { ENETC_PICDR(3), "ICM DR3 discarded frames" }, 128 + { ENETC_PM_REOCT(0), "MAC rx ethernet octets" }, 129 + { ENETC_PM_RALN(0), "MAC rx alignment errors" }, 130 + { ENETC_PM_RXPF(0), "MAC rx valid pause frames" }, 131 + { ENETC_PM_RFRM(0), "MAC rx valid frames" }, 132 + { ENETC_PM_RFCS(0), "MAC rx fcs errors" }, 133 + { ENETC_PM_RVLAN(0), "MAC rx VLAN frames" }, 134 + { ENETC_PM_RERR(0), "MAC rx frame errors" }, 135 + { ENETC_PM_RUCA(0), "MAC rx unicast frames" }, 136 + { ENETC_PM_RMCA(0), "MAC rx multicast frames" }, 137 + { ENETC_PM_RBCA(0), "MAC rx broadcast frames" }, 138 + { ENETC_PM_RDRP(0), "MAC rx dropped packets" }, 139 + { ENETC_PM_RPKT(0), "MAC rx packets" }, 140 + { ENETC_PM_RUND(0), "MAC rx undersized packets" }, 141 + { ENETC_PM_R64(0), "MAC rx 64 byte packets" }, 142 + { ENETC_PM_R127(0), "MAC rx 65-127 byte packets" }, 143 + { ENETC_PM_R255(0), "MAC rx 128-255 byte packets" }, 144 + { ENETC_PM_R511(0), "MAC rx 256-511 byte packets" }, 145 + { ENETC_PM_R1023(0), "MAC rx 512-1023 byte packets" }, 146 + { ENETC_PM_R1522(0), "MAC rx 1024-1522 byte packets" }, 147 + { ENETC_PM_R1523X(0), "MAC rx 1523 to max-octet packets" }, 148 + { ENETC_PM_ROVR(0), "MAC rx oversized packets" }, 149 + { ENETC_PM_RJBR(0), "MAC rx jabber packets" }, 150 + { ENETC_PM_RFRG(0), "MAC rx fragment packets" }, 151 + { ENETC_PM_RCNP(0), "MAC rx control packets" }, 152 + { ENETC_PM_RDRNTP(0), "MAC rx fifo drop" }, 153 + { ENETC_PM_TEOCT(0), "MAC tx ethernet octets" }, 154 + { ENETC_PM_TOCT(0), "MAC tx octets" }, 155 + { ENETC_PM_TCRSE(0), "MAC tx carrier sense errors" }, 156 + { ENETC_PM_TXPF(0), "MAC tx valid pause frames" }, 157 + { ENETC_PM_TFRM(0), "MAC tx frames" }, 158 + { ENETC_PM_TFCS(0), "MAC tx fcs errors" }, 159 + { ENETC_PM_TVLAN(0), "MAC tx VLAN frames" }, 160 + { ENETC_PM_TERR(0), "MAC tx frame errors" }, 161 + { ENETC_PM_TUCA(0), "MAC tx unicast frames" }, 162 + { ENETC_PM_TMCA(0), "MAC tx multicast frames" }, 163 + { ENETC_PM_TBCA(0), "MAC tx broadcast frames" }, 164 + { ENETC_PM_TPKT(0), "MAC tx packets" }, 165 + { ENETC_PM_TUND(0), "MAC tx undersized packets" }, 166 + { ENETC_PM_T64(0), "MAC tx 64 byte packets" }, 167 + { ENETC_PM_T127(0), "MAC tx 65-127 byte packets" }, 168 + { ENETC_PM_T255(0), "MAC tx 128-255 byte packets" }, 169 + { ENETC_PM_T511(0), "MAC tx 256-511 byte packets" }, 170 + { ENETC_PM_T1023(0), "MAC tx 512-1023 byte packets" }, 171 + { ENETC_PM_T1522(0), "MAC tx 1024-1522 byte packets" }, 172 + { ENETC_PM_T1523X(0), "MAC tx 1523 to max-octet packets" }, 173 + { ENETC_PM_TCNP(0), "MAC tx control packets" }, 174 + { ENETC_PM_TDFR(0), "MAC tx deferred packets" }, 175 + { ENETC_PM_TMCOL(0), "MAC tx multiple collisions" }, 176 + { ENETC_PM_TSCOL(0), "MAC tx single collisions" }, 177 + { ENETC_PM_TLCOL(0), "MAC tx late collisions" }, 178 + { ENETC_PM_TECOL(0), "MAC tx excessive collisions" }, 179 + { ENETC_UFDMF, "SI MAC nomatch u-cast discards" }, 180 + { ENETC_MFDMF, "SI MAC nomatch m-cast discards" }, 181 + { ENETC_PBFDSIR, "SI MAC nomatch b-cast discards" }, 182 + { ENETC_PUFDVFR, "SI VLAN nomatch u-cast discards" }, 183 + { ENETC_PMFDVFR, "SI VLAN nomatch m-cast discards" }, 184 + { ENETC_PBFDVFR, "SI VLAN nomatch b-cast discards" }, 185 + { ENETC_PFDMSAPR, "SI pruning discarded frames" }, 186 + { ENETC_PICDR(0), "ICM DR0 discarded frames" }, 187 + { ENETC_PICDR(1), "ICM DR1 discarded frames" }, 188 + { ENETC_PICDR(2), "ICM DR2 discarded frames" }, 189 + { ENETC_PICDR(3), "ICM DR3 discarded frames" }, 190 190 }; 191 191 192 192 static const char rx_ring_stats[][ETH_GSTRING_LEN] = { ··· 299 299 300 300 for (i = 0; i < ARRAY_SIZE(enetc_port_counters); i++) 301 301 data[o++] = enetc_port_rd(hw, enetc_port_counters[i].reg); 302 + } 303 + 304 + static void enetc_get_pause_stats(struct net_device *ndev, 305 + struct ethtool_pause_stats *pause_stats) 306 + { 307 + struct enetc_ndev_priv *priv = netdev_priv(ndev); 308 + struct enetc_hw *hw = &priv->si->hw; 309 + 310 + pause_stats->tx_pause_frames = enetc_port_rd(hw, ENETC_PM_TXPF(0)); 311 + pause_stats->rx_pause_frames = enetc_port_rd(hw, ENETC_PM_RXPF(0)); 312 + } 313 + 314 + static void enetc_mac_stats(struct enetc_hw *hw, int mac, 315 + struct ethtool_eth_mac_stats *s) 316 + { 317 + s->FramesTransmittedOK = enetc_port_rd(hw, ENETC_PM_TFRM(mac)); 318 + s->SingleCollisionFrames = enetc_port_rd(hw, ENETC_PM_TSCOL(mac)); 319 + s->MultipleCollisionFrames = enetc_port_rd(hw, ENETC_PM_TMCOL(mac)); 320 + s->FramesReceivedOK = enetc_port_rd(hw, ENETC_PM_RFRM(mac)); 321 + s->FrameCheckSequenceErrors = enetc_port_rd(hw, ENETC_PM_RFCS(mac)); 322 + s->AlignmentErrors = enetc_port_rd(hw, ENETC_PM_RALN(mac)); 323 + s->OctetsTransmittedOK = enetc_port_rd(hw, ENETC_PM_TEOCT(mac)); 324 + s->FramesWithDeferredXmissions = enetc_port_rd(hw, ENETC_PM_TDFR(mac)); 325 + s->LateCollisions = enetc_port_rd(hw, ENETC_PM_TLCOL(mac)); 326 + s->FramesAbortedDueToXSColls = enetc_port_rd(hw, ENETC_PM_TECOL(mac)); 327 + s->FramesLostDueToIntMACXmitError = enetc_port_rd(hw, ENETC_PM_TERR(mac)); 328 + s->CarrierSenseErrors = enetc_port_rd(hw, ENETC_PM_TCRSE(mac)); 329 + s->OctetsReceivedOK = enetc_port_rd(hw, ENETC_PM_REOCT(mac)); 330 + s->FramesLostDueToIntMACRcvError = enetc_port_rd(hw, ENETC_PM_RDRNTP(mac)); 331 + s->MulticastFramesXmittedOK = enetc_port_rd(hw, ENETC_PM_TMCA(mac)); 332 + s->BroadcastFramesXmittedOK = enetc_port_rd(hw, ENETC_PM_TBCA(mac)); 333 + s->MulticastFramesReceivedOK = enetc_port_rd(hw, ENETC_PM_RMCA(mac)); 334 + s->BroadcastFramesReceivedOK = enetc_port_rd(hw, ENETC_PM_RBCA(mac)); 335 + } 336 + 337 + static void enetc_ctrl_stats(struct enetc_hw *hw, int mac, 338 + struct ethtool_eth_ctrl_stats *s) 339 + { 340 + s->MACControlFramesTransmitted = enetc_port_rd(hw, ENETC_PM_TCNP(mac)); 341 + s->MACControlFramesReceived = enetc_port_rd(hw, ENETC_PM_RCNP(mac)); 342 + } 343 + 344 + static const struct ethtool_rmon_hist_range enetc_rmon_ranges[] = { 345 + { 64, 64 }, 346 + { 65, 127 }, 347 + { 128, 255 }, 348 + { 256, 511 }, 349 + { 512, 1023 }, 350 + { 1024, 1522 }, 351 + { 1523, ENETC_MAC_MAXFRM_SIZE }, 352 + {}, 353 + }; 354 + 355 + static void enetc_rmon_stats(struct enetc_hw *hw, int mac, 356 + struct ethtool_rmon_stats *s, 357 + const struct ethtool_rmon_hist_range **ranges) 358 + { 359 + s->undersize_pkts = enetc_port_rd(hw, ENETC_PM_RUND(mac)); 360 + s->oversize_pkts = enetc_port_rd(hw, ENETC_PM_ROVR(mac)); 361 + s->fragments = enetc_port_rd(hw, ENETC_PM_RFRG(mac)); 362 + s->jabbers = enetc_port_rd(hw, ENETC_PM_RJBR(mac)); 363 + 364 + s->hist[0] = enetc_port_rd(hw, ENETC_PM_R64(mac)); 365 + s->hist[1] = enetc_port_rd(hw, ENETC_PM_R127(mac)); 366 + s->hist[2] = enetc_port_rd(hw, ENETC_PM_R255(mac)); 367 + s->hist[3] = enetc_port_rd(hw, ENETC_PM_R511(mac)); 368 + s->hist[4] = enetc_port_rd(hw, ENETC_PM_R1023(mac)); 369 + s->hist[5] = enetc_port_rd(hw, ENETC_PM_R1522(mac)); 370 + s->hist[6] = enetc_port_rd(hw, ENETC_PM_R1523X(mac)); 371 + 372 + s->hist_tx[0] = enetc_port_rd(hw, ENETC_PM_T64(mac)); 373 + s->hist_tx[1] = enetc_port_rd(hw, ENETC_PM_T127(mac)); 374 + s->hist_tx[2] = enetc_port_rd(hw, ENETC_PM_T255(mac)); 375 + s->hist_tx[3] = enetc_port_rd(hw, ENETC_PM_T511(mac)); 376 + s->hist_tx[4] = enetc_port_rd(hw, ENETC_PM_T1023(mac)); 377 + s->hist_tx[5] = enetc_port_rd(hw, ENETC_PM_T1522(mac)); 378 + s->hist_tx[6] = enetc_port_rd(hw, ENETC_PM_T1523X(mac)); 379 + 380 + *ranges = enetc_rmon_ranges; 381 + } 382 + 383 + static void enetc_get_eth_mac_stats(struct net_device *ndev, 384 + struct ethtool_eth_mac_stats *mac_stats) 385 + { 386 + struct enetc_ndev_priv *priv = netdev_priv(ndev); 387 + struct enetc_hw *hw = &priv->si->hw; 388 + 389 + enetc_mac_stats(hw, 0, mac_stats); 390 + } 391 + 392 + static void enetc_get_eth_ctrl_stats(struct net_device *ndev, 393 + struct ethtool_eth_ctrl_stats *ctrl_stats) 394 + { 395 + struct enetc_ndev_priv *priv = netdev_priv(ndev); 396 + struct enetc_hw *hw = &priv->si->hw; 397 + 398 + enetc_ctrl_stats(hw, 0, ctrl_stats); 399 + } 400 + 401 + static void enetc_get_rmon_stats(struct net_device *ndev, 402 + struct ethtool_rmon_stats *rmon_stats, 403 + const struct ethtool_rmon_hist_range **ranges) 404 + { 405 + struct enetc_ndev_priv *priv = netdev_priv(ndev); 406 + struct enetc_hw *hw = &priv->si->hw; 407 + 408 + enetc_rmon_stats(hw, 0, rmon_stats, ranges); 302 409 } 303 410 304 411 #define ENETC_RSSHASH_L3 (RXH_L2DA | RXH_VLAN | RXH_L3_PROTO | RXH_IP_SRC | \ ··· 873 766 .get_sset_count = enetc_get_sset_count, 874 767 .get_strings = enetc_get_strings, 875 768 .get_ethtool_stats = enetc_get_ethtool_stats, 769 + .get_pause_stats = enetc_get_pause_stats, 770 + .get_rmon_stats = enetc_get_rmon_stats, 771 + .get_eth_ctrl_stats = enetc_get_eth_ctrl_stats, 772 + .get_eth_mac_stats = enetc_get_eth_mac_stats, 876 773 .get_rxnfc = enetc_get_rxnfc, 877 774 .set_rxnfc = enetc_set_rxnfc, 878 775 .get_rxfh_key_size = enetc_get_rxfh_key_size,
+54 -52
drivers/net/ethernet/freescale/enetc/enetc_hw.h
··· 276 276 #define ENETC_PFMCAPR 0x1b38 277 277 #define ENETC_PFMCAPR_MSK GENMASK(15, 0) 278 278 279 - /* MAC counters */ 280 - #define ENETC_PM0_REOCT 0x8100 281 - #define ENETC_PM0_RALN 0x8110 282 - #define ENETC_PM0_RXPF 0x8118 283 - #define ENETC_PM0_RFRM 0x8120 284 - #define ENETC_PM0_RFCS 0x8128 285 - #define ENETC_PM0_RVLAN 0x8130 286 - #define ENETC_PM0_RERR 0x8138 287 - #define ENETC_PM0_RUCA 0x8140 288 - #define ENETC_PM0_RMCA 0x8148 289 - #define ENETC_PM0_RBCA 0x8150 290 - #define ENETC_PM0_RDRP 0x8158 291 - #define ENETC_PM0_RPKT 0x8160 292 - #define ENETC_PM0_RUND 0x8168 293 - #define ENETC_PM0_R64 0x8170 294 - #define ENETC_PM0_R127 0x8178 295 - #define ENETC_PM0_R255 0x8180 296 - #define ENETC_PM0_R511 0x8188 297 - #define ENETC_PM0_R1023 0x8190 298 - #define ENETC_PM0_R1522 0x8198 299 - #define ENETC_PM0_R1523X 0x81A0 300 - #define ENETC_PM0_ROVR 0x81A8 301 - #define ENETC_PM0_RJBR 0x81B0 302 - #define ENETC_PM0_RFRG 0x81B8 303 - #define ENETC_PM0_RCNP 0x81C0 304 - #define ENETC_PM0_RDRNTP 0x81C8 305 - #define ENETC_PM0_TEOCT 0x8200 306 - #define ENETC_PM0_TOCT 0x8208 307 - #define ENETC_PM0_TCRSE 0x8210 308 - #define ENETC_PM0_TXPF 0x8218 309 - #define ENETC_PM0_TFRM 0x8220 310 - #define ENETC_PM0_TFCS 0x8228 311 - #define ENETC_PM0_TVLAN 0x8230 312 - #define ENETC_PM0_TERR 0x8238 313 - #define ENETC_PM0_TUCA 0x8240 314 - #define ENETC_PM0_TMCA 0x8248 315 - #define ENETC_PM0_TBCA 0x8250 316 - #define ENETC_PM0_TPKT 0x8260 317 - #define ENETC_PM0_TUND 0x8268 318 - #define ENETC_PM0_T64 0x8270 319 - #define ENETC_PM0_T127 0x8278 320 - #define ENETC_PM0_T255 0x8280 321 - #define ENETC_PM0_T511 0x8288 322 - #define ENETC_PM0_T1023 0x8290 323 - #define ENETC_PM0_T1522 0x8298 324 - #define ENETC_PM0_T1523X 0x82A0 325 - #define ENETC_PM0_TCNP 0x82C0 326 - #define ENETC_PM0_TDFR 0x82D0 327 - #define ENETC_PM0_TMCOL 0x82D8 328 - #define ENETC_PM0_TSCOL 0x82E0 329 - #define ENETC_PM0_TLCOL 0x82E8 330 - #define ENETC_PM0_TECOL 0x82F0 279 + /* Port MAC counters: Port MAC 0 corresponds to the eMAC and 280 + * Port MAC 1 to the pMAC. 281 + */ 282 + #define ENETC_PM_REOCT(mac) (0x8100 + 0x1000 * (mac)) 283 + #define ENETC_PM_RALN(mac) (0x8110 + 0x1000 * (mac)) 284 + #define ENETC_PM_RXPF(mac) (0x8118 + 0x1000 * (mac)) 285 + #define ENETC_PM_RFRM(mac) (0x8120 + 0x1000 * (mac)) 286 + #define ENETC_PM_RFCS(mac) (0x8128 + 0x1000 * (mac)) 287 + #define ENETC_PM_RVLAN(mac) (0x8130 + 0x1000 * (mac)) 288 + #define ENETC_PM_RERR(mac) (0x8138 + 0x1000 * (mac)) 289 + #define ENETC_PM_RUCA(mac) (0x8140 + 0x1000 * (mac)) 290 + #define ENETC_PM_RMCA(mac) (0x8148 + 0x1000 * (mac)) 291 + #define ENETC_PM_RBCA(mac) (0x8150 + 0x1000 * (mac)) 292 + #define ENETC_PM_RDRP(mac) (0x8158 + 0x1000 * (mac)) 293 + #define ENETC_PM_RPKT(mac) (0x8160 + 0x1000 * (mac)) 294 + #define ENETC_PM_RUND(mac) (0x8168 + 0x1000 * (mac)) 295 + #define ENETC_PM_R64(mac) (0x8170 + 0x1000 * (mac)) 296 + #define ENETC_PM_R127(mac) (0x8178 + 0x1000 * (mac)) 297 + #define ENETC_PM_R255(mac) (0x8180 + 0x1000 * (mac)) 298 + #define ENETC_PM_R511(mac) (0x8188 + 0x1000 * (mac)) 299 + #define ENETC_PM_R1023(mac) (0x8190 + 0x1000 * (mac)) 300 + #define ENETC_PM_R1522(mac) (0x8198 + 0x1000 * (mac)) 301 + #define ENETC_PM_R1523X(mac) (0x81A0 + 0x1000 * (mac)) 302 + #define ENETC_PM_ROVR(mac) (0x81A8 + 0x1000 * (mac)) 303 + #define ENETC_PM_RJBR(mac) (0x81B0 + 0x1000 * (mac)) 304 + #define ENETC_PM_RFRG(mac) (0x81B8 + 0x1000 * (mac)) 305 + #define ENETC_PM_RCNP(mac) (0x81C0 + 0x1000 * (mac)) 306 + #define ENETC_PM_RDRNTP(mac) (0x81C8 + 0x1000 * (mac)) 307 + #define ENETC_PM_TEOCT(mac) (0x8200 + 0x1000 * (mac)) 308 + #define ENETC_PM_TOCT(mac) (0x8208 + 0x1000 * (mac)) 309 + #define ENETC_PM_TCRSE(mac) (0x8210 + 0x1000 * (mac)) 310 + #define ENETC_PM_TXPF(mac) (0x8218 + 0x1000 * (mac)) 311 + #define ENETC_PM_TFRM(mac) (0x8220 + 0x1000 * (mac)) 312 + #define ENETC_PM_TFCS(mac) (0x8228 + 0x1000 * (mac)) 313 + #define ENETC_PM_TVLAN(mac) (0x8230 + 0x1000 * (mac)) 314 + #define ENETC_PM_TERR(mac) (0x8238 + 0x1000 * (mac)) 315 + #define ENETC_PM_TUCA(mac) (0x8240 + 0x1000 * (mac)) 316 + #define ENETC_PM_TMCA(mac) (0x8248 + 0x1000 * (mac)) 317 + #define ENETC_PM_TBCA(mac) (0x8250 + 0x1000 * (mac)) 318 + #define ENETC_PM_TPKT(mac) (0x8260 + 0x1000 * (mac)) 319 + #define ENETC_PM_TUND(mac) (0x8268 + 0x1000 * (mac)) 320 + #define ENETC_PM_T64(mac) (0x8270 + 0x1000 * (mac)) 321 + #define ENETC_PM_T127(mac) (0x8278 + 0x1000 * (mac)) 322 + #define ENETC_PM_T255(mac) (0x8280 + 0x1000 * (mac)) 323 + #define ENETC_PM_T511(mac) (0x8288 + 0x1000 * (mac)) 324 + #define ENETC_PM_T1023(mac) (0x8290 + 0x1000 * (mac)) 325 + #define ENETC_PM_T1522(mac) (0x8298 + 0x1000 * (mac)) 326 + #define ENETC_PM_T1523X(mac) (0x82A0 + 0x1000 * (mac)) 327 + #define ENETC_PM_TCNP(mac) (0x82C0 + 0x1000 * (mac)) 328 + #define ENETC_PM_TDFR(mac) (0x82D0 + 0x1000 * (mac)) 329 + #define ENETC_PM_TMCOL(mac) (0x82D8 + 0x1000 * (mac)) 330 + #define ENETC_PM_TSCOL(mac) (0x82E0 + 0x1000 * (mac)) 331 + #define ENETC_PM_TLCOL(mac) (0x82E8 + 0x1000 * (mac)) 332 + #define ENETC_PM_TECOL(mac) (0x82F0 + 0x1000 * (mac)) 331 333 332 334 /* Port counters */ 333 335 #define ENETC_PICDR(n) (0x0700 + (n) * 8) /* n = [0..3] */