Lines Matching refs:buf_alloc

1894 				    struct hclge_pkt_buf_alloc *buf_alloc)  in hclge_cmd_alloc_tx_buff()  argument
1908 u32 buf_size = buf_alloc->priv_buf[i].tx_buf_size; in hclge_cmd_alloc_tx_buff()
1924 struct hclge_pkt_buf_alloc *buf_alloc) in hclge_tx_buffer_alloc() argument
1926 int ret = hclge_cmd_alloc_tx_buff(hdev, buf_alloc); in hclge_tx_buffer_alloc()
1947 struct hclge_pkt_buf_alloc *buf_alloc) in hclge_get_pfc_priv_num() argument
1954 priv = &buf_alloc->priv_buf[i]; in hclge_get_pfc_priv_num()
1965 struct hclge_pkt_buf_alloc *buf_alloc) in hclge_get_no_pfc_priv_num() argument
1972 priv = &buf_alloc->priv_buf[i]; in hclge_get_no_pfc_priv_num()
1982 static u32 hclge_get_rx_priv_buff_alloced(struct hclge_pkt_buf_alloc *buf_alloc) in hclge_get_rx_priv_buff_alloced() argument
1989 priv = &buf_alloc->priv_buf[i]; in hclge_get_rx_priv_buff_alloced()
1996 static u32 hclge_get_tx_buff_alloced(struct hclge_pkt_buf_alloc *buf_alloc) in hclge_get_tx_buff_alloced() argument
2001 total_tx_size += buf_alloc->priv_buf[i].tx_buf_size; in hclge_get_tx_buff_alloced()
2007 struct hclge_pkt_buf_alloc *buf_alloc, in hclge_is_rx_buf_ok() argument
2029 rx_priv = hclge_get_rx_priv_buff_alloced(buf_alloc); in hclge_is_rx_buf_ok()
2034 buf_alloc->s_buf.buf_size = shared_buf; in hclge_is_rx_buf_ok()
2036 buf_alloc->s_buf.self.high = shared_buf - hdev->dv_buf_size; in hclge_is_rx_buf_ok()
2037 buf_alloc->s_buf.self.low = buf_alloc->s_buf.self.high in hclge_is_rx_buf_ok()
2041 buf_alloc->s_buf.self.high = aligned_mps + in hclge_is_rx_buf_ok()
2043 buf_alloc->s_buf.self.low = aligned_mps; in hclge_is_rx_buf_ok()
2065 buf_alloc->s_buf.tc_thrd[i].low = lo_thrd; in hclge_is_rx_buf_ok()
2066 buf_alloc->s_buf.tc_thrd[i].high = hi_thrd; in hclge_is_rx_buf_ok()
2073 struct hclge_pkt_buf_alloc *buf_alloc) in hclge_tx_buffer_calc() argument
2081 struct hclge_priv_buf *priv = &buf_alloc->priv_buf[i]; in hclge_tx_buffer_calc()
2099 struct hclge_pkt_buf_alloc *buf_alloc) in hclge_rx_buf_calc_all() argument
2101 u32 rx_all = hdev->pkt_buf_size - hclge_get_tx_buff_alloced(buf_alloc); in hclge_rx_buf_calc_all()
2106 struct hclge_priv_buf *priv = &buf_alloc->priv_buf[i]; in hclge_rx_buf_calc_all()
2131 return hclge_is_rx_buf_ok(hdev, buf_alloc, rx_all); in hclge_rx_buf_calc_all()
2135 struct hclge_pkt_buf_alloc *buf_alloc) in hclge_drop_nopfc_buf_till_fit() argument
2137 u32 rx_all = hdev->pkt_buf_size - hclge_get_tx_buff_alloced(buf_alloc); in hclge_drop_nopfc_buf_till_fit()
2138 int no_pfc_priv_num = hclge_get_no_pfc_priv_num(hdev, buf_alloc); in hclge_drop_nopfc_buf_till_fit()
2143 struct hclge_priv_buf *priv = &buf_alloc->priv_buf[i]; in hclge_drop_nopfc_buf_till_fit()
2156 if (hclge_is_rx_buf_ok(hdev, buf_alloc, rx_all) || in hclge_drop_nopfc_buf_till_fit()
2161 return hclge_is_rx_buf_ok(hdev, buf_alloc, rx_all); in hclge_drop_nopfc_buf_till_fit()
2165 struct hclge_pkt_buf_alloc *buf_alloc) in hclge_drop_pfc_buf_till_fit() argument
2167 u32 rx_all = hdev->pkt_buf_size - hclge_get_tx_buff_alloced(buf_alloc); in hclge_drop_pfc_buf_till_fit()
2168 int pfc_priv_num = hclge_get_pfc_priv_num(hdev, buf_alloc); in hclge_drop_pfc_buf_till_fit()
2173 struct hclge_priv_buf *priv = &buf_alloc->priv_buf[i]; in hclge_drop_pfc_buf_till_fit()
2186 if (hclge_is_rx_buf_ok(hdev, buf_alloc, rx_all) || in hclge_drop_pfc_buf_till_fit()
2191 return hclge_is_rx_buf_ok(hdev, buf_alloc, rx_all); in hclge_drop_pfc_buf_till_fit()
2195 struct hclge_pkt_buf_alloc *buf_alloc) in hclge_only_alloc_priv_buff() argument
2201 u32 rx_priv = hdev->pkt_buf_size - hclge_get_tx_buff_alloced(buf_alloc); in hclge_only_alloc_priv_buff()
2221 struct hclge_priv_buf *priv = &buf_alloc->priv_buf[i]; in hclge_only_alloc_priv_buff()
2237 buf_alloc->s_buf.buf_size = 0; in hclge_only_alloc_priv_buff()
2248 struct hclge_pkt_buf_alloc *buf_alloc) in hclge_rx_buffer_calc() argument
2254 rx_all -= hclge_get_tx_buff_alloced(buf_alloc); in hclge_rx_buffer_calc()
2255 if (!hclge_is_rx_buf_ok(hdev, buf_alloc, rx_all)) in hclge_rx_buffer_calc()
2261 if (hclge_only_alloc_priv_buff(hdev, buf_alloc)) in hclge_rx_buffer_calc()
2264 if (hclge_rx_buf_calc_all(hdev, true, buf_alloc)) in hclge_rx_buffer_calc()
2268 if (hclge_rx_buf_calc_all(hdev, false, buf_alloc)) in hclge_rx_buffer_calc()
2271 if (hclge_drop_nopfc_buf_till_fit(hdev, buf_alloc)) in hclge_rx_buffer_calc()
2274 if (hclge_drop_pfc_buf_till_fit(hdev, buf_alloc)) in hclge_rx_buffer_calc()
2281 struct hclge_pkt_buf_alloc *buf_alloc) in hclge_rx_priv_buf_alloc() argument
2293 struct hclge_priv_buf *priv = &buf_alloc->priv_buf[i]; in hclge_rx_priv_buf_alloc()
2302 cpu_to_le16((buf_alloc->s_buf.buf_size >> HCLGE_BUF_UNIT_S) | in hclge_rx_priv_buf_alloc()
2314 struct hclge_pkt_buf_alloc *buf_alloc) in hclge_rx_priv_wl_config() argument
2336 priv = &buf_alloc->priv_buf[idx]; in hclge_rx_priv_wl_config()
2358 struct hclge_pkt_buf_alloc *buf_alloc) in hclge_common_thrd_config() argument
2360 struct hclge_shared_buf *s_buf = &buf_alloc->s_buf; in hclge_common_thrd_config()
2401 struct hclge_pkt_buf_alloc *buf_alloc) in hclge_common_wl_config() argument
2403 struct hclge_shared_buf *buf = &buf_alloc->s_buf; in hclge_common_wl_config()