small_pools, which are responsible for allocations up to 16kB, aren't able
to provide a buffer with alignment stricter than a page. This results
in aligned allocations being broken for buffers in the range 4kB - 16kB.
This patch make sure that if the alignment requirement is too big for
small_pool to handle allocate_large_aligned() is used instead.
Fixes#36.
Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
The proper way to test whether posix_memalign() failed is to check its
return value, not the content of the pointer.
This also silences "ignoring return value of 'posix_memalign()'" diagnostic
messages.
Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
Reviewed-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
Some subscribers are allocated statically, so it is a churn to make
shared pointers from them. And since registered subscribers have to be
unregister before been destroyed anyway there is no lifetime issue here
that require use of a smart pointer.
Fixes issue #41
Packet doesn't have neither L2 nor L3 headers in the tcp::output_one(),
therefore comparing p.len() to MSS + L2_HDR + L3_HDR + L4_HDR when
payload size is greater than (MSS - L2_HDR - L3_HDR) gives the wrong
negative decision in regard to whether to send this frame as an TSO frame.
Fix the above by comparing the MSS to actual payload size.
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Reviewed-by: Asias He <asias@cloudius-systems.com>
This is not really HAVE_OSV but virtio-net, may need to change 'if (nic == virtio)' later, if we want to support virtio-net on Linux/SR-IOV on OSv.
Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
This is not really HAVE_OSV but virtio-net, may need to change 'if (nic == virtio)' later, if we want to support virtio-net on Linux/SR-IOV on OSv.
Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
OSv does not supported timer_create/timer_settime and thread based signal handling.
This patch implements timer function using OSv native timer and timer handler thread witch pinned to the CPU same as reactor thread.
Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
When configure.py called inside Makefile, dpdk_cflags() mistakenly extract "Entering directory" message. This patch prevent the problem.
Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
Starting with LZ4, the default compressor.
Stub functions were added to other compression algorithms, which should
eventually be replaced with an actual implementation.
Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
Add an option to enable/disable sending and respecting PAUSE frames as defined in
802.3x and 802.3z specifications. We will configure the Link level PAUSEs
(as opposed to PFC).
In simple words Ethernel Flow Control relies on sending/receiving PAUSE (XOFF) MAC frames that
indicate the sender that receiver's buffer is almost full. The idea is to avoid receive buffer overflow. When
receiver's buffer is being freed it will send XON frame to indicate to the sender that it may
transmit again.
- Added DPDK-specific command option to toggle the feature.
- Sending PAUSEs is enabled by default.
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
This automatically exposes them in partition_key and clustering_key too.
The iterators return bytes_view to components.
For example:
schema s;
partition_key k;
for (bytes_view component : boost::make_iterator_range(key.begin(s), key.end(s))) {
// ...
}
The 'bool' type doesn't hold any meaning on its own, which makes the
template instantiation sites not very readable:
tuple_type<true>
To improve that, we can introduce an enum class which is meaningful in
every context:
tuple_type<allow_prefixes::yes>
Origin is using CompositeType to serialize composite keys and that
type is using 16-bit integer to encode the length. If it's enough for
Origin, it's enough for us.