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