Lines Matching refs:pending_idx

93 static void xenvif_idx_release(struct xenvif_queue *queue, u16 pending_idx,
122 #define callback_param(vif, pending_idx) \ argument
123 (vif->pending_tx_info[pending_idx].callback_struct)
129 u16 pending_idx = ubuf->desc; in ubuf_to_queue() local
132 return container_of(temp - pending_idx, in ubuf_to_queue()
142 static void frag_set_pending_idx(skb_frag_t *frag, u16 pending_idx) in frag_set_pending_idx() argument
144 frag->page_offset = pending_idx; in frag_set_pending_idx()
779 u16 pending_idx; member
785 u16 pending_idx, in xenvif_tx_create_map_op() argument
789 queue->pages_to_map[mop-queue->tx_map_ops] = queue->mmap_pages[pending_idx]; in xenvif_tx_create_map_op()
790 gnttab_set_map_op(mop, idx_to_kaddr(queue, pending_idx), in xenvif_tx_create_map_op()
794 memcpy(&queue->pending_tx_info[pending_idx].req, txp, in xenvif_tx_create_map_op()
822 u16 pending_idx = XENVIF_TX_CB(skb)->pending_idx; in xenvif_get_requests() local
838 start = (frag_get_pending_idx(&shinfo->frags[0]) == pending_idx); in xenvif_get_requests()
843 pending_idx = queue->pending_ring[index]; in xenvif_get_requests()
844 xenvif_tx_create_map_op(queue, pending_idx, txp, gop); in xenvif_get_requests()
845 frag_set_pending_idx(&frags[shinfo->nr_frags], pending_idx); in xenvif_get_requests()
863 pending_idx = queue->pending_ring[index]; in xenvif_get_requests()
864 xenvif_tx_create_map_op(queue, pending_idx, txp, gop); in xenvif_get_requests()
866 pending_idx); in xenvif_get_requests()
876 u16 pending_idx, in xenvif_grant_handle_set() argument
879 if (unlikely(queue->grant_tx_handle[pending_idx] != in xenvif_grant_handle_set()
883 pending_idx); in xenvif_grant_handle_set()
886 queue->grant_tx_handle[pending_idx] = handle; in xenvif_grant_handle_set()
890 u16 pending_idx) in xenvif_grant_handle_reset() argument
892 if (unlikely(queue->grant_tx_handle[pending_idx] == in xenvif_grant_handle_reset()
896 pending_idx); in xenvif_grant_handle_reset()
899 queue->grant_tx_handle[pending_idx] = NETBACK_INVALID_HANDLE; in xenvif_grant_handle_reset()
908 u16 pending_idx = XENVIF_TX_CB(skb)->pending_idx; in xenvif_tx_check_gop() local
919 frag_get_pending_idx(&shinfo->frags[0]) == pending_idx; in xenvif_tx_check_gop()
929 pending_idx, in xenvif_tx_check_gop()
933 xenvif_idx_release(queue, pending_idx, in xenvif_tx_check_gop()
942 pending_idx = frag_get_pending_idx(&shinfo->frags[i]); in xenvif_tx_check_gop()
949 pending_idx, in xenvif_tx_check_gop()
953 xenvif_idx_unmap(queue, pending_idx); in xenvif_tx_check_gop()
959 xenvif_idx_release(queue, pending_idx, in xenvif_tx_check_gop()
962 xenvif_idx_release(queue, pending_idx, in xenvif_tx_check_gop()
974 pending_idx, in xenvif_tx_check_gop()
977 xenvif_idx_release(queue, pending_idx, XEN_NETIF_RSP_ERROR); in xenvif_tx_check_gop()
988 XENVIF_TX_CB(skb)->pending_idx, in xenvif_tx_check_gop()
993 pending_idx = frag_get_pending_idx(&shinfo->frags[j]); in xenvif_tx_check_gop()
994 xenvif_idx_unmap(queue, pending_idx); in xenvif_tx_check_gop()
995 xenvif_idx_release(queue, pending_idx, in xenvif_tx_check_gop()
1004 pending_idx = frag_get_pending_idx(&first_shinfo->frags[j]); in xenvif_tx_check_gop()
1005 xenvif_idx_unmap(queue, pending_idx); in xenvif_tx_check_gop()
1006 xenvif_idx_release(queue, pending_idx, in xenvif_tx_check_gop()
1038 u16 pending_idx; in xenvif_fill_frags() local
1040 pending_idx = frag_get_pending_idx(frag); in xenvif_fill_frags()
1045 &callback_param(queue, pending_idx); in xenvif_fill_frags()
1048 &callback_param(queue, pending_idx); in xenvif_fill_frags()
1050 callback_param(queue, pending_idx).ctx = NULL; in xenvif_fill_frags()
1051 prev_pending_idx = pending_idx; in xenvif_fill_frags()
1053 txp = &queue->pending_tx_info[pending_idx].req; in xenvif_fill_frags()
1054 page = virt_to_page(idx_to_kaddr(queue, pending_idx)); in xenvif_fill_frags()
1061 get_page(queue->mmap_pages[pending_idx]); in xenvif_fill_frags()
1191 u16 pending_idx; in xenvif_tx_build_gops() local
1259 pending_idx = queue->pending_ring[index]; in xenvif_tx_build_gops()
1284 XENVIF_TX_CB(skb)->pending_idx = pending_idx; in xenvif_tx_build_gops()
1306 pending_idx); in xenvif_tx_build_gops()
1307 xenvif_tx_create_map_op(queue, pending_idx, &txreq, gop); in xenvif_tx_build_gops()
1312 memcpy(&queue->pending_tx_info[pending_idx].req, &txreq, in xenvif_tx_build_gops()
1418 u16 pending_idx; in xenvif_tx_submit() local
1421 pending_idx = XENVIF_TX_CB(skb)->pending_idx; in xenvif_tx_submit()
1422 txp = &queue->pending_tx_info[pending_idx].req; in xenvif_tx_submit()
1441 callback_param(queue, pending_idx).ctx = NULL; in xenvif_tx_submit()
1448 xenvif_idx_release(queue, pending_idx, in xenvif_tx_submit()
1532 u16 pending_idx = ubuf->desc; in xenvif_zerocopy_callback() local
1537 queue->dealloc_ring[index] = pending_idx; in xenvif_zerocopy_callback()
1558 u16 pending_idx, pending_idx_release[MAX_PENDING_REQS]; in xenvif_tx_dealloc_action() local
1575 pending_idx = in xenvif_tx_dealloc_action()
1579 pending_idx; in xenvif_tx_dealloc_action()
1581 queue->mmap_pages[pending_idx]; in xenvif_tx_dealloc_action()
1583 idx_to_kaddr(queue, pending_idx), in xenvif_tx_dealloc_action()
1585 queue->grant_tx_handle[pending_idx]); in xenvif_tx_dealloc_action()
1586 xenvif_grant_handle_reset(queue, pending_idx); in xenvif_tx_dealloc_action()
1649 static void xenvif_idx_release(struct xenvif_queue *queue, u16 pending_idx, in xenvif_idx_release() argument
1656 pending_tx_info = &queue->pending_tx_info[pending_idx]; in xenvif_idx_release()
1667 queue->pending_ring[index] = pending_idx; in xenvif_idx_release()
1724 void xenvif_idx_unmap(struct xenvif_queue *queue, u16 pending_idx) in xenvif_idx_unmap() argument
1730 idx_to_kaddr(queue, pending_idx), in xenvif_idx_unmap()
1732 queue->grant_tx_handle[pending_idx]); in xenvif_idx_unmap()
1733 xenvif_grant_handle_reset(queue, pending_idx); in xenvif_idx_unmap()
1736 &queue->mmap_pages[pending_idx], 1); in xenvif_idx_unmap()
1741 pending_idx, in xenvif_idx_unmap()