From patchwork Wed Sep 22 15:13:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Naga Harish K, S V" X-Patchwork-Id: 99437 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 849DBA0C45; Wed, 22 Sep 2021 17:14:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 487C741204; Wed, 22 Sep 2021 17:14:27 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 9D9CA41203 for ; Wed, 22 Sep 2021 17:14:25 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10115"; a="210695426" X-IronPort-AV: E=Sophos;i="5.85,314,1624345200"; d="scan'208";a="210695426" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2021 08:14:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,314,1624345200"; d="scan'208";a="550287212" Received: from txandevlnx322.an.intel.com ([10.123.117.44]) by FMSMGA003.fm.intel.com with ESMTP; 22 Sep 2021 08:14:24 -0700 From: Naga Harish K S V To: jerinj@marvell.com, jay.jayatheerthan@intel.com Cc: dev@dpdk.org Date: Wed, 22 Sep 2021 10:13:58 -0500 Message-Id: <20210922151400.3718855-3-s.v.naga.harish.k@intel.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20210922151400.3718855-1-s.v.naga.harish.k@intel.com> References: <20210921094559.1788022-1-s.v.naga.harish.k@intel.com> <20210922151400.3718855-1-s.v.naga.harish.k@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v3 3/5] eventdev/rx_adapter: introduce per queue event buffer 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" To configure per queue event buffer size, application sets ``rte_event_eth_rx_adapter_params::use_queue_event_buf`` flag as true and is passed to ``rte_event_eth_rx_adapter_create_with_params`` api. The per queue event buffer size is populated in ``rte_event_eth_rx_adapter_queue_conf::event_buf_size`` and passed to ``rte_event_eth_rx_adapter_queue_add`` api. Signed-off-by: Naga Harish K S V --- .../prog_guide/event_ethernet_rx_adapter.rst | 19 ++++++++++++------- lib/eventdev/rte_event_eth_rx_adapter.h | 4 ++++ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/doc/guides/prog_guide/event_ethernet_rx_adapter.rst b/doc/guides/prog_guide/event_ethernet_rx_adapter.rst index dd753613bd..e73ae135d5 100644 --- a/doc/guides/prog_guide/event_ethernet_rx_adapter.rst +++ b/doc/guides/prog_guide/event_ethernet_rx_adapter.rst @@ -62,12 +62,14 @@ service function and needs to create an event port for it. The callback is expected to fill the ``struct rte_event_eth_rx_adapter_conf structure`` passed to it. -If the application desires to control the event buffer size, it can use the -``rte_event_eth_rx_adapter_create_with_params()`` api. The event buffer size is -specified using ``struct rte_event_eth_rx_adapter_params::event_buf_size``. -The function is passed the event device to be associated with the adapter -and port configuration for the adapter to setup an event port if the -adapter needs to use a service function. +If the application desires to control the event buffer size at adapter level, +it can use the ``rte_event_eth_rx_adapter_create_with_params()`` api. The event +buffer size is specified using ``struct rte_event_eth_rx_adapter_params:: +event_buf_size``. To configure the event buffer size at queue level, the boolean +flag ``struct rte_event_eth_rx_adapter_params::use_queue_event_buf`` need to be +set to true. The function is passed the event device to be associated with +the adapter and port configuration for the adapter to setup an event port +if the adapter needs to use a service function. Adding Rx Queues to the Adapter Instance ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -79,7 +81,9 @@ parameter. Event information for packets from this Rx queue is encoded in the ``ev`` field of ``struct rte_event_eth_rx_adapter_queue_conf``. The servicing_weight member of the struct rte_event_eth_rx_adapter_queue_conf is the relative polling frequency of the Rx queue and is applicable when the -adapter uses a service core function. +adapter uses a service core function. The applications can configure queue +event buffer size in ``struct rte_event_eth_rx_adapter_queue_conf::event_buf_size`` +parameter. .. code-block:: c @@ -90,6 +94,7 @@ adapter uses a service core function. queue_config.rx_queue_flags = 0; queue_config.ev = ev; queue_config.servicing_weight = 1; + queue_config.event_buf_size = 1024; err = rte_event_eth_rx_adapter_queue_add(id, eth_dev_id, diff --git a/lib/eventdev/rte_event_eth_rx_adapter.h b/lib/eventdev/rte_event_eth_rx_adapter.h index 6e8b3085f8..8e341b8bc8 100644 --- a/lib/eventdev/rte_event_eth_rx_adapter.h +++ b/lib/eventdev/rte_event_eth_rx_adapter.h @@ -199,6 +199,8 @@ struct rte_event_eth_rx_adapter_queue_conf { * Valid when RTE_EVENT_ETH_RX_ADAPTER_QUEUE_EVENT_VECTOR flag is set in * @see rte_event_eth_rx_adapter_queue_conf::rx_queue_flags. */ + uint16_t event_buf_size; + /**< event buffer size for this queue */ }; /** @@ -266,6 +268,8 @@ struct rte_event_eth_rx_adapter_params { * This value is rounded up for better buffer utilization * and performance. */ + bool use_queue_event_buf; + /**< flag to indicate that event buffer is separate for each queue */ }; /**