Lines Matching refs:bd_num

1768 				    unsigned int bd_num)  in hns3_skb_bd_num()  argument
1775 bd_size[bd_num++] = HNS3_MAX_BD_SIZE; in hns3_skb_bd_num()
1778 if (bd_num > HNS3_MAX_TSO_BD_NUM) in hns3_skb_bd_num()
1779 return bd_num; in hns3_skb_bd_num()
1783 bd_size[bd_num++] = size; in hns3_skb_bd_num()
1784 if (bd_num > HNS3_MAX_TSO_BD_NUM) in hns3_skb_bd_num()
1785 return bd_num; in hns3_skb_bd_num()
1795 bd_size[bd_num++] = HNS3_MAX_BD_SIZE; in hns3_skb_bd_num()
1798 if (bd_num > HNS3_MAX_TSO_BD_NUM) in hns3_skb_bd_num()
1799 return bd_num; in hns3_skb_bd_num()
1802 bd_size[bd_num++] = size; in hns3_skb_bd_num()
1803 if (bd_num > HNS3_MAX_TSO_BD_NUM) in hns3_skb_bd_num()
1804 return bd_num; in hns3_skb_bd_num()
1807 return bd_num; in hns3_skb_bd_num()
1811 u8 max_non_tso_bd_num, unsigned int bd_num, in hns3_tx_bd_num() argument
1827 bd_num = hns3_skb_bd_num(skb, bd_size, bd_num); in hns3_tx_bd_num()
1828 if (!skb_has_frag_list(skb) || bd_num > HNS3_MAX_TSO_BD_NUM) in hns3_tx_bd_num()
1829 return bd_num; in hns3_tx_bd_num()
1832 bd_num = hns3_tx_bd_num(frag_skb, bd_size, max_non_tso_bd_num, in hns3_tx_bd_num()
1833 bd_num, recursion_level + 1); in hns3_tx_bd_num()
1834 if (bd_num > HNS3_MAX_TSO_BD_NUM) in hns3_tx_bd_num()
1835 return bd_num; in hns3_tx_bd_num()
1838 return bd_num; in hns3_tx_bd_num()
1856 unsigned int bd_num, u8 max_non_tso_bd_num) in hns3_skb_need_linearized() argument
1874 for (i = 0; i < bd_num - max_non_tso_bd_num; i++) { in hns3_skb_need_linearized()
1895 unsigned int bd_num) in hns3_skb_linearize() argument
1900 if (bd_num == UINT_MAX) { in hns3_skb_linearize()
1929 unsigned int bd_num; in hns3_nic_maybe_stop_tx() local
1931 bd_num = hns3_tx_bd_num(skb, bd_size, max_non_tso_bd_num, 0, 0); in hns3_nic_maybe_stop_tx()
1932 if (unlikely(bd_num > max_non_tso_bd_num)) { in hns3_nic_maybe_stop_tx()
1933 if (bd_num <= HNS3_MAX_TSO_BD_NUM && skb_is_gso(skb) && in hns3_nic_maybe_stop_tx()
1934 !hns3_skb_need_linearized(skb, bd_size, bd_num, in hns3_nic_maybe_stop_tx()
1940 if (hns3_skb_linearize(ring, skb, bd_num)) in hns3_nic_maybe_stop_tx()
1943 bd_num = hns3_tx_bd_count(skb->len); in hns3_nic_maybe_stop_tx()
1949 if (likely(ring_space(ring) >= bd_num)) in hns3_nic_maybe_stop_tx()
1950 return bd_num; in hns3_nic_maybe_stop_tx()
1959 if (ring_space(ring) >= bd_num && netif_carrier_ok(netdev) && in hns3_nic_maybe_stop_tx()
1962 return bd_num; in hns3_nic_maybe_stop_tx()
2014 int i, ret, bd_num = 0; in hns3_fill_skb_to_desc() local
2020 bd_num += ret; in hns3_fill_skb_to_desc()
2029 bd_num += ret; in hns3_fill_skb_to_desc()
2038 bd_num += ret; in hns3_fill_skb_to_desc()
2041 return bd_num; in hns3_fill_skb_to_desc()
2077 __le64 bd_num = cpu_to_le64((u64)ring->pending_buf); in hns3_tx_mem_doorbell() local
2085 &bd_num, 1); in hns3_tx_mem_doorbell()
2151 int bd_num = 0; in hns3_handle_tx_bounce() local
2178 bd_num += hns3_fill_desc(ring, dma, size); in hns3_handle_tx_bounce()
2186 bd_num += ret; in hns3_handle_tx_bounce()
2194 return bd_num; in hns3_handle_tx_bounce()
2203 int i, bd_num = 0; in hns3_handle_tx_sgl() local
2242 bd_num += hns3_fill_desc(ring, sg_dma_address(sgt->sgl + i), in hns3_handle_tx_sgl()
2246 return bd_num; in hns3_handle_tx_sgl()