net/bnxt: expose some missing counters in port stats
[dpdk.git] / drivers / net / bnxt / bnxt_stats.c
index f486a56..40b496a 100644 (file)
@@ -81,6 +81,22 @@ static const struct bnxt_xstats_name_off bnxt_rx_stats_strings[] = {
                                rx_runt_bytes)},
        {"rx_runt_frames", offsetof(struct rx_port_stats,
                                rx_runt_frames)},
+       {"rx_pfc_ena_frames_pri0", offsetof(struct rx_port_stats,
+                               rx_pfc_ena_frames_pri0)},
+       {"rx_pfc_ena_frames_pri1", offsetof(struct rx_port_stats,
+                               rx_pfc_ena_frames_pri1)},
+       {"rx_pfc_ena_frames_pri2", offsetof(struct rx_port_stats,
+                               rx_pfc_ena_frames_pri2)},
+       {"rx_pfc_ena_frames_pri3", offsetof(struct rx_port_stats,
+                               rx_pfc_ena_frames_pri3)},
+       {"rx_pfc_ena_frames_pri4", offsetof(struct rx_port_stats,
+                               rx_pfc_ena_frames_pri4)},
+       {"rx_pfc_ena_frames_pri5", offsetof(struct rx_port_stats,
+                               rx_pfc_ena_frames_pri5)},
+       {"rx_pfc_ena_frames_pri6", offsetof(struct rx_port_stats,
+                               rx_pfc_ena_frames_pri6)},
+       {"rx_pfc_ena_frames_pri7", offsetof(struct rx_port_stats,
+                               rx_pfc_ena_frames_pri7)},
 };
 
 static const struct bnxt_xstats_name_off bnxt_tx_stats_strings[] = {
@@ -136,6 +152,22 @@ static const struct bnxt_xstats_name_off bnxt_tx_stats_strings[] = {
                                tx_total_collisions)},
        {"tx_bytes", offsetof(struct tx_port_stats,
                                tx_bytes)},
+       {"tx_pfc_ena_frames_pri0", offsetof(struct tx_port_stats,
+                               tx_pfc_ena_frames_pri0)},
+       {"tx_pfc_ena_frames_pri1", offsetof(struct tx_port_stats,
+                               tx_pfc_ena_frames_pri1)},
+       {"tx_pfc_ena_frames_pri2", offsetof(struct tx_port_stats,
+                               tx_pfc_ena_frames_pri2)},
+       {"tx_pfc_ena_frames_pri3", offsetof(struct tx_port_stats,
+                               tx_pfc_ena_frames_pri3)},
+       {"tx_pfc_ena_frames_pri4", offsetof(struct tx_port_stats,
+                               tx_pfc_ena_frames_pri4)},
+       {"tx_pfc_ena_frames_pri5", offsetof(struct tx_port_stats,
+                               tx_pfc_ena_frames_pri5)},
+       {"tx_pfc_ena_frames_pri6", offsetof(struct tx_port_stats,
+                               tx_pfc_ena_frames_pri6)},
+       {"tx_pfc_ena_frames_pri7", offsetof(struct tx_port_stats,
+                               tx_pfc_ena_frames_pri7)},
 };
 
 static const struct bnxt_xstats_name_off bnxt_func_stats_strings[] = {
@@ -575,7 +607,7 @@ int bnxt_dev_xstats_reset_op(struct rte_eth_dev *eth_dev)
        if (BNXT_VF(bp) || !BNXT_SINGLE_PF(bp) ||
            !(bp->flags & BNXT_FLAG_PORT_STATS)) {
                PMD_DRV_LOG(ERR, "Operation not supported\n");
-               ret = -ENOTSUP;
+               return -ENOTSUP;
        }
 
        ret = bnxt_hwrm_port_clr_stats(bp);