When batch_size == 1, idxd has to add a dummy termination descriptor
to satisfy HW requirements.
Right now it uses NOP descriptor with FENCE flag.
This is excessive and fencing can slowdown things quite significantly.
The patch removes FENCE flag from termination dummy descriptor.
That helps to improve performance for no-burst scenarios.
Fixes:
245efe544d8e ("raw/ioat: report status of completed jobs")
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
src, dst, length, &hdl);
}
+static __rte_always_inline int
+__idxd_enqueue_nop(int dev_id)
+{
+ /* only op field needs filling - zero src, dst and length */
+ return __idxd_write_desc(dev_id, idxd_op_nop << IDXD_CMD_OP_SHIFT,
+ 0, 0, 0, NULL);
+}
+
static __rte_always_inline int
__idxd_fence(int dev_id)
{
return 0;
if (idxd->batch_size == 1)
- /* use a fence as a null descriptor, so batch_size >= 2 */
- if (__idxd_fence(dev_id) != 1)
+ /* use a NOP as a null descriptor, so batch_size >= 2 */
+ if (__idxd_enqueue_nop(dev_id) != 1)
return -1;
/* write completion beyond last desc in the batch */