We use sequence numbers from a generator which has potentially started
long before the receiver. Therefore, the first number will typically
be > 0. The rte_reorder code will not work in this case, since the
packet is seen as outside of the buffer.
The patch instead records the first sequence number inserted as the
starting point.
Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Signed-off-by: Johan Faltstrom <johan.faltstrom@netinsight.net>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
unsigned int memsize; /**< memory area size of reorder buffer */
struct cir_buffer ready_buf; /**< temp buffer for dequeued entries */
struct cir_buffer order_buf; /**< buffer used to reorder entries */
+ int is_initialized;
} __rte_cache_aligned;
static void
uint32_t offset, position;
struct cir_buffer *order_buf = &b->order_buf;
+ if (!b->is_initialized) {
+ b->min_seqn = mbuf->seqn;
+ b->is_initialized = 1;
+ }
+
/*
* calculate the offset from the head pointer we need to go.
* The subtraction takes care of the sequence number wrapping.