Files
scylladb/tests/ip_test.cc
Gleb Natapov fbef83beb0 net: support for num of cpus > num of queues
This patch introduce a logic to divide cpus between available hw queue
pairs. Each cpu with hw qp gets a set of cpus to distribute traffic
to. The algorithm doesn't take any topology considerations into account yet.
2014-12-16 10:53:41 +02:00

29 lines
652 B
C++

/*
* Copyright (C) 2014 Cloudius Systems, Ltd.
*/
#include "net/arp.hh"
#include "net/ip.hh"
#include "net/net.hh"
#include "core/reactor.hh"
#include "net/virtio.hh"
using namespace net;
int main(int ac, char** av) {
boost::program_options::variables_map opts;
opts.insert(std::make_pair("tap-device", boost::program_options::variable_value(std::string("tap0"), false)));
auto vnet = create_virtio_net_device(opts);
vnet->set_local_queue(vnet->init_local_queue(opts, 0));
interface netif(std::move(vnet));
ipv4 inet(&netif);
inet.set_host_address(ipv4_address("192.168.122.2"));
engine.run();
return 0;
}