Directory listing support, using subscription<sstring> to represent the
stream of file names produced by the directory lister running in parallel
with the directory consumer.
Remove pre-poll-mode code, from Gleb:
"This series moves most of eventfd users to use other form of notification
which can be polled without entering the kernel and moving epoll in its own
poller which is enabled only if there is an fd that needs to be polled."
[avi: add -lrt to linker command line]
It listens for requests on port 10000 and sends responses comprised of
three chunks of data in one packet. The chunk sizes are specified via
the --chunk-size argument.
The reqest can be anything, its content is ignored.
You can switch to equivalent copying version by passing --copy
argument.
The command line linking with DPDK's libraries looked like a cross between
random character generator and black magic. Reading a bit on the DPDK
mailing list, it turns out there is method in this madness (flawed method,
but method nontheless):
1. Instead of using "-l..." they used "-Wl,-l..." everywhere. Turns out
they did this ugliness to "hide" this option from libtool.
We don't use libtool, and don't need to hide anything from it.
2. They used "--start-group ... --end-group" to avoid having to figure
out the right link order.
It was easy to figure out the right link order and avoid this option.
3. They used "--whole-archive" on all the DPDK libraries. Unfortunately,
this option *is* needed, because the way DPDK is written, it is not
suited to be compiled into an (non-shared) library: Each of the DPDK
drivers ("librte_pmd_*") has a constructor function which needs to
run to register itself. This works fine with shared libraries (whose
constructors are run on load) but with a ".a" library, the whole
library is left out because nothing from the outside refers to any
of its symbols.
So what we should do is to use --whole-archive only on the PMD drivers,
and all will be fully compiled into the generated program. The rest of
the DPDK libraries will be linked normally, and hopefully because we
don't use large parts of DPDK, big chunks will not be compiled in.
If we don't add this "--whole-archive", none of the drivers will be
compiled into the program, the initialization will not be able to
find any driver, and just complain there are no ethernet ports.
After this patch, Seastar with DPDK still compiles, and runs.
Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Reviewed-by: Vlad Zolotarov <vladz@cloudius-systems.com>
With gcc 4.9.2, build with DPDK enabled breaks with error like:
../dpdk-1.7.1/x86_64-native-linuxapp-gcc/include/rte_pci.h:99:37:
warning: invalid suffix on literal; C++11 requires a space between literal
and string macro [-Wliteral-suffix]
#define PCI_SHORT_PRI_FMT "%.2"PRIx8":%.2"PRIx8".%"PRIx8
The problem is that C++11 outlawed, breaking decades of proud C-preprocessor
tradition, using a macro if stuck to the end of a string. But this used
in DPDK's header files, so we need to turn this error into a warning
(let's keep the warning, hopefully it will disappear in newer versions
of DPDK).
Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
- Currently only a single port and a single queue are supported.
- All DPDK EAL configuration is hard-coded in the dpdk_net_device constructor instead
of coming from the app parameters.
- No offload features are enabled.
- Tx: will spin in the dpdk_net_device::send() till there is a place in the HW ring to
place a current packet.
- Tx: copy data from the `packet` frags into the rte_mbuf's data.
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
This patch adds "smp queue polling before going idle" to the reactor.
It allows to avoid signalfd overhead in case receiver thread is not idle
when message is sent. With this patch on top of two other patches from
me that are still waiting to be committed I see 450120 Requests/sec with
wrk and "httpd -c 2 --network-stack native" with native stack. With one
cpu the result is 316002, so we have around 40% scaling. The bottleneck
in this test is cpu 0 which takes 100% cpu time.
Fixes the following link errors when Xen support is disabled:
build/release/net/native-stack.o: In function `net::add_native_net_options_description(boost::program_options::options_description&)':
/seastar/net/native-stack.cc:101: undefined reference to `get_xenfront_net_options_description()'
build/release/net/native-stack.o: In function `net::create_native_net_device(boost::program_options::variables_map)':
/seastar/net/native-stack.cc:93: undefined reference to `create_xenfront_net_device(boost::program_options::variables_map, bool)'
collect2: error: ld returned 1 exit status
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
This is the basic support for xenfront. It can be used in domU, provided there
is a network interface to be hijacked.
The code that follows, is just the mechanics of managing the grants, event
channels, etc.
However, it does not yet work: I can't see netback injecting any data into it.
I am still debugging the protocol, but I wanted to flush the current state.
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
This patch enables xen event channels. It creates the placeholder for the
kernel evtchns when we move to OSv as well.
The main problem with this patch, is that evtchn::pending can return more than
one evtchn, so this that I am doing here is technically wrong. We should probably
call keep_doing() in pending() itself, and have that to store the references to
futures equivalent to the possible event channels, that would then be made ready.
I am, however, having a bit of a hard time coding this, since it's still
unclear how, once the future is consumed, we would generate the next.
Please note: All of this is moot if we disable "split event channels", which
can be done by masking that feature in case it is even available. In that case,
only one event channel will be notified, and when ready, we process both tx and
rx. This is yet another reason why I haven't insisted so much in fixing this properly
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
This patch creates a seastar enabled version of the xen gntalloc device.
TODO: grow the table dynamically, and fix the index selection algorithm. Shouldn't
just always bump 1.
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Simple discovery class + usage of it in the native stack init.
DHCP discovery will be default if no other ip options are set on command
line, and not explicitly turned off.
Signed-off-by: Calle Wilund <calle@cloudius-systems.com>
Currently, it is a ping/pong sever. When the client sends a ping, the
server responds a pong. We can add more tests to extend.
This is useful for testing TCP_RR.
This patch enables to interact with xenstore. Since now OSv now fakes the
presence of libxenstore, the code is the same for userspace and kernel.
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Reorder the file in a way, as to allow the usage of command line switches
in the construction of the compiled objects.
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Add a "--with-osv=<path>" option to configure.py as a shortcut to
the long list of options needed to compile Seastar for OSv (as
explained in README-OSv)
Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Per-cpu value list registry with polling -> udp send
- Allows registration of metric values associated with
collectd id path (plugin/[plugin-inst/]type[/type-instance]).
- Values are broadcast/sent at periodic intervals. (config)
- Config through seastar.conf / app-template.
- Value registration can be revoked safely, either manually or
through anchor.
Signed-off-by: Calle Wilund <calle@cloudius-systems.com>
The protocol is called the "memcache protocol" but the server should
follow the same naming convention as httpd does.
It should not be a big deal but it annoys the hell out of simple people
like myself who have their brain hard-wired to type the final "d"...
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Asynchronous test cases can be delared using SEASTAR_TEST_CASE macro,
which is equivalent to BOOST_AUTO_TEST_CASE, but the function body is
run inside a reactor and can returns a future<> which resolves when
the test is done.
NOTE: This patch makes pollable_fd::get_file_desc public in order to
access it in posix_server_socket_impl::accept(). Maybe there is a better
solution. But, fow now, this avoids a lot of including game.