linux/net/vmw_vsock/virtio_transport.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * virtio transport for vsock
 *
 * Copyright (C) 2013-2015 Red Hat, Inc.
 * Author: Asias He <[email protected]>
 *         Stefan Hajnoczi <[email protected]>
 *
 * Some of the code is take from Gerd Hoffmann <[email protected]>'s
 * early virtio-vsock proof-of-concept bits.
 */
#include <linux/spinlock.h>
#include <linux/module.h>
#include <linux/list.h>
#include <linux/atomic.h>
#include <linux/virtio.h>
#include <linux/virtio_ids.h>
#include <linux/virtio_config.h>
#include <linux/virtio_vsock.h>
#include <net/sock.h>
#include <linux/mutex.h>
#include <net/af_vsock.h>

static struct workqueue_struct *virtio_vsock_workqueue;
static struct virtio_vsock __rcu *the_virtio_vsock;
static DEFINE_MUTEX(the_virtio_vsock_mutex); /* protects the_virtio_vsock */
static struct virtio_transport virtio_transport; /* forward declaration */

struct virtio_vsock {};

static u32 virtio_transport_get_local_cid(void)
{}

static void
virtio_transport_send_pkt_work(struct work_struct *work)
{}

static int
virtio_transport_send_pkt(struct sk_buff *skb)
{}

static int
virtio_transport_cancel_pkt(struct vsock_sock *vsk)
{}

static void virtio_vsock_rx_fill(struct virtio_vsock *vsock)
{}

static void virtio_transport_tx_work(struct work_struct *work)
{}

/* Is there space left for replies to rx packets? */
static bool virtio_transport_more_replies(struct virtio_vsock *vsock)
{}

/* event_lock must be held */
static int virtio_vsock_event_fill_one(struct virtio_vsock *vsock,
				       struct virtio_vsock_event *event)
{}

/* event_lock must be held */
static void virtio_vsock_event_fill(struct virtio_vsock *vsock)
{}

static void virtio_vsock_reset_sock(struct sock *sk)
{}

static void virtio_vsock_update_guest_cid(struct virtio_vsock *vsock)
{}

/* event_lock must be held */
static void virtio_vsock_event_handle(struct virtio_vsock *vsock,
				      struct virtio_vsock_event *event)
{}

static void virtio_transport_event_work(struct work_struct *work)
{}

static void virtio_vsock_event_done(struct virtqueue *vq)
{}

static void virtio_vsock_tx_done(struct virtqueue *vq)
{}

static void virtio_vsock_rx_done(struct virtqueue *vq)
{}

static bool virtio_transport_can_msgzerocopy(int bufs_num)
{}

static bool virtio_transport_msgzerocopy_allow(void)
{}

static bool virtio_transport_seqpacket_allow(u32 remote_cid);

static struct virtio_transport virtio_transport =;

static bool virtio_transport_seqpacket_allow(u32 remote_cid)
{}

static void virtio_transport_rx_work(struct work_struct *work)
{}

static int virtio_vsock_vqs_init(struct virtio_vsock *vsock)
{}

static void virtio_vsock_vqs_start(struct virtio_vsock *vsock)
{}

static void virtio_vsock_vqs_del(struct virtio_vsock *vsock)
{}

static int virtio_vsock_probe(struct virtio_device *vdev)
{}

static void virtio_vsock_remove(struct virtio_device *vdev)
{}

#ifdef CONFIG_PM_SLEEP
static int virtio_vsock_freeze(struct virtio_device *vdev)
{}

static int virtio_vsock_restore(struct virtio_device *vdev)
{}
#endif /* CONFIG_PM_SLEEP */

static struct virtio_device_id id_table[] =;

static unsigned int features[] =;

static struct virtio_driver virtio_vsock_driver =;

static int __init virtio_vsock_init(void)
{}

static void __exit virtio_vsock_exit(void)
{}

module_init();
module_exit(virtio_vsock_exit);
MODULE_LICENSE();
MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_DEVICE_TABLE(virtio, id_table);