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()
825 u16 pending_idx; member
831 u16 pending_idx, in xenvif_tx_create_map_op() argument
835 queue->pages_to_map[mop-queue->tx_map_ops] = queue->mmap_pages[pending_idx]; in xenvif_tx_create_map_op()
836 gnttab_set_map_op(mop, idx_to_kaddr(queue, pending_idx), in xenvif_tx_create_map_op()
840 memcpy(&queue->pending_tx_info[pending_idx].req, txp, in xenvif_tx_create_map_op()
870 u16 pending_idx = XENVIF_TX_CB(skb)->pending_idx; in xenvif_get_requests() local
878 start = (frag_get_pending_idx(&shinfo->frags[0]) == pending_idx); in xenvif_get_requests()
883 pending_idx = queue->pending_ring[index]; in xenvif_get_requests()
884 xenvif_tx_create_map_op(queue, pending_idx, txp, gop); in xenvif_get_requests()
885 frag_set_pending_idx(&frags[shinfo->nr_frags], pending_idx); in xenvif_get_requests()
896 pending_idx = queue->pending_ring[index]; in xenvif_get_requests()
897 xenvif_tx_create_map_op(queue, pending_idx, txp, gop); in xenvif_get_requests()
899 pending_idx); in xenvif_get_requests()
909 u16 pending_idx, in xenvif_grant_handle_set() argument
912 if (unlikely(queue->grant_tx_handle[pending_idx] != in xenvif_grant_handle_set()
916 pending_idx); in xenvif_grant_handle_set()
919 queue->grant_tx_handle[pending_idx] = handle; in xenvif_grant_handle_set()
923 u16 pending_idx) in xenvif_grant_handle_reset() argument
925 if (unlikely(queue->grant_tx_handle[pending_idx] == in xenvif_grant_handle_reset()
929 pending_idx); in xenvif_grant_handle_reset()
932 queue->grant_tx_handle[pending_idx] = NETBACK_INVALID_HANDLE; in xenvif_grant_handle_reset()
941 u16 pending_idx = XENVIF_TX_CB(skb)->pending_idx; in xenvif_tx_check_gop() local
952 frag_get_pending_idx(&shinfo->frags[0]) == pending_idx; in xenvif_tx_check_gop()
962 pending_idx, in xenvif_tx_check_gop()
966 xenvif_idx_release(queue, pending_idx, in xenvif_tx_check_gop()
975 pending_idx = frag_get_pending_idx(&shinfo->frags[i]); in xenvif_tx_check_gop()
982 pending_idx, in xenvif_tx_check_gop()
986 xenvif_idx_unmap(queue, pending_idx); in xenvif_tx_check_gop()
992 xenvif_idx_release(queue, pending_idx, in xenvif_tx_check_gop()
995 xenvif_idx_release(queue, pending_idx, in xenvif_tx_check_gop()
1007 pending_idx, in xenvif_tx_check_gop()
1010 xenvif_idx_release(queue, pending_idx, XEN_NETIF_RSP_ERROR); in xenvif_tx_check_gop()
1021 XENVIF_TX_CB(skb)->pending_idx, in xenvif_tx_check_gop()
1026 pending_idx = frag_get_pending_idx(&shinfo->frags[j]); in xenvif_tx_check_gop()
1027 xenvif_idx_unmap(queue, pending_idx); in xenvif_tx_check_gop()
1028 xenvif_idx_release(queue, pending_idx, in xenvif_tx_check_gop()
1037 pending_idx = frag_get_pending_idx(&first_shinfo->frags[j]); in xenvif_tx_check_gop()
1038 xenvif_idx_unmap(queue, pending_idx); in xenvif_tx_check_gop()
1039 xenvif_idx_release(queue, pending_idx, in xenvif_tx_check_gop()
1071 u16 pending_idx; in xenvif_fill_frags() local
1073 pending_idx = frag_get_pending_idx(frag); in xenvif_fill_frags()
1078 &callback_param(queue, pending_idx); in xenvif_fill_frags()
1081 &callback_param(queue, pending_idx); in xenvif_fill_frags()
1083 callback_param(queue, pending_idx).ctx = NULL; in xenvif_fill_frags()
1084 prev_pending_idx = pending_idx; in xenvif_fill_frags()
1086 txp = &queue->pending_tx_info[pending_idx].req; in xenvif_fill_frags()
1087 page = virt_to_page(idx_to_kaddr(queue, pending_idx)); in xenvif_fill_frags()
1094 get_page(queue->mmap_pages[pending_idx]); in xenvif_fill_frags()
1298 u16 pending_idx; in xenvif_tx_build_gops() local
1391 pending_idx = queue->pending_ring[index]; in xenvif_tx_build_gops()
1440 XENVIF_TX_CB(skb)->pending_idx = pending_idx; in xenvif_tx_build_gops()
1460 pending_idx); in xenvif_tx_build_gops()
1461 xenvif_tx_create_map_op(queue, pending_idx, &txreq, gop); in xenvif_tx_build_gops()
1466 memcpy(&queue->pending_tx_info[pending_idx].req, &txreq, in xenvif_tx_build_gops()
1567 u16 pending_idx; in xenvif_tx_submit() local
1570 pending_idx = XENVIF_TX_CB(skb)->pending_idx; in xenvif_tx_submit()
1571 txp = &queue->pending_tx_info[pending_idx].req; in xenvif_tx_submit()
1590 callback_param(queue, pending_idx).ctx = NULL; in xenvif_tx_submit()
1597 xenvif_idx_release(queue, pending_idx, in xenvif_tx_submit()
1681 u16 pending_idx = ubuf->desc; in xenvif_zerocopy_callback() local
1686 queue->dealloc_ring[index] = pending_idx; in xenvif_zerocopy_callback()
1706 u16 pending_idx, pending_idx_release[MAX_PENDING_REQS]; in xenvif_tx_dealloc_action() local
1723 pending_idx = in xenvif_tx_dealloc_action()
1727 pending_idx; in xenvif_tx_dealloc_action()
1729 queue->mmap_pages[pending_idx]; in xenvif_tx_dealloc_action()
1731 idx_to_kaddr(queue, pending_idx), in xenvif_tx_dealloc_action()
1733 queue->grant_tx_handle[pending_idx]); in xenvif_tx_dealloc_action()
1734 xenvif_grant_handle_reset(queue, pending_idx); in xenvif_tx_dealloc_action()
1797 static void xenvif_idx_release(struct xenvif_queue *queue, u16 pending_idx, in xenvif_idx_release() argument
1804 pending_tx_info = &queue->pending_tx_info[pending_idx]; in xenvif_idx_release()
1815 queue->pending_ring[index] = pending_idx; in xenvif_idx_release()
1872 void xenvif_idx_unmap(struct xenvif_queue *queue, u16 pending_idx) in xenvif_idx_unmap() argument
1878 idx_to_kaddr(queue, pending_idx), in xenvif_idx_unmap()
1880 queue->grant_tx_handle[pending_idx]); in xenvif_idx_unmap()
1881 xenvif_grant_handle_reset(queue, pending_idx); in xenvif_idx_unmap()
1884 &queue->mmap_pages[pending_idx], 1); in xenvif_idx_unmap()
1889 pending_idx, in xenvif_idx_unmap()