Lines Matching refs:pending_idx

107 static void xenvif_idx_release(struct xenvif_queue *queue, u16 pending_idx,
115 static void xenvif_idx_unmap(struct xenvif_queue *queue, u16 pending_idx);
131 #define callback_param(vif, pending_idx) \ argument
132 (vif->pending_tx_info[pending_idx].callback_struct)
138 u16 pending_idx = ubuf->desc; in ubuf_to_queue() local
141 return container_of(temp - pending_idx, in ubuf_to_queue()
151 static void frag_set_pending_idx(skb_frag_t *frag, u16 pending_idx) in frag_set_pending_idx() argument
153 skb_frag_off_set(frag, pending_idx); in frag_set_pending_idx()
341 u16 pending_idx, in xenvif_tx_create_map_op() argument
346 queue->pages_to_map[mop-queue->tx_map_ops] = queue->mmap_pages[pending_idx]; in xenvif_tx_create_map_op()
347 gnttab_set_map_op(mop, idx_to_kaddr(queue, pending_idx), in xenvif_tx_create_map_op()
351 memcpy(&queue->pending_tx_info[pending_idx].req, txp, in xenvif_tx_create_map_op()
353 queue->pending_tx_info[pending_idx].extra_count = extra_count; in xenvif_tx_create_map_op()
388 u16 pending_idx; in xenvif_get_requests() local
428 pending_idx = queue->pending_ring[index]; in xenvif_get_requests()
429 callback_param(queue, pending_idx).ctx = NULL; in xenvif_get_requests()
430 copy_pending_idx(skb, copy_count(skb)) = pending_idx; in xenvif_get_requests()
440 memcpy(&queue->pending_tx_info[pending_idx].req, in xenvif_get_requests()
442 queue->pending_tx_info[pending_idx].extra_count = in xenvif_get_requests()
470 pending_idx = queue->pending_ring[index]; in xenvif_get_requests()
471 xenvif_tx_create_map_op(queue, pending_idx, txp, in xenvif_get_requests()
473 frag_set_pending_idx(&frags[shinfo->nr_frags], pending_idx); in xenvif_get_requests()
496 pending_idx = queue->pending_ring[index]; in xenvif_get_requests()
497 xenvif_tx_create_map_op(queue, pending_idx, txp, 0, in xenvif_get_requests()
500 pending_idx); in xenvif_get_requests()
524 u16 pending_idx, in xenvif_grant_handle_set() argument
527 if (unlikely(queue->grant_tx_handle[pending_idx] != in xenvif_grant_handle_set()
531 pending_idx); in xenvif_grant_handle_set()
534 queue->grant_tx_handle[pending_idx] = handle; in xenvif_grant_handle_set()
538 u16 pending_idx) in xenvif_grant_handle_reset() argument
540 if (unlikely(queue->grant_tx_handle[pending_idx] == in xenvif_grant_handle_reset()
544 pending_idx); in xenvif_grant_handle_reset()
547 queue->grant_tx_handle[pending_idx] = NETBACK_INVALID_HANDLE; in xenvif_grant_handle_reset()
556 u16 pending_idx; in xenvif_tx_check_gop() local
575 pending_idx = copy_pending_idx(skb, i); in xenvif_tx_check_gop()
588 xenvif_idx_release(queue, pending_idx, in xenvif_tx_check_gop()
596 pending_idx, in xenvif_tx_check_gop()
600 xenvif_idx_release(queue, pending_idx, in xenvif_tx_check_gop()
610 pending_idx = frag_get_pending_idx(&shinfo->frags[i]); in xenvif_tx_check_gop()
617 pending_idx, in xenvif_tx_check_gop()
621 xenvif_idx_unmap(queue, pending_idx); in xenvif_tx_check_gop()
627 xenvif_idx_release(queue, pending_idx, in xenvif_tx_check_gop()
630 xenvif_idx_release(queue, pending_idx, in xenvif_tx_check_gop()
642 pending_idx, in xenvif_tx_check_gop()
645 xenvif_idx_release(queue, pending_idx, XEN_NETIF_RSP_ERROR); in xenvif_tx_check_gop()
653 pending_idx = frag_get_pending_idx(&shinfo->frags[j]); in xenvif_tx_check_gop()
654 xenvif_idx_unmap(queue, pending_idx); in xenvif_tx_check_gop()
655 xenvif_idx_release(queue, pending_idx, in xenvif_tx_check_gop()
664 pending_idx = frag_get_pending_idx(&first_shinfo->frags[j]); in xenvif_tx_check_gop()
665 xenvif_idx_unmap(queue, pending_idx); in xenvif_tx_check_gop()
666 xenvif_idx_release(queue, pending_idx, in xenvif_tx_check_gop()
698 u16 pending_idx; in xenvif_fill_frags() local
700 pending_idx = frag_get_pending_idx(frag); in xenvif_fill_frags()
705 &callback_param(queue, pending_idx); in xenvif_fill_frags()
708 &callback_param(queue, pending_idx); in xenvif_fill_frags()
710 callback_param(queue, pending_idx).ctx = NULL; in xenvif_fill_frags()
711 prev_pending_idx = pending_idx; in xenvif_fill_frags()
713 txp = &queue->pending_tx_info[pending_idx].req; in xenvif_fill_frags()
714 page = virt_to_page((void *)idx_to_kaddr(queue, pending_idx)); in xenvif_fill_frags()
721 get_page(queue->mmap_pages[pending_idx]); in xenvif_fill_frags()
1180 u16 pending_idx; in xenvif_tx_submit() local
1182 pending_idx = copy_pending_idx(skb, 0); in xenvif_tx_submit()
1183 txp = &queue->pending_tx_info[pending_idx].req; in xenvif_tx_submit()
1296 u16 pending_idx = ubuf->desc; in xenvif_zerocopy_callback() local
1301 queue->dealloc_ring[index] = pending_idx; in xenvif_zerocopy_callback()
1325 u16 pending_idx, pending_idx_release[MAX_PENDING_REQS]; in xenvif_tx_dealloc_action() local
1342 pending_idx = in xenvif_tx_dealloc_action()
1346 pending_idx; in xenvif_tx_dealloc_action()
1348 queue->mmap_pages[pending_idx]; in xenvif_tx_dealloc_action()
1350 idx_to_kaddr(queue, pending_idx), in xenvif_tx_dealloc_action()
1352 queue->grant_tx_handle[pending_idx]); in xenvif_tx_dealloc_action()
1353 xenvif_grant_handle_reset(queue, pending_idx); in xenvif_tx_dealloc_action()
1451 static void xenvif_idx_release(struct xenvif_queue *queue, u16 pending_idx, in xenvif_idx_release() argument
1458 pending_tx_info = &queue->pending_tx_info[pending_idx]; in xenvif_idx_release()
1470 queue->pending_ring[index] = pending_idx; in xenvif_idx_release()
1492 static void xenvif_idx_unmap(struct xenvif_queue *queue, u16 pending_idx) in xenvif_idx_unmap() argument
1498 idx_to_kaddr(queue, pending_idx), in xenvif_idx_unmap()
1500 queue->grant_tx_handle[pending_idx]); in xenvif_idx_unmap()
1501 xenvif_grant_handle_reset(queue, pending_idx); in xenvif_idx_unmap()
1504 &queue->mmap_pages[pending_idx], 1); in xenvif_idx_unmap()
1509 pending_idx, in xenvif_idx_unmap()