mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-24 10:30:38 +00:00
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.
25 lines
671 B
C++
25 lines
671 B
C++
/*
|
|
* Copyright (C) 2014 Cloudius Systems, Ltd.
|
|
*/
|
|
|
|
#ifdef HAVE_DPDK
|
|
|
|
#ifndef _SEASTAR_DPDK_DEV_H
|
|
#define _SEASTAR_DPDK_DEV_H
|
|
|
|
#include <memory>
|
|
#include "net.hh"
|
|
#include "core/sstring.hh"
|
|
|
|
std::unique_ptr<net::distributed_device> create_dpdk_net_device(
|
|
boost::program_options::variables_map opts =
|
|
boost::program_options::variables_map(),
|
|
uint8_t port_idx = 0,
|
|
uint8_t num_queues = 1);
|
|
|
|
boost::program_options::options_description get_dpdk_net_options_description();
|
|
|
|
#endif // _SEASTAR_DPDK_DEV_H
|
|
|
|
#endif // HAVE_DPDK
|