Lines Matching refs:desc_cb

42 	struct hnae_desc_cb *desc_cb = &ring->desc_cb[ring->next_to_use];  in fill_desc()  local
49 desc_cb->priv = priv; in fill_desc()
50 desc_cb->length = size; in fill_desc()
51 desc_cb->dma = dma; in fill_desc()
52 desc_cb->type = type; in fill_desc()
188 dma_unmap_page(dev, ring->desc_cb[next_to_use].dma, in hns_nic_net_xmit_hw()
189 ring->desc_cb[next_to_use].length, in hns_nic_net_xmit_hw()
195 dma_unmap_single(dev, ring->desc_cb[next_to_use].dma, in hns_nic_net_xmit_hw()
196 ring->desc_cb[next_to_use].length, DMA_TO_DEVICE); in hns_nic_net_xmit_hw()
317 hns_nic_reuse_page(struct hnae_desc_cb *desc_cb, int tsize, int last_offset) in hns_nic_reuse_page() argument
320 if (likely(page_to_nid(desc_cb->priv) == numa_node_id())) { in hns_nic_reuse_page()
322 desc_cb->page_offset += tsize; in hns_nic_reuse_page()
324 if (desc_cb->page_offset <= last_offset) { in hns_nic_reuse_page()
325 desc_cb->reuse_flag = 1; in hns_nic_reuse_page()
327 get_page(desc_cb->priv); in hns_nic_reuse_page()
339 struct hnae_desc_cb *desc_cb; in hns_nic_poll_rx_skb() local
347 desc_cb = &ring->desc_cb[ring->next_to_clean]; in hns_nic_poll_rx_skb()
352 va = (unsigned char *)desc_cb->buf + desc_cb->page_offset; in hns_nic_poll_rx_skb()
365 if (likely(page_to_nid(desc_cb->priv) == numa_node_id())) in hns_nic_poll_rx_skb()
366 desc_cb->reuse_flag = 1; in hns_nic_poll_rx_skb()
368 put_page(desc_cb->priv); in hns_nic_poll_rx_skb()
385 skb_add_rx_frag(skb, 0, desc_cb->priv, in hns_nic_poll_rx_skb()
386 desc_cb->page_offset + pull_len, in hns_nic_poll_rx_skb()
389 hns_nic_reuse_page(desc_cb, truesize, last_offset); in hns_nic_poll_rx_skb()
398 desc_cb = &ring->desc_cb[ring->next_to_clean]; in hns_nic_poll_rx_skb()
401 skb_add_rx_frag(skb, i, desc_cb->priv, in hns_nic_poll_rx_skb()
402 desc_cb->page_offset, in hns_nic_poll_rx_skb()
405 hns_nic_reuse_page(desc_cb, truesize, last_offset); in hns_nic_poll_rx_skb()
465 struct hnae_desc_cb *desc_cb; in hns_nic_alloc_rx_buffers() local
470 desc_cb = &ring->desc_cb[ring->next_to_use]; in hns_nic_alloc_rx_buffers()
471 if (desc_cb->reuse_flag) { in hns_nic_alloc_rx_buffers()
579 struct hnae_desc_cb *desc_cb = &ring->desc_cb[ring->next_to_clean]; in hns_nic_reclaim_one_desc() local
581 (*pkts) += (desc_cb->type == DESC_TYPE_SKB); in hns_nic_reclaim_one_desc()
582 (*bytes) += desc_cb->length; in hns_nic_reclaim_one_desc()