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.

net: mana: Expose additional hardware counters for drop and TC via ethtool.

Add support for reporting additional hardware counters for drop and
TC using the ethtool -S interface.

These counters include:

- Aggregate Rx/Tx drop counters
- Per-TC Rx/Tx packet counters
- Per-TC Rx/Tx byte counters
- Per-TC Rx/Tx pause frame counters

The counters are exposed using ethtool_ops->get_ethtool_stats and
ethtool_ops->get_strings. This feature/counters are not available
to all versions of hardware.

Signed-off-by: Dipayaan Roy <dipayanroy@linux.microsoft.com>
Reviewed-by: Subbaraya Sundeep <sbhatta@marvell.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Link: https://patch.msgid.link/20250609100103.GA7102@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Dipayaan Roy and committed by
Jakub Kicinski
c09ef59e a63bea11

+292 -8
+4 -2
drivers/net/ethernet/microsoft/mana/hw_channel.c
··· 2 2 /* Copyright (c) 2021, Microsoft Corporation. */ 3 3 4 4 #include <net/mana/gdma.h> 5 + #include <net/mana/mana.h> 5 6 #include <net/mana/hw_channel.h> 6 7 #include <linux/vmalloc.h> 7 8 ··· 891 890 } 892 891 893 892 if (ctx->status_code && ctx->status_code != GDMA_STATUS_MORE_ENTRIES) { 894 - dev_err(hwc->dev, "HWC: Failed hw_channel req: 0x%x\n", 895 - ctx->status_code); 893 + if (req_msg->req.msg_type != MANA_QUERY_PHY_STAT) 894 + dev_err(hwc->dev, "HWC: Failed hw_channel req: 0x%x\n", 895 + ctx->status_code); 896 896 err = -EPROTO; 897 897 goto out; 898 898 }
+85 -2
drivers/net/ethernet/microsoft/mana/mana_en.c
··· 774 774 err = mana_gd_send_request(gc, in_len, in_buf, out_len, 775 775 out_buf); 776 776 if (err || resp->status) { 777 - dev_err(dev, "Failed to send mana message: %d, 0x%x\n", 778 - err, resp->status); 777 + if (req->req.msg_type != MANA_QUERY_PHY_STAT) 778 + dev_err(dev, "Failed to send mana message: %d, 0x%x\n", 779 + err, resp->status); 779 780 return err ? err : -EPROTO; 780 781 } 781 782 ··· 2610 2609 apc->eth_stats.hc_tx_mcast_pkts = resp.hc_tx_mcast_pkts; 2611 2610 apc->eth_stats.hc_tx_mcast_bytes = resp.hc_tx_mcast_bytes; 2612 2611 apc->eth_stats.hc_tx_err_gdma = resp.tx_err_gdma; 2612 + } 2613 + 2614 + void mana_query_phy_stats(struct mana_port_context *apc) 2615 + { 2616 + struct mana_query_phy_stat_resp resp = {}; 2617 + struct mana_query_phy_stat_req req = {}; 2618 + struct net_device *ndev = apc->ndev; 2619 + int err; 2620 + 2621 + mana_gd_init_req_hdr(&req.hdr, MANA_QUERY_PHY_STAT, 2622 + sizeof(req), sizeof(resp)); 2623 + err = mana_send_request(apc->ac, &req, sizeof(req), &resp, 2624 + sizeof(resp)); 2625 + if (err) 2626 + return; 2627 + 2628 + err = mana_verify_resp_hdr(&resp.hdr, MANA_QUERY_PHY_STAT, 2629 + sizeof(resp)); 2630 + if (err || resp.hdr.status) { 2631 + netdev_err(ndev, 2632 + "Failed to query PHY stats: %d, resp:0x%x\n", 2633 + err, resp.hdr.status); 2634 + return; 2635 + } 2636 + 2637 + /* Aggregate drop counters */ 2638 + apc->phy_stats.rx_pkt_drop_phy = resp.rx_pkt_drop_phy; 2639 + apc->phy_stats.tx_pkt_drop_phy = resp.tx_pkt_drop_phy; 2640 + 2641 + /* Per TC traffic Counters */ 2642 + apc->phy_stats.rx_pkt_tc0_phy = resp.rx_pkt_tc0_phy; 2643 + apc->phy_stats.tx_pkt_tc0_phy = resp.tx_pkt_tc0_phy; 2644 + apc->phy_stats.rx_pkt_tc1_phy = resp.rx_pkt_tc1_phy; 2645 + apc->phy_stats.tx_pkt_tc1_phy = resp.tx_pkt_tc1_phy; 2646 + apc->phy_stats.rx_pkt_tc2_phy = resp.rx_pkt_tc2_phy; 2647 + apc->phy_stats.tx_pkt_tc2_phy = resp.tx_pkt_tc2_phy; 2648 + apc->phy_stats.rx_pkt_tc3_phy = resp.rx_pkt_tc3_phy; 2649 + apc->phy_stats.tx_pkt_tc3_phy = resp.tx_pkt_tc3_phy; 2650 + apc->phy_stats.rx_pkt_tc4_phy = resp.rx_pkt_tc4_phy; 2651 + apc->phy_stats.tx_pkt_tc4_phy = resp.tx_pkt_tc4_phy; 2652 + apc->phy_stats.rx_pkt_tc5_phy = resp.rx_pkt_tc5_phy; 2653 + apc->phy_stats.tx_pkt_tc5_phy = resp.tx_pkt_tc5_phy; 2654 + apc->phy_stats.rx_pkt_tc6_phy = resp.rx_pkt_tc6_phy; 2655 + apc->phy_stats.tx_pkt_tc6_phy = resp.tx_pkt_tc6_phy; 2656 + apc->phy_stats.rx_pkt_tc7_phy = resp.rx_pkt_tc7_phy; 2657 + apc->phy_stats.tx_pkt_tc7_phy = resp.tx_pkt_tc7_phy; 2658 + 2659 + /* Per TC byte Counters */ 2660 + apc->phy_stats.rx_byte_tc0_phy = resp.rx_byte_tc0_phy; 2661 + apc->phy_stats.tx_byte_tc0_phy = resp.tx_byte_tc0_phy; 2662 + apc->phy_stats.rx_byte_tc1_phy = resp.rx_byte_tc1_phy; 2663 + apc->phy_stats.tx_byte_tc1_phy = resp.tx_byte_tc1_phy; 2664 + apc->phy_stats.rx_byte_tc2_phy = resp.rx_byte_tc2_phy; 2665 + apc->phy_stats.tx_byte_tc2_phy = resp.tx_byte_tc2_phy; 2666 + apc->phy_stats.rx_byte_tc3_phy = resp.rx_byte_tc3_phy; 2667 + apc->phy_stats.tx_byte_tc3_phy = resp.tx_byte_tc3_phy; 2668 + apc->phy_stats.rx_byte_tc4_phy = resp.rx_byte_tc4_phy; 2669 + apc->phy_stats.tx_byte_tc4_phy = resp.tx_byte_tc4_phy; 2670 + apc->phy_stats.rx_byte_tc5_phy = resp.rx_byte_tc5_phy; 2671 + apc->phy_stats.tx_byte_tc5_phy = resp.tx_byte_tc5_phy; 2672 + apc->phy_stats.rx_byte_tc6_phy = resp.rx_byte_tc6_phy; 2673 + apc->phy_stats.tx_byte_tc6_phy = resp.tx_byte_tc6_phy; 2674 + apc->phy_stats.rx_byte_tc7_phy = resp.rx_byte_tc7_phy; 2675 + apc->phy_stats.tx_byte_tc7_phy = resp.tx_byte_tc7_phy; 2676 + 2677 + /* Per TC pause Counters */ 2678 + apc->phy_stats.rx_pause_tc0_phy = resp.rx_pause_tc0_phy; 2679 + apc->phy_stats.tx_pause_tc0_phy = resp.tx_pause_tc0_phy; 2680 + apc->phy_stats.rx_pause_tc1_phy = resp.rx_pause_tc1_phy; 2681 + apc->phy_stats.tx_pause_tc1_phy = resp.tx_pause_tc1_phy; 2682 + apc->phy_stats.rx_pause_tc2_phy = resp.rx_pause_tc2_phy; 2683 + apc->phy_stats.tx_pause_tc2_phy = resp.tx_pause_tc2_phy; 2684 + apc->phy_stats.rx_pause_tc3_phy = resp.rx_pause_tc3_phy; 2685 + apc->phy_stats.tx_pause_tc3_phy = resp.tx_pause_tc3_phy; 2686 + apc->phy_stats.rx_pause_tc4_phy = resp.rx_pause_tc4_phy; 2687 + apc->phy_stats.tx_pause_tc4_phy = resp.tx_pause_tc4_phy; 2688 + apc->phy_stats.rx_pause_tc5_phy = resp.rx_pause_tc5_phy; 2689 + apc->phy_stats.tx_pause_tc5_phy = resp.tx_pause_tc5_phy; 2690 + apc->phy_stats.rx_pause_tc6_phy = resp.rx_pause_tc6_phy; 2691 + apc->phy_stats.tx_pause_tc6_phy = resp.tx_pause_tc6_phy; 2692 + apc->phy_stats.rx_pause_tc7_phy = resp.rx_pause_tc7_phy; 2693 + apc->phy_stats.tx_pause_tc7_phy = resp.tx_pause_tc7_phy; 2613 2694 } 2614 2695 2615 2696 static int mana_init_port(struct net_device *ndev)
+72 -4
drivers/net/ethernet/microsoft/mana/mana_ethtool.c
··· 7 7 8 8 #include <net/mana/mana.h> 9 9 10 - static const struct { 10 + struct mana_stats_desc { 11 11 char name[ETH_GSTRING_LEN]; 12 12 u16 offset; 13 - } mana_eth_stats[] = { 13 + }; 14 + 15 + static const struct mana_stats_desc mana_eth_stats[] = { 14 16 {"stop_queue", offsetof(struct mana_ethtool_stats, stop_queue)}, 15 17 {"wake_queue", offsetof(struct mana_ethtool_stats, wake_queue)}, 16 18 {"hc_rx_discards_no_wqe", offsetof(struct mana_ethtool_stats, ··· 77 75 rx_cqe_unknown_type)}, 78 76 }; 79 77 78 + static const struct mana_stats_desc mana_phy_stats[] = { 79 + { "hc_rx_pkt_drop_phy", offsetof(struct mana_ethtool_phy_stats, rx_pkt_drop_phy) }, 80 + { "hc_tx_pkt_drop_phy", offsetof(struct mana_ethtool_phy_stats, tx_pkt_drop_phy) }, 81 + { "hc_tc0_rx_pkt_phy", offsetof(struct mana_ethtool_phy_stats, rx_pkt_tc0_phy) }, 82 + { "hc_tc0_rx_byte_phy", offsetof(struct mana_ethtool_phy_stats, rx_byte_tc0_phy) }, 83 + { "hc_tc0_tx_pkt_phy", offsetof(struct mana_ethtool_phy_stats, tx_pkt_tc0_phy) }, 84 + { "hc_tc0_tx_byte_phy", offsetof(struct mana_ethtool_phy_stats, tx_byte_tc0_phy) }, 85 + { "hc_tc1_rx_pkt_phy", offsetof(struct mana_ethtool_phy_stats, rx_pkt_tc1_phy) }, 86 + { "hc_tc1_rx_byte_phy", offsetof(struct mana_ethtool_phy_stats, rx_byte_tc1_phy) }, 87 + { "hc_tc1_tx_pkt_phy", offsetof(struct mana_ethtool_phy_stats, tx_pkt_tc1_phy) }, 88 + { "hc_tc1_tx_byte_phy", offsetof(struct mana_ethtool_phy_stats, tx_byte_tc1_phy) }, 89 + { "hc_tc2_rx_pkt_phy", offsetof(struct mana_ethtool_phy_stats, rx_pkt_tc2_phy) }, 90 + { "hc_tc2_rx_byte_phy", offsetof(struct mana_ethtool_phy_stats, rx_byte_tc2_phy) }, 91 + { "hc_tc2_tx_pkt_phy", offsetof(struct mana_ethtool_phy_stats, tx_pkt_tc2_phy) }, 92 + { "hc_tc2_tx_byte_phy", offsetof(struct mana_ethtool_phy_stats, tx_byte_tc2_phy) }, 93 + { "hc_tc3_rx_pkt_phy", offsetof(struct mana_ethtool_phy_stats, rx_pkt_tc3_phy) }, 94 + { "hc_tc3_rx_byte_phy", offsetof(struct mana_ethtool_phy_stats, rx_byte_tc3_phy) }, 95 + { "hc_tc3_tx_pkt_phy", offsetof(struct mana_ethtool_phy_stats, tx_pkt_tc3_phy) }, 96 + { "hc_tc3_tx_byte_phy", offsetof(struct mana_ethtool_phy_stats, tx_byte_tc3_phy) }, 97 + { "hc_tc4_rx_pkt_phy", offsetof(struct mana_ethtool_phy_stats, rx_pkt_tc4_phy) }, 98 + { "hc_tc4_rx_byte_phy", offsetof(struct mana_ethtool_phy_stats, rx_byte_tc4_phy) }, 99 + { "hc_tc4_tx_pkt_phy", offsetof(struct mana_ethtool_phy_stats, tx_pkt_tc4_phy) }, 100 + { "hc_tc4_tx_byte_phy", offsetof(struct mana_ethtool_phy_stats, tx_byte_tc4_phy) }, 101 + { "hc_tc5_rx_pkt_phy", offsetof(struct mana_ethtool_phy_stats, rx_pkt_tc5_phy) }, 102 + { "hc_tc5_rx_byte_phy", offsetof(struct mana_ethtool_phy_stats, rx_byte_tc5_phy) }, 103 + { "hc_tc5_tx_pkt_phy", offsetof(struct mana_ethtool_phy_stats, tx_pkt_tc5_phy) }, 104 + { "hc_tc5_tx_byte_phy", offsetof(struct mana_ethtool_phy_stats, tx_byte_tc5_phy) }, 105 + { "hc_tc6_rx_pkt_phy", offsetof(struct mana_ethtool_phy_stats, rx_pkt_tc6_phy) }, 106 + { "hc_tc6_rx_byte_phy", offsetof(struct mana_ethtool_phy_stats, rx_byte_tc6_phy) }, 107 + { "hc_tc6_tx_pkt_phy", offsetof(struct mana_ethtool_phy_stats, tx_pkt_tc6_phy) }, 108 + { "hc_tc6_tx_byte_phy", offsetof(struct mana_ethtool_phy_stats, tx_byte_tc6_phy) }, 109 + { "hc_tc7_rx_pkt_phy", offsetof(struct mana_ethtool_phy_stats, rx_pkt_tc7_phy) }, 110 + { "hc_tc7_rx_byte_phy", offsetof(struct mana_ethtool_phy_stats, rx_byte_tc7_phy) }, 111 + { "hc_tc7_tx_pkt_phy", offsetof(struct mana_ethtool_phy_stats, tx_pkt_tc7_phy) }, 112 + { "hc_tc7_tx_byte_phy", offsetof(struct mana_ethtool_phy_stats, tx_byte_tc7_phy) }, 113 + { "hc_tc0_rx_pause_phy", offsetof(struct mana_ethtool_phy_stats, rx_pause_tc0_phy) }, 114 + { "hc_tc0_tx_pause_phy", offsetof(struct mana_ethtool_phy_stats, tx_pause_tc0_phy) }, 115 + { "hc_tc1_rx_pause_phy", offsetof(struct mana_ethtool_phy_stats, rx_pause_tc1_phy) }, 116 + { "hc_tc1_tx_pause_phy", offsetof(struct mana_ethtool_phy_stats, tx_pause_tc1_phy) }, 117 + { "hc_tc2_rx_pause_phy", offsetof(struct mana_ethtool_phy_stats, rx_pause_tc2_phy) }, 118 + { "hc_tc2_tx_pause_phy", offsetof(struct mana_ethtool_phy_stats, tx_pause_tc2_phy) }, 119 + { "hc_tc3_rx_pause_phy", offsetof(struct mana_ethtool_phy_stats, rx_pause_tc3_phy) }, 120 + { "hc_tc3_tx_pause_phy", offsetof(struct mana_ethtool_phy_stats, tx_pause_tc3_phy) }, 121 + { "hc_tc4_rx_pause_phy", offsetof(struct mana_ethtool_phy_stats, rx_pause_tc4_phy) }, 122 + { "hc_tc4_tx_pause_phy", offsetof(struct mana_ethtool_phy_stats, tx_pause_tc4_phy) }, 123 + { "hc_tc5_rx_pause_phy", offsetof(struct mana_ethtool_phy_stats, rx_pause_tc5_phy) }, 124 + { "hc_tc5_tx_pause_phy", offsetof(struct mana_ethtool_phy_stats, tx_pause_tc5_phy) }, 125 + { "hc_tc6_rx_pause_phy", offsetof(struct mana_ethtool_phy_stats, rx_pause_tc6_phy) }, 126 + { "hc_tc6_tx_pause_phy", offsetof(struct mana_ethtool_phy_stats, tx_pause_tc6_phy) }, 127 + { "hc_tc7_rx_pause_phy", offsetof(struct mana_ethtool_phy_stats, rx_pause_tc7_phy) }, 128 + { "hc_tc7_tx_pause_phy", offsetof(struct mana_ethtool_phy_stats, tx_pause_tc7_phy) }, 129 + }; 130 + 80 131 static int mana_get_sset_count(struct net_device *ndev, int stringset) 81 132 { 82 133 struct mana_port_context *apc = netdev_priv(ndev); ··· 138 83 if (stringset != ETH_SS_STATS) 139 84 return -EINVAL; 140 85 141 - return ARRAY_SIZE(mana_eth_stats) + num_queues * 142 - (MANA_STATS_RX_COUNT + MANA_STATS_TX_COUNT); 86 + return ARRAY_SIZE(mana_eth_stats) + ARRAY_SIZE(mana_phy_stats) + 87 + num_queues * (MANA_STATS_RX_COUNT + MANA_STATS_TX_COUNT); 143 88 } 144 89 145 90 static void mana_get_strings(struct net_device *ndev, u32 stringset, u8 *data) ··· 153 98 154 99 for (i = 0; i < ARRAY_SIZE(mana_eth_stats); i++) 155 100 ethtool_puts(&data, mana_eth_stats[i].name); 101 + 102 + for (i = 0; i < ARRAY_SIZE(mana_phy_stats); i++) 103 + ethtool_puts(&data, mana_phy_stats[i].name); 156 104 157 105 for (i = 0; i < num_queues; i++) { 158 106 ethtool_sprintf(&data, "rx_%d_packets", i); ··· 186 128 struct mana_port_context *apc = netdev_priv(ndev); 187 129 unsigned int num_queues = apc->num_queues; 188 130 void *eth_stats = &apc->eth_stats; 131 + void *phy_stats = &apc->phy_stats; 189 132 struct mana_stats_rx *rx_stats; 190 133 struct mana_stats_tx *tx_stats; 191 134 unsigned int start; ··· 210 151 /* we call mana function to update stats from GDMA */ 211 152 mana_query_gf_stats(apc); 212 153 154 + /* We call this mana function to get the phy stats from GDMA and includes 155 + * aggregate tx/rx drop counters, Per-TC(Traffic Channel) tx/rx and pause 156 + * counters. 157 + */ 158 + mana_query_phy_stats(apc); 159 + 213 160 for (q = 0; q < ARRAY_SIZE(mana_eth_stats); q++) 214 161 data[i++] = *(u64 *)(eth_stats + mana_eth_stats[q].offset); 162 + 163 + for (q = 0; q < ARRAY_SIZE(mana_phy_stats); q++) 164 + data[i++] = *(u64 *)(phy_stats + mana_phy_stats[q].offset); 215 165 216 166 for (q = 0; q < num_queues; q++) { 217 167 rx_stats = &apc->rxqs[q]->stats;
+131
include/net/mana/mana.h
··· 404 404 u64 rx_cqe_unknown_type; 405 405 }; 406 406 407 + struct mana_ethtool_phy_stats { 408 + /* Drop Counters */ 409 + u64 rx_pkt_drop_phy; 410 + u64 tx_pkt_drop_phy; 411 + 412 + /* Per TC traffic Counters */ 413 + u64 rx_pkt_tc0_phy; 414 + u64 tx_pkt_tc0_phy; 415 + u64 rx_pkt_tc1_phy; 416 + u64 tx_pkt_tc1_phy; 417 + u64 rx_pkt_tc2_phy; 418 + u64 tx_pkt_tc2_phy; 419 + u64 rx_pkt_tc3_phy; 420 + u64 tx_pkt_tc3_phy; 421 + u64 rx_pkt_tc4_phy; 422 + u64 tx_pkt_tc4_phy; 423 + u64 rx_pkt_tc5_phy; 424 + u64 tx_pkt_tc5_phy; 425 + u64 rx_pkt_tc6_phy; 426 + u64 tx_pkt_tc6_phy; 427 + u64 rx_pkt_tc7_phy; 428 + u64 tx_pkt_tc7_phy; 429 + 430 + u64 rx_byte_tc0_phy; 431 + u64 tx_byte_tc0_phy; 432 + u64 rx_byte_tc1_phy; 433 + u64 tx_byte_tc1_phy; 434 + u64 rx_byte_tc2_phy; 435 + u64 tx_byte_tc2_phy; 436 + u64 rx_byte_tc3_phy; 437 + u64 tx_byte_tc3_phy; 438 + u64 rx_byte_tc4_phy; 439 + u64 tx_byte_tc4_phy; 440 + u64 rx_byte_tc5_phy; 441 + u64 tx_byte_tc5_phy; 442 + u64 rx_byte_tc6_phy; 443 + u64 tx_byte_tc6_phy; 444 + u64 rx_byte_tc7_phy; 445 + u64 tx_byte_tc7_phy; 446 + 447 + /* Per TC pause Counters */ 448 + u64 rx_pause_tc0_phy; 449 + u64 tx_pause_tc0_phy; 450 + u64 rx_pause_tc1_phy; 451 + u64 tx_pause_tc1_phy; 452 + u64 rx_pause_tc2_phy; 453 + u64 tx_pause_tc2_phy; 454 + u64 rx_pause_tc3_phy; 455 + u64 tx_pause_tc3_phy; 456 + u64 rx_pause_tc4_phy; 457 + u64 tx_pause_tc4_phy; 458 + u64 rx_pause_tc5_phy; 459 + u64 tx_pause_tc5_phy; 460 + u64 rx_pause_tc6_phy; 461 + u64 tx_pause_tc6_phy; 462 + u64 rx_pause_tc7_phy; 463 + u64 tx_pause_tc7_phy; 464 + }; 465 + 407 466 struct mana_context { 408 467 struct gdma_dev *gdma_dev; 409 468 ··· 533 474 534 475 struct mana_ethtool_stats eth_stats; 535 476 477 + struct mana_ethtool_phy_stats phy_stats; 478 + 536 479 /* Debugfs */ 537 480 struct dentry *mana_port_debugfs; 538 481 }; ··· 562 501 void mana_chn_setxdp(struct mana_port_context *apc, struct bpf_prog *prog); 563 502 int mana_bpf(struct net_device *ndev, struct netdev_bpf *bpf); 564 503 void mana_query_gf_stats(struct mana_port_context *apc); 504 + void mana_query_phy_stats(struct mana_port_context *apc); 565 505 int mana_pre_alloc_rxbufs(struct mana_port_context *apc, int mtu, int num_queues); 566 506 void mana_pre_dealloc_rxbufs(struct mana_port_context *apc); 567 507 ··· 589 527 MANA_FENCE_RQ = 0x20006, 590 528 MANA_CONFIG_VPORT_RX = 0x20007, 591 529 MANA_QUERY_VPORT_CONFIG = 0x20008, 530 + MANA_QUERY_PHY_STAT = 0x2000c, 592 531 593 532 /* Privileged commands for the PF mode */ 594 533 MANA_REGISTER_FILTER = 0x28000, ··· 750 687 u64 hc_tx_mcast_bytes; 751 688 /* tx error */ 752 689 u64 tx_err_gdma; 690 + }; /* HW DATA */ 691 + 692 + /* Query phy stats */ 693 + struct mana_query_phy_stat_req { 694 + struct gdma_req_hdr hdr; 695 + u64 req_stats; 696 + }; /* HW DATA */ 697 + 698 + struct mana_query_phy_stat_resp { 699 + struct gdma_resp_hdr hdr; 700 + u64 reported_stats; 701 + 702 + /* Aggregate Drop Counters */ 703 + u64 rx_pkt_drop_phy; 704 + u64 tx_pkt_drop_phy; 705 + 706 + /* Per TC(Traffic class) traffic Counters */ 707 + u64 rx_pkt_tc0_phy; 708 + u64 tx_pkt_tc0_phy; 709 + u64 rx_pkt_tc1_phy; 710 + u64 tx_pkt_tc1_phy; 711 + u64 rx_pkt_tc2_phy; 712 + u64 tx_pkt_tc2_phy; 713 + u64 rx_pkt_tc3_phy; 714 + u64 tx_pkt_tc3_phy; 715 + u64 rx_pkt_tc4_phy; 716 + u64 tx_pkt_tc4_phy; 717 + u64 rx_pkt_tc5_phy; 718 + u64 tx_pkt_tc5_phy; 719 + u64 rx_pkt_tc6_phy; 720 + u64 tx_pkt_tc6_phy; 721 + u64 rx_pkt_tc7_phy; 722 + u64 tx_pkt_tc7_phy; 723 + 724 + u64 rx_byte_tc0_phy; 725 + u64 tx_byte_tc0_phy; 726 + u64 rx_byte_tc1_phy; 727 + u64 tx_byte_tc1_phy; 728 + u64 rx_byte_tc2_phy; 729 + u64 tx_byte_tc2_phy; 730 + u64 rx_byte_tc3_phy; 731 + u64 tx_byte_tc3_phy; 732 + u64 rx_byte_tc4_phy; 733 + u64 tx_byte_tc4_phy; 734 + u64 rx_byte_tc5_phy; 735 + u64 tx_byte_tc5_phy; 736 + u64 rx_byte_tc6_phy; 737 + u64 tx_byte_tc6_phy; 738 + u64 rx_byte_tc7_phy; 739 + u64 tx_byte_tc7_phy; 740 + 741 + /* Per TC(Traffic Class) pause Counters */ 742 + u64 rx_pause_tc0_phy; 743 + u64 tx_pause_tc0_phy; 744 + u64 rx_pause_tc1_phy; 745 + u64 tx_pause_tc1_phy; 746 + u64 rx_pause_tc2_phy; 747 + u64 tx_pause_tc2_phy; 748 + u64 rx_pause_tc3_phy; 749 + u64 tx_pause_tc3_phy; 750 + u64 rx_pause_tc4_phy; 751 + u64 tx_pause_tc4_phy; 752 + u64 rx_pause_tc5_phy; 753 + u64 tx_pause_tc5_phy; 754 + u64 rx_pause_tc6_phy; 755 + u64 tx_pause_tc6_phy; 756 + u64 rx_pause_tc7_phy; 757 + u64 tx_pause_tc7_phy; 753 758 }; /* HW DATA */ 754 759 755 760 /* Configure vPort Rx Steering */