net/sfc: add pattern parsing stub to MAE backend
[dpdk.git] / drivers / net / bnxt / bnxt_stats.c
index cfe1932..cb7756d 100644 (file)
@@ -643,7 +643,8 @@ int bnxt_dev_xstats_get_op(struct rte_eth_dev *eth_dev,
        for (i = 0; i < RTE_DIM(bnxt_func_stats_strings); i++) {
                xstats[count].id = count;
                xstats[count].value =
-               rte_le_to_cpu_64(((uint64_t *)&func_qstats)[i]);
+                       rte_le_to_cpu_64(*(uint64_t *)((char *)&func_qstats +
+                                        bnxt_func_stats_strings[i].offset));
                count++;
        }
 
@@ -1008,8 +1009,10 @@ int bnxt_flow_stats_req(struct bnxt *bp)
                }
        }
 
-       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);