In order to improve rx performance we need to reduce the amount of copies that are made. By using a refcount and by allocating dynamically the rx buffers we can avoid copies at the cost of memory allocation, only in the case where data is processed out of context [note: that is the case of query replies in latest consolidation mode].
The rx buffers (zbuf_t) now have a refcounted slice. If after processing there are more than 1 refcount, the transport will allocate a new buffer.
Fixed a few undefined behaviors in tests and examples.
In order to improve rx performance we need to reduce the amount of copies that are made. By using a refcount and by allocating dynamically the rx buffers we can avoid copies at the cost of memory allocation, only in the case where data is processed out of context [note: that is the case of query replies in latest consolidation mode].