From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 07CDCA0C50; Fri, 16 Jul 2021 15:50:45 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7F6CB4067B; Fri, 16 Jul 2021 15:50:45 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id C4EEB40151 for ; Fri, 16 Jul 2021 15:50:43 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10046"; a="271846250" X-IronPort-AV: E=Sophos;i="5.84,245,1620716400"; d="scan'208";a="271846250" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jul 2021 06:50:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,245,1620716400"; d="scan'208";a="452743010" Received: from sivswdev08.ir.intel.com ([10.237.217.47]) by orsmga007.jf.intel.com with ESMTP; 16 Jul 2021 06:50:41 -0700 From: Konstantin Ananyev To: dev@dpdk.org Cc: bruce.richardson@intel.com, Konstantin Ananyev Date: Fri, 16 Jul 2021 14:50:27 +0100 Message-Id: <20210716135027.30855-1-konstantin.ananyev@intel.com> X-Mailer: git-send-email 2.18.0 Subject: [dpdk-dev] [PATCH] raw/ioat: fix termination descriptor for batch X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- drivers/raw/ioat/rte_idxd_rawdev_fns.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/raw/ioat/rte_idxd_rawdev_fns.h b/drivers/raw/ioat/rte_idxd_rawdev_fns.h index 57548609e3..3ea25f6ca9 100644 --- a/drivers/raw/ioat/rte_idxd_rawdev_fns.h +++ b/drivers/raw/ioat/rte_idxd_rawdev_fns.h @@ -231,6 +231,14 @@ __idxd_enqueue_copy(int dev_id, rte_iova_t src, rte_iova_t dst, 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) { @@ -260,8 +268,8 @@ __idxd_perform_ops(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 */ -- 2.26.3