Files
scylladb/net/virtio.hh
Gleb Natapov 73f6d943e1 net: separate device initialization from queues initialization
This patch adds new class distributed_device which is responsible for
initializing HW device and it is shared between all cpus. Old device
class responsibility becomes managing rx/tx queue pair and it is local
per cpu. Each cpu have to call distributed_device::init_local_queue() to
create its own device. The logic to distribute cpus between available
queues (in case there is no enough queues for each cpu) is in the
distributed_device currently and not really implemented yet, so only one
queue or queues == cpus scenarios are supported currently, but this can
be fixed later.

The plan is to rename "distributed_device" to "device" and "device"
to "queue_pair" in later patches.
2014-12-09 18:55:14 +02:00

16 lines
416 B
C++

/*
* Copyright (C) 2014 Cloudius Systems, Ltd.
*/
#ifndef VIRTIO_HH_
#define VIRTIO_HH_
#include <memory>
#include "net.hh"
#include "core/sstring.hh"
std::unique_ptr<net::distributed_device> create_virtio_net_device(boost::program_options::variables_map opts = boost::program_options::variables_map());
boost::program_options::options_description get_virtio_net_options_description();
#endif /* VIRTIO_HH_ */