Lines Matching refs:nvchan
320 struct netvsc_channel *nvchan = &net_device->chan_table[q_idx]; in netvsc_alloc_recv_comp_ring() local
321 int node = cpu_to_node(nvchan->channel->target_cpu); in netvsc_alloc_recv_comp_ring()
325 nvchan->mrc.slots = vzalloc_node(size, node); in netvsc_alloc_recv_comp_ring()
326 if (!nvchan->mrc.slots) in netvsc_alloc_recv_comp_ring()
327 nvchan->mrc.slots = vzalloc(size); in netvsc_alloc_recv_comp_ring()
329 return nvchan->mrc.slots ? 0 : -ENOMEM; in netvsc_alloc_recv_comp_ring()
435 struct netvsc_channel *nvchan = &net_device->chan_table[i]; in netvsc_init_buf() local
437 nvchan->recv_buf = kzalloc(net_device->recv_section_size, GFP_KERNEL); in netvsc_init_buf()
438 if (nvchan->recv_buf == NULL) { in netvsc_init_buf()
1054 struct netvsc_channel * const nvchan = in netvsc_send_pkt() local
1056 struct vmbus_channel *out_channel = nvchan->channel; in netvsc_send_pkt()
1111 atomic_inc_return(&nvchan->queue_sends); in netvsc_send_pkt()
1128 atomic_read(&nvchan->queue_sends) < 1 && in netvsc_send_pkt()
1184 struct netvsc_channel *nvchan; in netvsc_send() local
1196 nvchan = &net_device->chan_table[packet->q_idx]; in netvsc_send()
1208 msdp = &nvchan->msd; in netvsc_send()
1301 struct netvsc_channel *nvchan) in send_recv_completions() argument
1303 struct multi_recv_comp *mrc = &nvchan->mrc; in send_recv_completions()
1318 ret = vmbus_sendpacket(nvchan->channel, &msg, sizeof(msg), in send_recv_completions()
1358 struct netvsc_channel *nvchan = &nvdev->chan_table[q_idx]; in enq_receive_complete() local
1359 struct multi_recv_comp *mrc = &nvchan->mrc; in enq_receive_complete()
1366 send_recv_completions(ndev, nvdev, nvchan); in enq_receive_complete()
1386 struct netvsc_channel *nvchan, in netvsc_receive() argument
1390 struct vmbus_channel *channel = nvchan->channel; in netvsc_receive()
1452 nvchan->rsc.cnt = 0; in netvsc_receive()
1465 nvchan->rsc.cnt = 0; in netvsc_receive()
1476 nvchan->rsc.is_last = (i == count - 1); in netvsc_receive()
1482 nvchan, data, buflen); in netvsc_receive()
1486 nvchan->rsc.cnt = 0; in netvsc_receive()
1595 struct netvsc_channel *nvchan, in netvsc_process_raw_pkt() argument
1601 struct vmbus_channel *channel = nvchan->channel; in netvsc_process_raw_pkt()
1612 return netvsc_receive(ndev, net_device, nvchan, desc); in netvsc_process_raw_pkt()
1640 struct netvsc_channel *nvchan in netvsc_poll() local
1642 struct netvsc_device *net_device = nvchan->net_device; in netvsc_poll()
1643 struct vmbus_channel *channel = nvchan->channel; in netvsc_poll()
1650 if (!nvchan->desc) in netvsc_poll()
1651 nvchan->desc = hv_pkt_iter_first(channel); in netvsc_poll()
1653 nvchan->xdp_flush = false; in netvsc_poll()
1655 while (nvchan->desc && work_done < budget) { in netvsc_poll()
1656 work_done += netvsc_process_raw_pkt(device, nvchan, net_device, in netvsc_poll()
1657 ndev, nvchan->desc, budget); in netvsc_poll()
1658 nvchan->desc = hv_pkt_iter_next(channel, nvchan->desc); in netvsc_poll()
1661 if (nvchan->xdp_flush) in netvsc_poll()
1665 ret = send_recv_completions(ndev, net_device, nvchan); in netvsc_poll()
1690 struct netvsc_channel *nvchan = context; in netvsc_channel_cb() local
1691 struct vmbus_channel *channel = nvchan->channel; in netvsc_channel_cb()
1697 if (napi_schedule_prep(&nvchan->napi)) { in netvsc_channel_cb()
1701 __napi_schedule_irqoff(&nvchan->napi); in netvsc_channel_cb()
1737 struct netvsc_channel *nvchan = &net_device->chan_table[i]; in netvsc_device_add() local
1739 nvchan->channel = device->channel; in netvsc_device_add()
1740 nvchan->net_device = net_device; in netvsc_device_add()
1741 u64_stats_init(&nvchan->tx_stats.syncp); in netvsc_device_add()
1742 u64_stats_init(&nvchan->rx_stats.syncp); in netvsc_device_add()
1744 ret = xdp_rxq_info_reg(&nvchan->xdp_rxq, ndev, i, 0); in netvsc_device_add()
1751 ret = xdp_rxq_info_reg_mem_model(&nvchan->xdp_rxq, in netvsc_device_add()