Lines Matching full:cpr
1035 struct bnxt_cp_ring_info *cpr, in bnxt_get_agg() argument
1042 &cpr->cp_desc_ring[CP_RING(cp_cons)][CP_IDX(cp_cons)]; in bnxt_get_agg()
1055 static void bnxt_reuse_rx_agg_bufs(struct bnxt_cp_ring_info *cpr, u16 idx, in bnxt_reuse_rx_agg_bufs() argument
1058 struct bnxt_napi *bnapi = cpr->bnapi; in bnxt_reuse_rx_agg_bufs()
1079 agg = bnxt_get_agg(bp, cpr, idx, start + i); in bnxt_reuse_rx_agg_bufs()
1222 struct bnxt_cp_ring_info *cpr, in __bnxt_rx_agg_pages() argument
1227 struct bnxt_napi *bnapi = cpr->bnapi; in __bnxt_rx_agg_pages()
1248 agg = bnxt_get_agg(bp, cpr, idx, i); in __bnxt_rx_agg_pages()
1278 bnxt_reuse_rx_agg_bufs(cpr, idx, i, agg_bufs - i, tpa); in __bnxt_rx_agg_pages()
1293 struct bnxt_cp_ring_info *cpr, in bnxt_rx_agg_pages_skb() argument
1300 total_frag_len = __bnxt_rx_agg_pages(bp, cpr, shinfo, idx, in bnxt_rx_agg_pages_skb()
1315 struct bnxt_cp_ring_info *cpr, in bnxt_rx_agg_pages_xdp() argument
1325 total_frag_len = __bnxt_rx_agg_pages(bp, cpr, shinfo, in bnxt_rx_agg_pages_xdp()
1335 static int bnxt_agg_bufs_valid(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, in bnxt_agg_bufs_valid() argument
1344 &cpr->cp_desc_ring[CP_RING(last)][CP_IDX(last)]; in bnxt_agg_bufs_valid()
1406 static int bnxt_discard_rx(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, in bnxt_discard_rx() argument
1429 if (!bnxt_agg_bufs_valid(bp, cpr, agg_bufs, &tmp_raw_cons)) in bnxt_discard_rx()
1576 static void bnxt_abort_tpa(struct bnxt_cp_ring_info *cpr, u16 idx, u32 agg_bufs) in bnxt_abort_tpa() argument
1579 bnxt_reuse_rx_agg_bufs(cpr, idx, 0, agg_bufs, true); in bnxt_abort_tpa()
1790 struct bnxt_cp_ring_info *cpr, in bnxt_tpa_end() argument
1796 struct bnxt_napi *bnapi = cpr->bnapi; in bnxt_tpa_end()
1809 int rc = bnxt_discard_rx(bp, cpr, raw_cons, tpa_end); in bnxt_tpa_end()
1837 if (!bnxt_agg_bufs_valid(bp, cpr, agg_bufs, raw_cons)) in bnxt_tpa_end()
1852 bnxt_abort_tpa(cpr, idx, agg_bufs); in bnxt_tpa_end()
1862 bnxt_abort_tpa(cpr, idx, agg_bufs); in bnxt_tpa_end()
1863 cpr->sw_stats->rx.rx_oom_discards += 1; in bnxt_tpa_end()
1873 bnxt_abort_tpa(cpr, idx, agg_bufs); in bnxt_tpa_end()
1874 cpr->sw_stats->rx.rx_oom_discards += 1; in bnxt_tpa_end()
1888 bnxt_abort_tpa(cpr, idx, agg_bufs); in bnxt_tpa_end()
1889 cpr->sw_stats->rx.rx_oom_discards += 1; in bnxt_tpa_end()
1898 skb = bnxt_rx_agg_pages_skb(bp, cpr, skb, idx, agg_bufs, true); in bnxt_tpa_end()
1901 cpr->sw_stats->rx.rx_oom_discards += 1; in bnxt_tpa_end()
2047 static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, in bnxt_rx_pkt() argument
2050 struct bnxt_napi *bnapi = cpr->bnapi; in bnxt_rx_pkt()
2071 &cpr->cp_desc_ring[CP_RING(cp_cons)][CP_IDX(cp_cons)]; in bnxt_rx_pkt()
2083 &cpr->cp_desc_ring[CP_RING(cp_cons)][CP_IDX(cp_cons)]; in bnxt_rx_pkt()
2104 skb = bnxt_tpa_end(bp, cpr, &tmp_raw_cons, in bnxt_rx_pkt()
2122 int rc1 = bnxt_discard_rx(bp, cpr, &tmp_raw_cons, rxcmp); in bnxt_rx_pkt()
2142 if (!bnxt_agg_bufs_valid(bp, cpr, agg_bufs, &tmp_raw_cons)) in bnxt_rx_pkt()
2156 bnxt_reuse_rx_agg_bufs(cpr, cp_cons, 0, agg_bufs, in bnxt_rx_pkt()
2179 u32 frag_len = bnxt_rx_agg_pages_xdp(bp, cpr, &xdp, in bnxt_rx_pkt()
2211 bnxt_reuse_rx_agg_bufs(cpr, cp_cons, 0, in bnxt_rx_pkt()
2233 skb = bnxt_rx_agg_pages_skb(bp, cpr, skb, cp_cons, agg_bufs, false); in bnxt_rx_pkt()
2305 cpr->rx_packets += 1; in bnxt_rx_pkt()
2306 cpr->rx_bytes += len; in bnxt_rx_pkt()
2318 cpr->sw_stats->rx.rx_oom_discards += 1; in bnxt_rx_pkt()
2327 struct bnxt_cp_ring_info *cpr, in bnxt_force_rx_discard() argument
2339 &cpr->cp_desc_ring[CP_RING(cp_cons)][CP_IDX(cp_cons)]; in bnxt_force_rx_discard()
2344 &cpr->cp_desc_ring[CP_RING(cp_cons)][CP_IDX(cp_cons)]; in bnxt_force_rx_discard()
2365 rc = bnxt_rx_pkt(bp, cpr, raw_cons, event); in bnxt_force_rx_discard()
2367 cpr->sw_stats->rx.rx_netpoll_discards += 1; in bnxt_force_rx_discard()
2936 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_msix() local
2937 u32 cons = RING_CMP(cpr->cp_raw_cons); in bnxt_msix()
2939 cpr->event_ctr++; in bnxt_msix()
2940 prefetch(&cpr->cp_desc_ring[CP_RING(cons)][CP_IDX(cons)]); in bnxt_msix()
2945 static inline int bnxt_has_work(struct bnxt *bp, struct bnxt_cp_ring_info *cpr) in bnxt_has_work() argument
2947 u32 raw_cons = cpr->cp_raw_cons; in bnxt_has_work()
2951 txcmp = &cpr->cp_desc_ring[CP_RING(cons)][CP_IDX(cons)]; in bnxt_has_work()
2956 static int __bnxt_poll_work(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, in __bnxt_poll_work() argument
2959 struct bnxt_napi *bnapi = cpr->bnapi; in __bnxt_poll_work()
2960 u32 raw_cons = cpr->cp_raw_cons; in __bnxt_poll_work()
2966 cpr->has_more_work = 0; in __bnxt_poll_work()
2967 cpr->had_work_done = 1; in __bnxt_poll_work()
2973 txcmp = &cpr->cp_desc_ring[CP_RING(cons)][CP_IDX(cons)]; in __bnxt_poll_work()
3002 cpr->has_more_work = 1; in __bnxt_poll_work()
3010 rc = bnxt_rx_pkt(bp, cpr, &raw_cons, &event); in __bnxt_poll_work()
3012 rc = bnxt_force_rx_discard(bp, cpr, &raw_cons, in __bnxt_poll_work()
3033 cpr->has_more_work = 1; in __bnxt_poll_work()
3054 cpr->cp_raw_cons = raw_cons; in __bnxt_poll_work()
3079 static int bnxt_poll_work(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, in bnxt_poll_work() argument
3082 struct bnxt_napi *bnapi = cpr->bnapi; in bnxt_poll_work()
3085 rx_pkts = __bnxt_poll_work(bp, cpr, budget); in bnxt_poll_work()
3091 bnxt_db_cq(bp, &cpr->cp_db, cpr->cp_raw_cons); in bnxt_poll_work()
3101 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_poll_nitroa0() local
3106 u32 raw_cons = cpr->cp_raw_cons; in bnxt_poll_nitroa0()
3115 txcmp = &cpr->cp_desc_ring[CP_RING(cp_cons)][CP_IDX(cp_cons)]; in bnxt_poll_nitroa0()
3128 &cpr->cp_desc_ring[CP_RING(cp_cons)][CP_IDX(cp_cons)]; in bnxt_poll_nitroa0()
3137 rc = bnxt_rx_pkt(bp, cpr, &raw_cons, &event); in bnxt_poll_nitroa0()
3157 cpr->cp_raw_cons = raw_cons; in bnxt_poll_nitroa0()
3158 BNXT_DB_CQ(&cpr->cp_db, cpr->cp_raw_cons); in bnxt_poll_nitroa0()
3166 if (!bnxt_has_work(bp, cpr) && rx_pkts < budget) { in bnxt_poll_nitroa0()
3168 BNXT_DB_CQ_ARM(&cpr->cp_db, cpr->cp_raw_cons); in bnxt_poll_nitroa0()
3177 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_poll() local
3185 work_done += bnxt_poll_work(bp, cpr, budget - work_done); in bnxt_poll()
3189 BNXT_DB_CQ_ARM(&cpr->cp_db, cpr->cp_raw_cons); in bnxt_poll()
3193 if (!bnxt_has_work(bp, cpr)) { in bnxt_poll()
3195 BNXT_DB_CQ_ARM(&cpr->cp_db, cpr->cp_raw_cons); in bnxt_poll()
3202 dim_update_sample(cpr->event_ctr, in bnxt_poll()
3203 cpr->rx_packets, in bnxt_poll()
3204 cpr->rx_bytes, in bnxt_poll()
3206 net_dim(&cpr->dim, &dim_sample); in bnxt_poll()
3213 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in __bnxt_poll_cqs() local
3216 for (i = 0; i < cpr->cp_ring_count; i++) { in __bnxt_poll_cqs()
3217 struct bnxt_cp_ring_info *cpr2 = &cpr->cp_ring_arr[i]; in __bnxt_poll_cqs()
3222 cpr->has_more_work |= cpr2->has_more_work; in __bnxt_poll_cqs()
3231 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in __bnxt_poll_cqs_done() local
3234 for (i = 0; i < cpr->cp_ring_count; i++) { in __bnxt_poll_cqs_done()
3235 struct bnxt_cp_ring_info *cpr2 = &cpr->cp_ring_arr[i]; in __bnxt_poll_cqs_done()
3259 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_poll_p5() local
3261 u32 raw_cons = cpr->cp_raw_cons; in bnxt_poll_p5()
3271 if (cpr->has_more_work) { in bnxt_poll_p5()
3272 cpr->has_more_work = 0; in bnxt_poll_p5()
3279 nqcmp = &cpr->nq_desc_ring[CP_RING(cons)][CP_IDX(cons)]; in bnxt_poll_p5()
3282 if (cpr->has_more_work) in bnxt_poll_p5()
3287 cpr->cp_raw_cons = raw_cons; in bnxt_poll_p5()
3289 BNXT_DB_NQ_ARM_P5(&cpr->cp_db, in bnxt_poll_p5()
3290 cpr->cp_raw_cons); in bnxt_poll_p5()
3311 cpr2 = &cpr->cp_ring_arr[idx]; in bnxt_poll_p5()
3316 cpr->has_more_work |= cpr2->has_more_work; in bnxt_poll_p5()
3323 if (raw_cons != cpr->cp_raw_cons) { in bnxt_poll_p5()
3324 cpr->cp_raw_cons = raw_cons; in bnxt_poll_p5()
3325 BNXT_DB_NQ_P5(&cpr->cp_db, raw_cons); in bnxt_poll_p5()
3328 cpr_rx = &cpr->cp_ring_arr[0]; in bnxt_poll_p5()
3333 dim_update_sample(cpr->event_ctr, in bnxt_poll_p5()
3337 net_dim(&cpr->dim, &dim_sample); in bnxt_poll_p5()
3974 static void bnxt_free_cp_arrays(struct bnxt_cp_ring_info *cpr) in bnxt_free_cp_arrays() argument
3976 struct bnxt_ring_struct *ring = &cpr->cp_ring_struct; in bnxt_free_cp_arrays()
3978 kfree(cpr->cp_desc_ring); in bnxt_free_cp_arrays()
3979 cpr->cp_desc_ring = NULL; in bnxt_free_cp_arrays()
3981 kfree(cpr->cp_desc_mapping); in bnxt_free_cp_arrays()
3982 cpr->cp_desc_mapping = NULL; in bnxt_free_cp_arrays()
3986 static int bnxt_alloc_cp_arrays(struct bnxt_cp_ring_info *cpr, int n) in bnxt_alloc_cp_arrays() argument
3988 cpr->cp_desc_ring = kcalloc(n, sizeof(*cpr->cp_desc_ring), GFP_KERNEL); in bnxt_alloc_cp_arrays()
3989 if (!cpr->cp_desc_ring) in bnxt_alloc_cp_arrays()
3991 cpr->cp_desc_mapping = kcalloc(n, sizeof(*cpr->cp_desc_mapping), in bnxt_alloc_cp_arrays()
3993 if (!cpr->cp_desc_mapping) in bnxt_alloc_cp_arrays()
4039 struct bnxt_cp_ring_info *cpr; in bnxt_free_cp_rings() local
4046 cpr = &bnapi->cp_ring; in bnxt_free_cp_rings()
4047 ring = &cpr->cp_ring_struct; in bnxt_free_cp_rings()
4051 if (!cpr->cp_ring_arr) in bnxt_free_cp_rings()
4054 for (j = 0; j < cpr->cp_ring_count; j++) { in bnxt_free_cp_rings()
4055 struct bnxt_cp_ring_info *cpr2 = &cpr->cp_ring_arr[j]; in bnxt_free_cp_rings()
4061 kfree(cpr->cp_ring_arr); in bnxt_free_cp_rings()
4062 cpr->cp_ring_arr = NULL; in bnxt_free_cp_rings()
4063 cpr->cp_ring_count = 0; in bnxt_free_cp_rings()
4068 struct bnxt_cp_ring_info *cpr) in bnxt_alloc_cp_sub_ring() argument
4074 rc = bnxt_alloc_cp_arrays(cpr, bp->cp_nr_pages); in bnxt_alloc_cp_sub_ring()
4076 bnxt_free_cp_arrays(cpr); in bnxt_alloc_cp_sub_ring()
4079 ring = &cpr->cp_ring_struct; in bnxt_alloc_cp_sub_ring()
4083 rmem->pg_arr = (void **)cpr->cp_desc_ring; in bnxt_alloc_cp_sub_ring()
4084 rmem->dma_arr = cpr->cp_desc_mapping; in bnxt_alloc_cp_sub_ring()
4089 bnxt_free_cp_arrays(cpr); in bnxt_alloc_cp_sub_ring()
4105 struct bnxt_cp_ring_info *cpr, *cpr2; in bnxt_alloc_cp_rings() local
4113 cpr = &bnapi->cp_ring; in bnxt_alloc_cp_rings()
4114 cpr->bnapi = bnapi; in bnxt_alloc_cp_rings()
4115 ring = &cpr->cp_ring_struct; in bnxt_alloc_cp_rings()
4139 cpr->cp_ring_arr = kcalloc(cp_count, sizeof(*cpr), in bnxt_alloc_cp_rings()
4141 if (!cpr->cp_ring_arr) in bnxt_alloc_cp_rings()
4143 cpr->cp_ring_count = cp_count; in bnxt_alloc_cp_rings()
4146 cpr2 = &cpr->cp_ring_arr[k]; in bnxt_alloc_cp_rings()
4151 cpr2->sw_stats = cpr->sw_stats; in bnxt_alloc_cp_rings()
4234 struct bnxt_cp_ring_info *cpr; in bnxt_init_ring_struct() local
4242 cpr = &bnapi->cp_ring; in bnxt_init_ring_struct()
4243 ring = &cpr->cp_ring_struct; in bnxt_init_ring_struct()
4247 rmem->pg_arr = (void **)cpr->cp_desc_ring; in bnxt_init_ring_struct()
4248 rmem->dma_arr = cpr->cp_desc_mapping; in bnxt_init_ring_struct()
4446 struct bnxt_cp_ring_info *cpr = &bp->bnapi[i]->cp_ring; in bnxt_init_cp_rings() local
4447 struct bnxt_ring_struct *ring = &cpr->cp_ring_struct; in bnxt_init_cp_rings()
4450 cpr->rx_ring_coal.coal_ticks = bp->rx_coal.coal_ticks; in bnxt_init_cp_rings()
4451 cpr->rx_ring_coal.coal_bufs = bp->rx_coal.coal_bufs; in bnxt_init_cp_rings()
4452 if (!cpr->cp_ring_arr) in bnxt_init_cp_rings()
4454 for (j = 0; j < cpr->cp_ring_count; j++) { in bnxt_init_cp_rings()
4455 struct bnxt_cp_ring_info *cpr2 = &cpr->cp_ring_arr[j]; in bnxt_init_cp_rings()
5033 struct bnxt_cp_ring_info *cpr; in bnxt_init_stats() local
5041 cpr = &bnapi->cp_ring; in bnxt_init_stats()
5042 stats = &cpr->stats; in bnxt_init_stats()
5120 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_free_ring_stats() local
5122 bnxt_free_stats_mem(bp, &cpr->stats); in bnxt_free_ring_stats()
5124 kfree(cpr->sw_stats); in bnxt_free_ring_stats()
5125 cpr->sw_stats = NULL; in bnxt_free_ring_stats()
5138 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_alloc_stats() local
5140 cpr->sw_stats = kzalloc(sizeof(*cpr->sw_stats), GFP_KERNEL); in bnxt_alloc_stats()
5141 if (!cpr->sw_stats) in bnxt_alloc_stats()
5144 cpr->stats.len = size; in bnxt_alloc_stats()
5145 rc = bnxt_alloc_stats_mem(bp, &cpr->stats, !i); in bnxt_alloc_stats()
5149 cpr->hw_stats_ctx_id = INVALID_STATS_CTX_ID; in bnxt_alloc_stats()
5205 struct bnxt_cp_ring_info *cpr; in bnxt_clear_ring_indices() local
5212 cpr = &bnapi->cp_ring; in bnxt_clear_ring_indices()
5213 cpr->cp_raw_cons = 0; in bnxt_clear_ring_indices()
5400 struct bnxt_cp_ring_info *cpr = in bnxt_alloc_mem() local
5403 cpr->cp_ring_struct.ring_mem.flags = in bnxt_alloc_mem()
5533 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_disable_int() local
5534 struct bnxt_ring_struct *ring = &cpr->cp_ring_struct; in bnxt_disable_int()
5537 bnxt_db_nq(bp, &cpr->cp_db, cpr->cp_raw_cons); in bnxt_disable_int()
5544 struct bnxt_cp_ring_info *cpr; in bnxt_cp_num_to_irq_num() local
5546 cpr = &bnapi->cp_ring; in bnxt_cp_num_to_irq_num()
5547 return cpr->cp_ring_struct.map_idx; in bnxt_cp_num_to_irq_num()
5574 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_enable_int() local
5576 bnxt_db_nq_arm(bp, &cpr->cp_db, cpr->cp_raw_cons); in bnxt_enable_int()
7240 struct bnxt_cp_ring_info *cpr) in bnxt_hwrm_cp_ring_alloc_p5() argument
7243 struct bnxt_napi *bnapi = cpr->bnapi; in bnxt_hwrm_cp_ring_alloc_p5()
7248 ring = &cpr->cp_ring_struct; in bnxt_hwrm_cp_ring_alloc_p5()
7249 ring->handle = BNXT_SET_NQ_HDL(cpr); in bnxt_hwrm_cp_ring_alloc_p5()
7253 bnxt_set_db(bp, &cpr->cp_db, type, map_idx, ring->fw_ring_id); in bnxt_hwrm_cp_ring_alloc_p5()
7254 bnxt_db_cq(bp, &cpr->cp_db, cpr->cp_raw_cons); in bnxt_hwrm_cp_ring_alloc_p5()
7284 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_hwrm_ring_alloc() local
7285 struct bnxt_ring_struct *ring = &cpr->cp_ring_struct; in bnxt_hwrm_ring_alloc()
7296 bnxt_set_db(bp, &cpr->cp_db, type, map_idx, ring->fw_ring_id); in bnxt_hwrm_ring_alloc()
7297 bnxt_db_nq(bp, &cpr->cp_db, cpr->cp_raw_cons); in bnxt_hwrm_ring_alloc()
7463 struct bnxt_cp_ring_info *cpr) in bnxt_hwrm_cp_ring_free() argument
7467 ring = &cpr->cp_ring_struct; in bnxt_hwrm_cp_ring_free()
7476 static void bnxt_clear_one_cp_ring(struct bnxt *bp, struct bnxt_cp_ring_info *cpr) in bnxt_clear_one_cp_ring() argument
7478 struct bnxt_ring_struct *ring = &cpr->cp_ring_struct; in bnxt_clear_one_cp_ring()
7481 cpr->cp_raw_cons = 0; in bnxt_clear_one_cp_ring()
7482 cpr->toggle = 0; in bnxt_clear_one_cp_ring()
7485 if (cpr->cp_desc_ring[i]) in bnxt_clear_one_cp_ring()
7486 memset(cpr->cp_desc_ring[i], 0, size); in bnxt_clear_one_cp_ring()
7518 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_hwrm_ring_free() local
7522 for (j = 0; j < cpr->cp_ring_count && cpr->cp_ring_arr; j++) in bnxt_hwrm_ring_free()
7523 bnxt_hwrm_cp_ring_free(bp, &cpr->cp_ring_arr[j]); in bnxt_hwrm_ring_free()
7525 ring = &cpr->cp_ring_struct; in bnxt_hwrm_ring_free()
8178 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in __bnxt_hwrm_set_coal_nq() local
8191 req->ring_id = cpu_to_le16(cpr->cp_ring_struct.fw_ring_id); in __bnxt_hwrm_set_coal_nq()
8205 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_hwrm_set_ring_coal() local
8214 coal.coal_ticks = cpr->rx_ring_coal.coal_ticks; in bnxt_hwrm_set_ring_coal()
8215 coal.coal_bufs = cpr->rx_ring_coal.coal_bufs; in bnxt_hwrm_set_ring_coal()
8336 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_hwrm_stat_ctx_free() local
8338 if (cpr->hw_stats_ctx_id != INVALID_STATS_CTX_ID) { in bnxt_hwrm_stat_ctx_free()
8339 req->stat_ctx_id = cpu_to_le32(cpr->hw_stats_ctx_id); in bnxt_hwrm_stat_ctx_free()
8346 cpr->hw_stats_ctx_id = INVALID_STATS_CTX_ID; in bnxt_hwrm_stat_ctx_free()
8373 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_hwrm_stat_ctx_alloc() local
8375 req->stats_dma_addr = cpu_to_le64(cpr->stats.hw_stats_map); in bnxt_hwrm_stat_ctx_alloc()
8381 cpr->hw_stats_ctx_id = le32_to_cpu(resp->stat_ctx_id); in bnxt_hwrm_stat_ctx_alloc()
8383 bp->grp_info[i].fw_stats_ctx = cpr->hw_stats_ctx_id; in bnxt_hwrm_stat_ctx_alloc()
10270 struct bnxt_cp_ring_info *cpr; in bnxt_accumulate_all_stats() local
10273 cpr = &bnapi->cp_ring; in bnxt_accumulate_all_stats()
10274 stats = &cpr->stats; in bnxt_accumulate_all_stats()
11630 struct bnxt_cp_ring_info *cpr; in bnxt_disable_napi() local
11632 cpr = &bnapi->cp_ring; in bnxt_disable_napi()
11634 cpr->sw_stats->tx.tx_resets++; in bnxt_disable_napi()
11636 cpr->sw_stats->rx.rx_resets++; in bnxt_disable_napi()
11648 struct bnxt_cp_ring_info *cpr; in bnxt_enable_napi() local
11652 cpr = &bnapi->cp_ring; in bnxt_enable_napi()
11656 INIT_WORK(&cpr->dim.work, bnxt_dim_work); in bnxt_enable_napi()
11657 cpr->dim.mode = DIM_CQ_PERIOD_MODE_START_FROM_EQE; in bnxt_enable_napi()
13130 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_get_ring_stats() local
13131 u64 *sw = cpr->stats.sw_stats; in bnxt_get_ring_stats()
13157 cpr->sw_stats->rx.rx_netpoll_discards + in bnxt_get_ring_stats()
13158 cpr->sw_stats->rx.rx_oom_discards; in bnxt_get_ring_stats()
13223 struct bnxt_cp_ring_info *cpr) in bnxt_get_one_ring_err_stats() argument
13225 struct bnxt_sw_stats *sw_stats = cpr->sw_stats; in bnxt_get_one_ring_err_stats()
13226 u64 *hw_stats = cpr->stats.sw_stats; in bnxt_get_one_ring_err_stats()
13856 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_dump_cp_sw_state() local
13860 i, cpr->cp_ring_struct.fw_ring_id, cpr->cp_raw_cons); in bnxt_dump_cp_sw_state()
13883 struct bnxt_cp_ring_info *cpr; in bnxt_hwrm_rx_ring_reset() local
13891 cpr = &bnapi->cp_ring; in bnxt_hwrm_rx_ring_reset()
13892 cp_ring_id = cpr->cp_ring_struct.fw_ring_id; in bnxt_hwrm_rx_ring_reset()
14055 struct bnxt_cp_ring_info *cpr; in bnxt_rx_ring_reset() local
14078 cpr = &rxr->bnapi->cp_ring; in bnxt_rx_ring_reset()
14079 cpr->sw_stats->rx.rx_resets++; in bnxt_rx_ring_reset()
14275 struct bnxt_cp_ring_info *cpr; in bnxt_chk_missed_irq() local
14282 cpr = &bnapi->cp_ring; in bnxt_chk_missed_irq()
14283 for (j = 0; j < cpr->cp_ring_count; j++) { in bnxt_chk_missed_irq()
14284 struct bnxt_cp_ring_info *cpr2 = &cpr->cp_ring_arr[j]; in bnxt_chk_missed_irq()
14298 cpr->sw_stats->cmn.missed_irqs++; in bnxt_chk_missed_irq()
15646 struct bnxt_cp_ring_info *cpr; in bnxt_get_queue_stats_rx() local
15652 cpr = &bp->bnapi[i]->cp_ring; in bnxt_get_queue_stats_rx()
15653 sw = cpr->stats.sw_stats; in bnxt_get_queue_stats_rx()
15665 stats->alloc_fail = cpr->sw_stats->rx.rx_oom_discards; in bnxt_get_queue_stats_rx()
15883 struct bnxt_cp_ring_info *cpr; in bnxt_queue_start() local
15904 cpr = &bnapi->cp_ring; in bnxt_queue_start()
15934 bnxt_db_nq_arm(bp, &cpr->cp_db, cpr->cp_raw_cons); in bnxt_queue_start()
15956 bnxt_db_nq_arm(bp, &cpr->cp_db, cpr->cp_raw_cons); in bnxt_queue_start()
15965 struct bnxt_cp_ring_info *cpr; in bnxt_queue_stop() local
15980 cpr = &bnapi->cp_ring; in bnxt_queue_stop()
15981 cancel_work_sync(&cpr->dim.work); in bnxt_queue_stop()
16001 bnxt_db_nq(bp, &cpr->cp_db, cpr->cp_raw_cons); in bnxt_queue_stop()