Lines Matching refs:buf_alloc
3013 hns3_tx_buffer_calc(struct hns3_hw *hw, struct hns3_pkt_buf_alloc *buf_alloc) in hns3_tx_buffer_calc() argument
3024 priv = &buf_alloc->priv_buf[i]; in hns3_tx_buffer_calc()
3041 hns3_tx_buffer_alloc(struct hns3_hw *hw, struct hns3_pkt_buf_alloc *buf_alloc) in hns3_tx_buffer_alloc() argument
3056 buf_size = buf_alloc->priv_buf[i].tx_buf_size; in hns3_tx_buffer_alloc()
3083 hns3_get_rx_priv_buff_alloced(struct hns3_pkt_buf_alloc *buf_alloc) in hns3_get_rx_priv_buff_alloced() argument
3090 priv = &buf_alloc->priv_buf[i]; in hns3_get_rx_priv_buff_alloced()
3098 hns3_get_tx_buff_alloced(struct hns3_pkt_buf_alloc *buf_alloc) in hns3_get_tx_buff_alloced() argument
3104 total_tx_size += buf_alloc->priv_buf[i].tx_buf_size; in hns3_get_tx_buff_alloced()
3111 hns3_get_pfc_priv_num(struct hns3_hw *hw, struct hns3_pkt_buf_alloc *buf_alloc) in hns3_get_pfc_priv_num() argument
3118 priv = &buf_alloc->priv_buf[i]; in hns3_get_pfc_priv_num()
3129 struct hns3_pkt_buf_alloc *buf_alloc) in hns3_get_no_pfc_priv_num() argument
3136 priv = &buf_alloc->priv_buf[i]; in hns3_get_no_pfc_priv_num()
3146 hns3_is_rx_buf_ok(struct hns3_hw *hw, struct hns3_pkt_buf_alloc *buf_alloc, in hns3_is_rx_buf_ok() argument
3171 rx_priv = hns3_get_rx_priv_buff_alloced(buf_alloc); in hns3_is_rx_buf_ok()
3176 buf_alloc->s_buf.buf_size = shared_buf; in hns3_is_rx_buf_ok()
3178 buf_alloc->s_buf.self.high = shared_buf - pf->dv_buf_size; in hns3_is_rx_buf_ok()
3179 buf_alloc->s_buf.self.low = buf_alloc->s_buf.self.high in hns3_is_rx_buf_ok()
3183 buf_alloc->s_buf.self.high = in hns3_is_rx_buf_ok()
3185 buf_alloc->s_buf.self.low = aligned_mps; in hns3_is_rx_buf_ok()
3207 buf_alloc->s_buf.tc_thrd[i].low = lo_thrd; in hns3_is_rx_buf_ok()
3208 buf_alloc->s_buf.tc_thrd[i].high = hi_thrd; in hns3_is_rx_buf_ok()
3216 struct hns3_pkt_buf_alloc *buf_alloc) in hns3_rx_buf_calc_all() argument
3225 rx_all = pf->pkt_buf_size - hns3_get_tx_buff_alloced(buf_alloc); in hns3_rx_buf_calc_all()
3229 priv = &buf_alloc->priv_buf[i]; in hns3_rx_buf_calc_all()
3253 return hns3_is_rx_buf_ok(hw, buf_alloc, rx_all); in hns3_rx_buf_calc_all()
3258 struct hns3_pkt_buf_alloc *buf_alloc) in hns3_drop_nopfc_buf_till_fit() argument
3268 rx_all = pf->pkt_buf_size - hns3_get_tx_buff_alloced(buf_alloc); in hns3_drop_nopfc_buf_till_fit()
3269 no_pfc_priv_num = hns3_get_no_pfc_priv_num(hw, buf_alloc); in hns3_drop_nopfc_buf_till_fit()
3273 priv = &buf_alloc->priv_buf[i]; in hns3_drop_nopfc_buf_till_fit()
3285 if (hns3_is_rx_buf_ok(hw, buf_alloc, rx_all) || in hns3_drop_nopfc_buf_till_fit()
3290 return hns3_is_rx_buf_ok(hw, buf_alloc, rx_all); in hns3_drop_nopfc_buf_till_fit()
3295 struct hns3_pkt_buf_alloc *buf_alloc) in hns3_drop_pfc_buf_till_fit() argument
3305 rx_all = pf->pkt_buf_size - hns3_get_tx_buff_alloced(buf_alloc); in hns3_drop_pfc_buf_till_fit()
3306 pfc_priv_num = hns3_get_pfc_priv_num(hw, buf_alloc); in hns3_drop_pfc_buf_till_fit()
3310 priv = &buf_alloc->priv_buf[i]; in hns3_drop_pfc_buf_till_fit()
3320 if (hns3_is_rx_buf_ok(hw, buf_alloc, rx_all) || in hns3_drop_pfc_buf_till_fit()
3325 return hns3_is_rx_buf_ok(hw, buf_alloc, rx_all); in hns3_drop_pfc_buf_till_fit()
3330 struct hns3_pkt_buf_alloc *buf_alloc) in hns3_only_alloc_priv_buff() argument
3344 rx_priv = pf->pkt_buf_size - hns3_get_tx_buff_alloced(buf_alloc); in hns3_only_alloc_priv_buff()
3364 priv = &buf_alloc->priv_buf[i]; in hns3_only_alloc_priv_buff()
3379 buf_alloc->s_buf.buf_size = 0; in hns3_only_alloc_priv_buff()
3391 hns3_rx_buffer_calc(struct hns3_hw *hw, struct hns3_pkt_buf_alloc *buf_alloc) in hns3_rx_buffer_calc() argument
3399 rx_all -= hns3_get_tx_buff_alloced(buf_alloc); in hns3_rx_buffer_calc()
3400 if (!hns3_is_rx_buf_ok(hw, buf_alloc, rx_all)) in hns3_rx_buffer_calc()
3410 if (hns3_only_alloc_priv_buff(hw, buf_alloc)) in hns3_rx_buffer_calc()
3417 if (hns3_rx_buf_calc_all(hw, true, buf_alloc)) in hns3_rx_buffer_calc()
3428 if (hns3_rx_buf_calc_all(hw, false, buf_alloc)) in hns3_rx_buffer_calc()
3431 if (hns3_drop_nopfc_buf_till_fit(hw, buf_alloc)) in hns3_rx_buffer_calc()
3434 if (hns3_drop_pfc_buf_till_fit(hw, buf_alloc)) in hns3_rx_buffer_calc()
3441 hns3_rx_priv_buf_alloc(struct hns3_hw *hw, struct hns3_pkt_buf_alloc *buf_alloc) in hns3_rx_priv_buf_alloc() argument
3454 struct hns3_priv_buf *priv = &buf_alloc->priv_buf[i]; in hns3_rx_priv_buf_alloc()
3461 buf_size = buf_alloc->s_buf.buf_size; in hns3_rx_priv_buf_alloc()
3473 hns3_rx_priv_wl_config(struct hns3_hw *hw, struct hns3_pkt_buf_alloc *buf_alloc) in hns3_rx_priv_wl_config() argument
3496 priv = &buf_alloc->priv_buf[idx]; in hns3_rx_priv_wl_config()
3518 struct hns3_pkt_buf_alloc *buf_alloc) in hns3_common_thrd_config() argument
3521 struct hns3_shared_buf *s_buf = &buf_alloc->s_buf; in hns3_common_thrd_config()
3564 hns3_common_wl_config(struct hns3_hw *hw, struct hns3_pkt_buf_alloc *buf_alloc) in hns3_common_wl_config() argument
3566 struct hns3_shared_buf *buf = &buf_alloc->s_buf; in hns3_common_wl_config()