if (bp->fw_cap & BNXT_FW_CAP_ADV_FLOW_COUNTERS &&
bp->fw_cap & BNXT_FW_CAP_ADV_FLOW_MGMT &&
- bp->flow_xstat) {
+ BNXT_FLOW_XSTATS_EN(bp)) {
int j;
i = 0;
{
if (bp->fw_cap & BNXT_FW_CAP_ADV_FLOW_COUNTERS &&
bp->fw_cap & BNXT_FW_CAP_ADV_FLOW_MGMT &&
- bp->flow_xstat) {
+ BNXT_FLOW_XSTATS_EN(bp)) {
struct bnxt_xstats_name_off flow_bytes[bp->max_l2_ctx];
struct bnxt_xstats_name_off flow_pkts[bp->max_l2_ctx];
if (bp->fw_cap & BNXT_FW_CAP_ADV_FLOW_COUNTERS &&
bp->fw_cap & BNXT_FW_CAP_ADV_FLOW_MGMT &&
- bp->flow_xstat) {
+ BNXT_FLOW_XSTATS_EN(bp)) {
for (i = 0; i < bp->max_l2_ctx; i++) {
char buf[RTE_ETH_XSTATS_NAME_SIZE];
uint32_t out_rx_tbl_cnt = 0;
int i, rc = 0;
- in_rx_tbl = (uint32_t *)bp->rx_fc_in_tbl.va;
- out_rx_tbl = (uint64_t *)bp->rx_fc_out_tbl.va;
+ in_rx_tbl = (uint32_t *)bp->flow_stat->rx_fc_in_tbl.va;
+ out_rx_tbl = (uint64_t *)bp->flow_stat->rx_fc_out_tbl.va;
for (i = 0; i < in_flow_cnt; i++) {
if (!en_tbl[i])
struct rte_flow *flow;
uint16_t in_flow_tbl_cnt = 0;
struct bnxt_vnic_info *vnic = NULL;
- struct bnxt_filter_info *valid_en_tbl[bp->max_fc];
+ struct bnxt_filter_info *valid_en_tbl[bp->flow_stat->max_fc];
uint16_t counter_type = CFA_COUNTER_CFG_IN_COUNTER_TYPE_FC;
bnxt_acquire_flow_lock(bp);
continue;
valid_en_tbl[in_flow_tbl_cnt++] = flow->filter;
- if (in_flow_tbl_cnt >= bp->max_fc) {
+ if (in_flow_tbl_cnt >= bp->flow_stat->max_fc) {
rc = bnxt_update_fc_tbl(bp, counter_type,
valid_en_tbl,
in_flow_tbl_cnt);
}
}
- if (!in_flow_tbl_cnt)
+ if (!in_flow_tbl_cnt) {
+ bnxt_release_flow_lock(bp);
goto out;
+ }
rc = bnxt_update_fc_tbl(bp, counter_type, valid_en_tbl,
in_flow_tbl_cnt);