struct bnxt_ctx_mem_buf_info tx_fc_out_tbl;
};
+struct bnxt_ring_stats {
+ /* Number of transmitted unicast packets */
+ uint64_t tx_ucast_pkts;
+ /* Number of transmitted multicast packets */
+ uint64_t tx_mcast_pkts;
+ /* Number of transmitted broadcast packets */
+ uint64_t tx_bcast_pkts;
+ /* Number of packets discarded in transmit path */
+ uint64_t tx_discard_pkts;
+ /* Number of packets in transmit path with error */
+ uint64_t tx_error_pkts;
+ /* Number of transmitted bytes for unicast traffic */
+ uint64_t tx_ucast_bytes;
+ /* Number of transmitted bytes for multicast traffic */
+ uint64_t tx_mcast_bytes;
+ /* Number of transmitted bytes for broadcast traffic */
+ uint64_t tx_bcast_bytes;
+ /* Number of received unicast packets */
+ uint64_t rx_ucast_pkts;
+ /* Number of received multicast packets */
+ uint64_t rx_mcast_pkts;
+ /* Number of received broadcast packets */
+ uint64_t rx_bcast_pkts;
+ /* Number of packets discarded in receive path */
+ uint64_t rx_discard_pkts;
+ /* Number of packets in receive path with errors */
+ uint64_t rx_error_pkts;
+ /* Number of received bytes for unicast traffic */
+ uint64_t rx_ucast_bytes;
+ /* Number of received bytes for multicast traffic */
+ uint64_t rx_mcast_bytes;
+ /* Number of received bytes for broadcast traffic */
+ uint64_t rx_bcast_bytes;
+ /* Number of aggregated unicast packets */
+ uint64_t rx_agg_pkts;
+ /* Number of aggregated unicast bytes */
+ uint64_t rx_agg_bytes;
+ /* Number of aggregation events */
+ uint64_t rx_agg_events;
+ /* Number of aborted aggregations */
+ uint64_t rx_agg_aborts;
+};
+
struct bnxt {
void *bar0;
#define BNXT_FLAG_RX_VECTOR_PKT_MODE BIT(24)
#define BNXT_FLAG_FLOW_XSTATS_EN BIT(25)
#define BNXT_FLAG_DFLT_MAC_SET BIT(26)
-#define BNXT_FLAG_TRUFLOW_EN BIT(27)
-#define BNXT_FLAG_GFID_ENABLE BIT(28)
-#define BNXT_FLAG_RFS_NEEDS_VNIC BIT(29)
-#define BNXT_FLAG_FLOW_CFA_RFS_RING_TBL_IDX_V2 BIT(30)
+#define BNXT_FLAG_GFID_ENABLE BIT(27)
+#define BNXT_FLAG_RFS_NEEDS_VNIC BIT(28)
+#define BNXT_FLAG_FLOW_CFA_RFS_RING_TBL_IDX_V2 BIT(29)
#define BNXT_RFS_NEEDS_VNIC(bp) ((bp)->flags & BNXT_FLAG_RFS_NEEDS_VNIC)
#define BNXT_PF(bp) (!((bp)->flags & BNXT_FLAG_VF))
#define BNXT_VF(bp) ((bp)->flags & BNXT_FLAG_VF)
#define BNXT_HAS_RING_GRPS(bp) (!BNXT_CHIP_P5(bp))
#define BNXT_FLOW_XSTATS_EN(bp) ((bp)->flags & BNXT_FLAG_FLOW_XSTATS_EN)
#define BNXT_HAS_DFLT_MAC_SET(bp) ((bp)->flags & BNXT_FLAG_DFLT_MAC_SET)
-#define BNXT_TRUFLOW_EN(bp) ((bp)->flags & BNXT_FLAG_TRUFLOW_EN)
#define BNXT_GFID_ENABLED(bp) ((bp)->flags & BNXT_FLAG_GFID_ENABLE)
uint32_t flags2;
#define BNXT_FW_CAP_ADV_FLOW_MGMT BIT(5)
#define BNXT_FW_CAP_ADV_FLOW_COUNTERS BIT(6)
#define BNXT_FW_CAP_LINK_ADMIN BIT(7)
+#define BNXT_FW_CAP_TRUFLOW_EN BIT(8)
+#define BNXT_TRUFLOW_EN(bp) ((bp)->fw_cap & BNXT_FW_CAP_TRUFLOW_EN)
pthread_mutex_t flow_lock;
struct bnxt_flow_stat_info *flow_stat;
uint16_t max_num_kflows;
uint16_t tx_cfa_action;
+ struct bnxt_ring_stats *prev_rx_ring_stats;
+ struct bnxt_ring_stats *prev_tx_ring_stats;
};
static
inline uint16_t bnxt_max_rings(struct bnxt *bp)
{
- struct rte_eth_conf *dev_conf = &bp->eth_dev->data->dev_conf;
uint16_t max_tx_rings = bp->max_tx_rings;
uint16_t max_rx_rings = bp->max_rx_rings;
uint16_t max_cp_rings = bp->max_cp_rings;
bp->max_stat_ctx / 2U);
}
- if (BNXT_CHIP_P5(bp)) {
- /* RSS table size in Thor is 512.
- * Cap max Rx rings to the same value for RSS.
- * For non-RSS case cap it to the max VNIC count.
- */
- if (dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG)
- max_rx_rings = RTE_MIN(max_rx_rings,
- BNXT_RSS_TBL_SIZE_P5);
- else
- max_rx_rings = RTE_MIN(max_rx_rings, bp->max_vnics);
- }
+ /*
+ * RSS table size in Thor is 512.
+ * Cap max Rx rings to the same value for RSS.
+ */
+ if (BNXT_CHIP_P5(bp))
+ max_rx_rings = RTE_MIN(max_rx_rings, BNXT_RSS_TBL_SIZE_P5);
max_tx_rings = RTE_MIN(max_tx_rings, max_rx_rings);
if (max_cp_rings > BNXT_NUM_ASYNC_CPR(bp))