Lines Matching refs:pending_idx
106 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()
344 u16 pending_idx, in xenvif_tx_create_map_op() argument
349 queue->pages_to_map[mop-queue->tx_map_ops] = queue->mmap_pages[pending_idx]; in xenvif_tx_create_map_op()
350 gnttab_set_map_op(mop, idx_to_kaddr(queue, pending_idx), in xenvif_tx_create_map_op()
354 memcpy(&queue->pending_tx_info[pending_idx].req, txp, in xenvif_tx_create_map_op()
356 queue->pending_tx_info[pending_idx].extra_count = extra_count; in xenvif_tx_create_map_op()
389 u16 pending_idx; in xenvif_get_requests() local
420 pending_idx = queue->pending_ring[index]; in xenvif_get_requests()
421 callback_param(queue, pending_idx).ctx = NULL; in xenvif_get_requests()
422 copy_pending_idx(skb, copy_count(skb)) = pending_idx; in xenvif_get_requests()
431 memcpy(&queue->pending_tx_info[pending_idx].req, in xenvif_get_requests()
433 queue->pending_tx_info[pending_idx].extra_count = in xenvif_get_requests()
454 pending_idx = queue->pending_ring[index]; in xenvif_get_requests()
455 xenvif_tx_create_map_op(queue, pending_idx, txp, in xenvif_get_requests()
457 frag_set_pending_idx(&frags[shinfo->nr_frags], pending_idx); in xenvif_get_requests()
473 pending_idx = queue->pending_ring[index]; in xenvif_get_requests()
474 xenvif_tx_create_map_op(queue, pending_idx, txp, 0, in xenvif_get_requests()
477 pending_idx); in xenvif_get_requests()
488 u16 pending_idx, in xenvif_grant_handle_set() argument
491 if (unlikely(queue->grant_tx_handle[pending_idx] != in xenvif_grant_handle_set()
495 pending_idx); in xenvif_grant_handle_set()
498 queue->grant_tx_handle[pending_idx] = handle; in xenvif_grant_handle_set()
502 u16 pending_idx) in xenvif_grant_handle_reset() argument
504 if (unlikely(queue->grant_tx_handle[pending_idx] == in xenvif_grant_handle_reset()
508 pending_idx); in xenvif_grant_handle_reset()
511 queue->grant_tx_handle[pending_idx] = NETBACK_INVALID_HANDLE; in xenvif_grant_handle_reset()
520 u16 pending_idx; in xenvif_tx_check_gop() local
539 pending_idx = copy_pending_idx(skb, i); in xenvif_tx_check_gop()
545 xenvif_idx_release(queue, pending_idx, in xenvif_tx_check_gop()
553 pending_idx, in xenvif_tx_check_gop()
557 xenvif_idx_release(queue, pending_idx, in xenvif_tx_check_gop()
567 pending_idx = frag_get_pending_idx(&shinfo->frags[i]); in xenvif_tx_check_gop()
574 pending_idx, in xenvif_tx_check_gop()
578 xenvif_idx_unmap(queue, pending_idx); in xenvif_tx_check_gop()
584 xenvif_idx_release(queue, pending_idx, in xenvif_tx_check_gop()
587 xenvif_idx_release(queue, pending_idx, in xenvif_tx_check_gop()
599 pending_idx, in xenvif_tx_check_gop()
602 xenvif_idx_release(queue, pending_idx, XEN_NETIF_RSP_ERROR); in xenvif_tx_check_gop()
610 pending_idx = frag_get_pending_idx(&shinfo->frags[j]); in xenvif_tx_check_gop()
611 xenvif_idx_unmap(queue, pending_idx); in xenvif_tx_check_gop()
612 xenvif_idx_release(queue, pending_idx, in xenvif_tx_check_gop()
621 pending_idx = frag_get_pending_idx(&first_shinfo->frags[j]); in xenvif_tx_check_gop()
622 xenvif_idx_unmap(queue, pending_idx); in xenvif_tx_check_gop()
623 xenvif_idx_release(queue, pending_idx, in xenvif_tx_check_gop()
655 u16 pending_idx; in xenvif_fill_frags() local
657 pending_idx = frag_get_pending_idx(frag); in xenvif_fill_frags()
662 &callback_param(queue, pending_idx); in xenvif_fill_frags()
665 &callback_param(queue, pending_idx); in xenvif_fill_frags()
667 callback_param(queue, pending_idx).ctx = NULL; in xenvif_fill_frags()
668 prev_pending_idx = pending_idx; in xenvif_fill_frags()
670 txp = &queue->pending_tx_info[pending_idx].req; in xenvif_fill_frags()
671 page = virt_to_page(idx_to_kaddr(queue, pending_idx)); in xenvif_fill_frags()
678 get_page(queue->mmap_pages[pending_idx]); in xenvif_fill_frags()
886 u16 pending_idx; in xenvif_tx_build_gops() local
987 pending_idx = queue->pending_ring[index]; in xenvif_tx_build_gops()
1152 u16 pending_idx; in xenvif_tx_submit() local
1154 pending_idx = copy_pending_idx(skb, 0); in xenvif_tx_submit()
1155 txp = &queue->pending_tx_info[pending_idx].req; in xenvif_tx_submit()
1267 u16 pending_idx = ubuf->desc; in xenvif_zerocopy_callback() local
1272 queue->dealloc_ring[index] = pending_idx; in xenvif_zerocopy_callback()
1292 u16 pending_idx, pending_idx_release[MAX_PENDING_REQS]; in xenvif_tx_dealloc_action() local
1309 pending_idx = in xenvif_tx_dealloc_action()
1313 pending_idx; in xenvif_tx_dealloc_action()
1315 queue->mmap_pages[pending_idx]; in xenvif_tx_dealloc_action()
1317 idx_to_kaddr(queue, pending_idx), in xenvif_tx_dealloc_action()
1319 queue->grant_tx_handle[pending_idx]); in xenvif_tx_dealloc_action()
1320 xenvif_grant_handle_reset(queue, pending_idx); in xenvif_tx_dealloc_action()
1391 static void xenvif_idx_release(struct xenvif_queue *queue, u16 pending_idx, in xenvif_idx_release() argument
1398 pending_tx_info = &queue->pending_tx_info[pending_idx]; in xenvif_idx_release()
1410 queue->pending_ring[index] = pending_idx; in xenvif_idx_release()
1445 static void xenvif_idx_unmap(struct xenvif_queue *queue, u16 pending_idx) in xenvif_idx_unmap() argument
1451 idx_to_kaddr(queue, pending_idx), in xenvif_idx_unmap()
1453 queue->grant_tx_handle[pending_idx]); in xenvif_idx_unmap()
1454 xenvif_grant_handle_reset(queue, pending_idx); in xenvif_idx_unmap()
1457 &queue->mmap_pages[pending_idx], 1); in xenvif_idx_unmap()
1462 pending_idx, in xenvif_idx_unmap()