From patchwork Thu Jan 18 13:45:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 135960 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 C34D3438F3; Thu, 18 Jan 2024 14:47:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6BDAA42DD6; Thu, 18 Jan 2024 14:46:27 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) by mails.dpdk.org (Postfix) with ESMTP id EEFC942DB6; Thu, 18 Jan 2024 14:46:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1705585585; x=1737121585; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=d9zfdXC5jS+0Zak46W9jh71OEYLEL5OgYuI7m3WAsJc=; b=JRo6zu+gfqA/XMoFjIICQ1N6ZyACrWsUhWCNm48TEOejdauIGpPKmwgi QGBgm4VmINrrcz5xUL655LOU/tuIF3hNfIGfAc6c+uTx2cHXlcDzIeMef 35seb2N8k+d1NedtEysIjkKfey7gKAsBhReolRnpSlx1kAQr9QfMwobiI GBACv/Cz4bYTLGLLq7bVDt04TnSlWuSTHZA+CgzW1rLWyRMjJAtHZOqDv qgDoxbzO55wKYPXIjr4xJ1K7w6B2v8oVlY/Ny3w2SxFN4KBQ39KI4yV0c eDZDVjkSqnTGS6tVa9FQ4I6+nXIrcH1FL+aTPZ3Zta5yCslNYftClc0EX A==; X-IronPort-AV: E=McAfee;i="6600,9927,10956"; a="7542811" X-IronPort-AV: E=Sophos;i="6.05,201,1701158400"; d="scan'208";a="7542811" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2024 05:46:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10956"; a="734274164" X-IronPort-AV: E=Sophos;i="6.05,201,1701158400"; d="scan'208";a="734274164" Received: from silpixa00400957.ir.intel.com (HELO silpixa00401385.ir.intel.com) ([10.237.214.26]) by orsmga003.jf.intel.com with ESMTP; 18 Jan 2024 05:46:21 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , stable@dpdk.org, Jerin Jacob , Harry van Haaren , Pavan Nikhilesh , Timothy McDaniel Subject: [PATCH v1 7/7] eventdev: fix documentation for counting single-link ports Date: Thu, 18 Jan 2024 13:45:57 +0000 Message-Id: <20240118134557.73172-8-bruce.richardson@intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240118134557.73172-1-bruce.richardson@intel.com> References: <20240118134557.73172-1-bruce.richardson@intel.com> MIME-Version: 1.0 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 The documentation of how single-link port-queue pairs were counted in the rte_event_dev_config structure did not match the actual implementation and, if following the documentation, certain valid port/queue configurations would have been impossible to configure. Fix this by changing the documentation to match the implementation - however confusing that implementation ends up being. Bugzilla ID: 1368 Fixes: 75d113136f38 ("eventdev: express DLB/DLB2 PMD constraints") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson --- lib/eventdev/rte_eventdev.h | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) -- 2.40.1 diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h index 4139ccb982..3b8f5b8101 100644 --- a/lib/eventdev/rte_eventdev.h +++ b/lib/eventdev/rte_eventdev.h @@ -490,7 +490,10 @@ struct rte_event_dev_info { uint32_t dequeue_timeout_ns; /**< Configured global dequeue timeout(ns) for this device */ uint8_t max_event_queues; - /**< Maximum event queues supported by this device */ + /**< Maximum event queues supported by this device. + * This excludes any queue-port pairs covered by the + * *max_single_link_event_port_queue_pairs* value in this structure. + */ uint32_t max_event_queue_flows; /**< Maximum number of flows within an event queue supported by this device*/ uint8_t max_event_queue_priority_levels; @@ -506,7 +509,10 @@ struct rte_event_dev_info { * @ref RTE_EVENT_DEV_PRIORITY_HIGHEST and @ref RTE_EVENT_DEV_PRIORITY_LOWEST. */ uint8_t max_event_ports; - /**< Maximum number of event ports supported by this device */ + /**< Maximum number of event ports supported by this device + * This excludes any queue-port pairs covered by the + * *max_single_link_event_port_queue_pairs* value in this structure. + */ uint8_t max_event_port_dequeue_depth; /**< Maximum number of events that can be dequeued at a time from an event port * on this device. @@ -618,13 +624,23 @@ struct rte_event_dev_config { */ uint8_t nb_event_queues; /**< Number of event queues to configure on this device. - * This value cannot exceed @ref rte_event_dev_info.max_event_queues - * returned by rte_event_dev_info_get() + * This value *includes* any single-link queue-port pairs to be used. + * This value cannot exceed @ref rte_event_dev_info.max_event_queues + + * @ref rte_event_dev_info.max_single_link_event_port_queue_pairs + * returned by rte_event_dev_info_get(). + * The number of non-single-link queues i.e. this value less + * *nb_single_link_event_port_queues* in this struct, cannot exceed + * @ref rte_event_dev_info.max_event_queues */ uint8_t nb_event_ports; /**< Number of event ports to configure on this device. - * This value cannot exceed @ref rte_event_dev_info.max_event_ports - * returned by rte_event_dev_info_get() + * This value *includes* any single-link queue-port pairs to be used. + * This value cannot exceed @ref rte_event_dev_info.max_event_ports + + * @ref rte_event_dev_info.max_single_link_event_port_queue_pairs + * returned by rte_event_dev_info_get(). + * The number of non-single-link ports i.e. this value less + * *nb_single_link_event_port_queues* in this struct, cannot exceed + * @ref rte_event_dev_info.max_event_ports */ uint32_t nb_event_queue_flows; /**< Max number of flows needed for a single event queue on this device.