Lines Matching refs:buf_alloc

3258 hns3_tx_buffer_calc(struct hns3_hw *hw, struct hns3_pkt_buf_alloc *buf_alloc)  in hns3_tx_buffer_calc()  argument
3269 priv = &buf_alloc->priv_buf[i]; in hns3_tx_buffer_calc()
3286 hns3_tx_buffer_alloc(struct hns3_hw *hw, struct hns3_pkt_buf_alloc *buf_alloc) in hns3_tx_buffer_alloc() argument
3301 buf_size = buf_alloc->priv_buf[i].tx_buf_size; in hns3_tx_buffer_alloc()
3328 hns3_get_rx_priv_buff_alloced(struct hns3_pkt_buf_alloc *buf_alloc) in hns3_get_rx_priv_buff_alloced() argument
3335 priv = &buf_alloc->priv_buf[i]; in hns3_get_rx_priv_buff_alloced()
3343 hns3_get_tx_buff_alloced(struct hns3_pkt_buf_alloc *buf_alloc) in hns3_get_tx_buff_alloced() argument
3349 total_tx_size += buf_alloc->priv_buf[i].tx_buf_size; in hns3_get_tx_buff_alloced()
3356 hns3_get_pfc_priv_num(struct hns3_hw *hw, struct hns3_pkt_buf_alloc *buf_alloc) in hns3_get_pfc_priv_num() argument
3363 priv = &buf_alloc->priv_buf[i]; in hns3_get_pfc_priv_num()
3374 struct hns3_pkt_buf_alloc *buf_alloc) in hns3_get_no_pfc_priv_num() argument
3381 priv = &buf_alloc->priv_buf[i]; in hns3_get_no_pfc_priv_num()
3391 hns3_is_rx_buf_ok(struct hns3_hw *hw, struct hns3_pkt_buf_alloc *buf_alloc, in hns3_is_rx_buf_ok() argument
3416 rx_priv = hns3_get_rx_priv_buff_alloced(buf_alloc); in hns3_is_rx_buf_ok()
3421 buf_alloc->s_buf.buf_size = shared_buf; in hns3_is_rx_buf_ok()
3423 buf_alloc->s_buf.self.high = shared_buf - pf->dv_buf_size; in hns3_is_rx_buf_ok()
3424 buf_alloc->s_buf.self.low = buf_alloc->s_buf.self.high in hns3_is_rx_buf_ok()
3428 buf_alloc->s_buf.self.high = in hns3_is_rx_buf_ok()
3430 buf_alloc->s_buf.self.low = aligned_mps; in hns3_is_rx_buf_ok()
3452 buf_alloc->s_buf.tc_thrd[i].low = lo_thrd; in hns3_is_rx_buf_ok()
3453 buf_alloc->s_buf.tc_thrd[i].high = hi_thrd; in hns3_is_rx_buf_ok()
3461 struct hns3_pkt_buf_alloc *buf_alloc) in hns3_rx_buf_calc_all() argument
3470 rx_all = pf->pkt_buf_size - hns3_get_tx_buff_alloced(buf_alloc); in hns3_rx_buf_calc_all()
3474 priv = &buf_alloc->priv_buf[i]; in hns3_rx_buf_calc_all()
3498 return hns3_is_rx_buf_ok(hw, buf_alloc, rx_all); in hns3_rx_buf_calc_all()
3503 struct hns3_pkt_buf_alloc *buf_alloc) in hns3_drop_nopfc_buf_till_fit() argument
3513 rx_all = pf->pkt_buf_size - hns3_get_tx_buff_alloced(buf_alloc); in hns3_drop_nopfc_buf_till_fit()
3514 no_pfc_priv_num = hns3_get_no_pfc_priv_num(hw, buf_alloc); in hns3_drop_nopfc_buf_till_fit()
3518 priv = &buf_alloc->priv_buf[i]; in hns3_drop_nopfc_buf_till_fit()
3531 if (hns3_is_rx_buf_ok(hw, buf_alloc, rx_all) || in hns3_drop_nopfc_buf_till_fit()
3536 return hns3_is_rx_buf_ok(hw, buf_alloc, rx_all); in hns3_drop_nopfc_buf_till_fit()
3541 struct hns3_pkt_buf_alloc *buf_alloc) in hns3_drop_pfc_buf_till_fit() argument
3551 rx_all = pf->pkt_buf_size - hns3_get_tx_buff_alloced(buf_alloc); in hns3_drop_pfc_buf_till_fit()
3552 pfc_priv_num = hns3_get_pfc_priv_num(hw, buf_alloc); in hns3_drop_pfc_buf_till_fit()
3556 priv = &buf_alloc->priv_buf[i]; in hns3_drop_pfc_buf_till_fit()
3566 if (hns3_is_rx_buf_ok(hw, buf_alloc, rx_all) || in hns3_drop_pfc_buf_till_fit()
3571 return hns3_is_rx_buf_ok(hw, buf_alloc, rx_all); in hns3_drop_pfc_buf_till_fit()
3576 struct hns3_pkt_buf_alloc *buf_alloc) in hns3_only_alloc_priv_buff() argument
3590 rx_priv = pf->pkt_buf_size - hns3_get_tx_buff_alloced(buf_alloc); in hns3_only_alloc_priv_buff()
3611 priv = &buf_alloc->priv_buf[i]; in hns3_only_alloc_priv_buff()
3626 buf_alloc->s_buf.buf_size = 0; in hns3_only_alloc_priv_buff()
3638 hns3_rx_buffer_calc(struct hns3_hw *hw, struct hns3_pkt_buf_alloc *buf_alloc) in hns3_rx_buffer_calc() argument
3646 rx_all -= hns3_get_tx_buff_alloced(buf_alloc); in hns3_rx_buffer_calc()
3647 if (!hns3_is_rx_buf_ok(hw, buf_alloc, rx_all)) in hns3_rx_buffer_calc()
3657 if (hns3_only_alloc_priv_buff(hw, buf_alloc)) in hns3_rx_buffer_calc()
3664 if (hns3_rx_buf_calc_all(hw, true, buf_alloc)) in hns3_rx_buffer_calc()
3675 if (hns3_rx_buf_calc_all(hw, false, buf_alloc)) in hns3_rx_buffer_calc()
3678 if (hns3_drop_nopfc_buf_till_fit(hw, buf_alloc)) in hns3_rx_buffer_calc()
3681 if (hns3_drop_pfc_buf_till_fit(hw, buf_alloc)) in hns3_rx_buffer_calc()
3688 hns3_rx_priv_buf_alloc(struct hns3_hw *hw, struct hns3_pkt_buf_alloc *buf_alloc) in hns3_rx_priv_buf_alloc() argument
3701 struct hns3_priv_buf *priv = &buf_alloc->priv_buf[i]; in hns3_rx_priv_buf_alloc()
3708 buf_size = buf_alloc->s_buf.buf_size; in hns3_rx_priv_buf_alloc()
3720 hns3_rx_priv_wl_config(struct hns3_hw *hw, struct hns3_pkt_buf_alloc *buf_alloc) in hns3_rx_priv_wl_config() argument
3743 priv = &buf_alloc->priv_buf[idx]; in hns3_rx_priv_wl_config()
3765 struct hns3_pkt_buf_alloc *buf_alloc) in hns3_common_thrd_config() argument
3768 struct hns3_shared_buf *s_buf = &buf_alloc->s_buf; in hns3_common_thrd_config()
3811 hns3_common_wl_config(struct hns3_hw *hw, struct hns3_pkt_buf_alloc *buf_alloc) in hns3_common_wl_config() argument
3813 struct hns3_shared_buf *buf = &buf_alloc->s_buf; in hns3_common_wl_config()