Lines Matching refs:bd_num
1158 unsigned int bd_num) in hns3_skb_bd_num() argument
1165 bd_size[bd_num++] = HNS3_MAX_BD_SIZE; in hns3_skb_bd_num()
1168 if (bd_num > HNS3_MAX_TSO_BD_NUM) in hns3_skb_bd_num()
1169 return bd_num; in hns3_skb_bd_num()
1173 bd_size[bd_num++] = size; in hns3_skb_bd_num()
1174 if (bd_num > HNS3_MAX_TSO_BD_NUM) in hns3_skb_bd_num()
1175 return bd_num; in hns3_skb_bd_num()
1185 bd_size[bd_num++] = HNS3_MAX_BD_SIZE; in hns3_skb_bd_num()
1188 if (bd_num > HNS3_MAX_TSO_BD_NUM) in hns3_skb_bd_num()
1189 return bd_num; in hns3_skb_bd_num()
1192 bd_size[bd_num++] = size; in hns3_skb_bd_num()
1193 if (bd_num > HNS3_MAX_TSO_BD_NUM) in hns3_skb_bd_num()
1194 return bd_num; in hns3_skb_bd_num()
1197 return bd_num; in hns3_skb_bd_num()
1201 u8 max_non_tso_bd_num, unsigned int bd_num, in hns3_tx_bd_num() argument
1217 bd_num = hns3_skb_bd_num(skb, bd_size, bd_num); in hns3_tx_bd_num()
1219 if (!skb_has_frag_list(skb) || bd_num > HNS3_MAX_TSO_BD_NUM) in hns3_tx_bd_num()
1220 return bd_num; in hns3_tx_bd_num()
1223 bd_num = hns3_tx_bd_num(frag_skb, bd_size, max_non_tso_bd_num, in hns3_tx_bd_num()
1224 bd_num, recursion_level + 1); in hns3_tx_bd_num()
1225 if (bd_num > HNS3_MAX_TSO_BD_NUM) in hns3_tx_bd_num()
1226 return bd_num; in hns3_tx_bd_num()
1229 return bd_num; in hns3_tx_bd_num()
1247 unsigned int bd_num, u8 max_non_tso_bd_num) in hns3_skb_need_linearized() argument
1265 for (i = 0; i < bd_num - max_non_tso_bd_num; i++) { in hns3_skb_need_linearized()
1286 unsigned int bd_num) in hns3_skb_linearize() argument
1291 if (bd_num == UINT_MAX) { in hns3_skb_linearize()
1326 unsigned int bd_num; in hns3_nic_maybe_stop_tx() local
1328 bd_num = hns3_tx_bd_num(skb, bd_size, max_non_tso_bd_num, 0, 0); in hns3_nic_maybe_stop_tx()
1329 if (unlikely(bd_num > max_non_tso_bd_num)) { in hns3_nic_maybe_stop_tx()
1330 if (bd_num <= HNS3_MAX_TSO_BD_NUM && skb_is_gso(skb) && in hns3_nic_maybe_stop_tx()
1331 !hns3_skb_need_linearized(skb, bd_size, bd_num, in hns3_nic_maybe_stop_tx()
1337 if (hns3_skb_linearize(ring, skb, bd_num)) in hns3_nic_maybe_stop_tx()
1340 bd_num = hns3_tx_bd_count(skb->len); in hns3_nic_maybe_stop_tx()
1348 if (likely(ring_space(ring) >= bd_num)) in hns3_nic_maybe_stop_tx()
1349 return bd_num; in hns3_nic_maybe_stop_tx()
1358 if (ring_space(ring) >= bd_num && netif_carrier_ok(netdev) && in hns3_nic_maybe_stop_tx()
1361 return bd_num; in hns3_nic_maybe_stop_tx()
1416 int i, ret, bd_num = 0; in hns3_fill_skb_to_desc() local
1423 bd_num += ret; in hns3_fill_skb_to_desc()
1437 bd_num += ret; in hns3_fill_skb_to_desc()
1446 bd_num += ret; in hns3_fill_skb_to_desc()
1449 return bd_num; in hns3_fill_skb_to_desc()
1880 int bd_num, bd_err; in hns3_get_tx_timeo_queue_info() local
1952 bd_num = readl_relaxed(tx_ring->tqp->io_base + in hns3_get_tx_timeo_queue_info()
1961 bd_num, hw_head, hw_tail, bd_err, in hns3_get_tx_timeo_queue_info()