> > Hi Akhil, > > It is possible the user don't know how many ops to dequeue. > For example in VPP crypto up to 64 buffers (vnet_crypto_async_frame_elt_t) > are wrapped into the following data structure > > typedef struct > { > CLIB_CACHE_LINE_ALIGN_MARK (cacheline0); > vnet_crypto_async_frame_state_t state; > vnet_crypto_async_op_id_t op:8; > u16 n_elts; > vnet_crypto_async_frame_elt_t elts[VNET_CRYPTO_FRAME_SIZE]; > u32 buffer_indices[VNET_CRYPTO_FRAME_SIZE]; > u16 next_node_index[VNET_CRYPTO_FRAME_SIZE]; > u32 enqueue_thread_index; > } vnet_crypto_async_frame_t; > > Instead of passing vnet_crypto_async_frame_elt_t Pointer as metadata to > cryptodev, we have to pass vnet_crypto_async_frame_t pointer into > cryptodev. > The callback function helps parse the first dequeued metadata to get n_elts > and will dequeue that many ops. > > But in case we cannot dequeue the whole frame, passing the number of ops > not dequeued yet in the next dequeue_burst operation should help us to > dequeue the whole frame. In this case we only have to cache up to 1 frame > pointer for half dequeued frame. > > As the patch stated this should help cover both cases for user either dequeue > the wrapped data structure with multiple buffers, or dequeue a burst of > packets - hence giving people more flexibility. > > Regards, > Fan > Ok.
Acked-by: Akhil Goyal <gak...@marvell.com>