Lines Matching refs:nvchan
323 struct netvsc_channel *nvchan = &net_device->chan_table[q_idx]; in netvsc_alloc_recv_comp_ring() local
324 int node = cpu_to_node(nvchan->channel->target_cpu); in netvsc_alloc_recv_comp_ring()
328 nvchan->mrc.slots = vzalloc_node(size, node); in netvsc_alloc_recv_comp_ring()
329 if (!nvchan->mrc.slots) in netvsc_alloc_recv_comp_ring()
330 nvchan->mrc.slots = vzalloc(size); in netvsc_alloc_recv_comp_ring()
332 return nvchan->mrc.slots ? 0 : -ENOMEM; in netvsc_alloc_recv_comp_ring()
438 struct netvsc_channel *nvchan = &net_device->chan_table[i]; in netvsc_init_buf() local
440 nvchan->recv_buf = kzalloc(net_device->recv_section_size, GFP_KERNEL); in netvsc_init_buf()
441 if (nvchan->recv_buf == NULL) { in netvsc_init_buf()
1103 struct netvsc_channel * const nvchan = in netvsc_send_pkt() local
1105 struct vmbus_channel *out_channel = nvchan->channel; in netvsc_send_pkt()
1164 atomic_inc_return(&nvchan->queue_sends); in netvsc_send_pkt()
1181 atomic_read(&nvchan->queue_sends) < 1 && in netvsc_send_pkt()
1237 struct netvsc_channel *nvchan; in netvsc_send() local
1249 nvchan = &net_device->chan_table[packet->q_idx]; in netvsc_send()
1261 msdp = &nvchan->msd; in netvsc_send()
1354 struct netvsc_channel *nvchan) in send_recv_completions() argument
1356 struct multi_recv_comp *mrc = &nvchan->mrc; in send_recv_completions()
1371 ret = vmbus_sendpacket(nvchan->channel, &msg, sizeof(msg), in send_recv_completions()
1411 struct netvsc_channel *nvchan = &nvdev->chan_table[q_idx]; in enq_receive_complete() local
1412 struct multi_recv_comp *mrc = &nvchan->mrc; in enq_receive_complete()
1419 send_recv_completions(ndev, nvdev, nvchan); in enq_receive_complete()
1439 struct netvsc_channel *nvchan, in netvsc_receive() argument
1443 struct vmbus_channel *channel = nvchan->channel; in netvsc_receive()
1505 nvchan->rsc.cnt = 0; in netvsc_receive()
1518 nvchan->rsc.cnt = 0; in netvsc_receive()
1529 nvchan->rsc.is_last = (i == count - 1); in netvsc_receive()
1535 nvchan, data, buflen); in netvsc_receive()
1539 nvchan->rsc.cnt = 0; in netvsc_receive()
1648 struct netvsc_channel *nvchan, in netvsc_process_raw_pkt() argument
1654 struct vmbus_channel *channel = nvchan->channel; in netvsc_process_raw_pkt()
1665 return netvsc_receive(ndev, net_device, nvchan, desc); in netvsc_process_raw_pkt()
1693 struct netvsc_channel *nvchan in netvsc_poll() local
1695 struct netvsc_device *net_device = nvchan->net_device; in netvsc_poll()
1696 struct vmbus_channel *channel = nvchan->channel; in netvsc_poll()
1703 if (!nvchan->desc) in netvsc_poll()
1704 nvchan->desc = hv_pkt_iter_first(channel); in netvsc_poll()
1706 nvchan->xdp_flush = false; in netvsc_poll()
1708 while (nvchan->desc && work_done < budget) { in netvsc_poll()
1709 work_done += netvsc_process_raw_pkt(device, nvchan, net_device, in netvsc_poll()
1710 ndev, nvchan->desc, budget); in netvsc_poll()
1711 nvchan->desc = hv_pkt_iter_next(channel, nvchan->desc); in netvsc_poll()
1714 if (nvchan->xdp_flush) in netvsc_poll()
1718 ret = send_recv_completions(ndev, net_device, nvchan); in netvsc_poll()
1743 struct netvsc_channel *nvchan = context; in netvsc_channel_cb() local
1744 struct vmbus_channel *channel = nvchan->channel; in netvsc_channel_cb()
1750 if (napi_schedule_prep(&nvchan->napi)) { in netvsc_channel_cb()
1754 __napi_schedule_irqoff(&nvchan->napi); in netvsc_channel_cb()
1790 struct netvsc_channel *nvchan = &net_device->chan_table[i]; in netvsc_device_add() local
1792 nvchan->channel = device->channel; in netvsc_device_add()
1793 nvchan->net_device = net_device; in netvsc_device_add()
1794 u64_stats_init(&nvchan->tx_stats.syncp); in netvsc_device_add()
1795 u64_stats_init(&nvchan->rx_stats.syncp); in netvsc_device_add()
1797 ret = xdp_rxq_info_reg(&nvchan->xdp_rxq, ndev, i, 0); in netvsc_device_add()
1804 ret = xdp_rxq_info_reg_mem_model(&nvchan->xdp_rxq, in netvsc_device_add()