From patchwork Tue Mar 5 13:12:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 137994 X-Patchwork-Delegate: rasland@nvidia.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 70D3343C38; Tue, 5 Mar 2024 14:13:06 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D302240FDE; Tue, 5 Mar 2024 14:13:05 +0100 (CET) Received: from fout3-smtp.messagingengine.com (fout3-smtp.messagingengine.com [103.168.172.146]) by mails.dpdk.org (Postfix) with ESMTP id 95AB14026B for ; Tue, 5 Mar 2024 14:13:04 +0100 (CET) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfout.nyi.internal (Postfix) with ESMTP id C40AF13800DD; Tue, 5 Mar 2024 08:13:03 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Tue, 05 Mar 2024 08:13:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm1; t=1709644383; x= 1709730783; bh=h5CWEunxwfFzUOUMGFTsdRx+movWtIsEEkyhACqFIcg=; b=V EX2zzrstTDuBBtSqTo06TeGGKmpRqVPeQSfti0r+AtMd04xdp+j0BX/j+P2m4TqW Rt+D5oVhAJNQWBKVU9gcv/zTI5QlFghjXMGRbbxDyAEDVRvm81NLp3FQCQT8DR7c H2pXcE655xhbMcGrzou/lqL652d12/MYnjMrI1A0TExhIrScqt9wV39lKFS3aPML 4gq26lmiaCTaxvAnMQgvTCMjtuTLr7h3tyUH58Rd8tTHBvX1aQdGE+i6RecmyL5Y aRWDjQzDD7f1mWiTt5YMBHuJPfGd+vHkCu5oJ6JZRVrdfLIz3MEo9USeSULpiQSp E1Ikvm8PnKT4OGVPL3yLg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1709644383; x= 1709730783; bh=h5CWEunxwfFzUOUMGFTsdRx+movWtIsEEkyhACqFIcg=; b=G SqPnNG9YIHN/chx8obyyzBWOEY7mqm3/STc294GWzXtcft9LEv3B2GxL45n2jRq2 GqCdAW6pngKwnMcDJ1Kev4Wphb2o+IE2N6grJnZmTThWcxNf5NaK6ZktnUzvMmNY gIkE05lrxG5dsePOuFfWwaELiRFRwIBhcCW5Riw6QmwYbCR2EMu+GjFmvNaxuY3A 3DksIILKvK9Xbwc05ryiK7msEbYJ1XgY2GXWrQ/cq7OSVnisY4eRFpCqa5MfnGDF XnB9FozalqGNMTjYYZ8R6U7nQ7FK1QF0mkI59hZxLNq3tXggYeZFRlci8kAQvbHl HyG64NamjCTBLoJwyIkHw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrheelgdeghecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepvdejhfdugeehvddtieejieegteeuudfgjeeukeeiledthfetveek hefhieelhfdtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 5 Mar 2024 08:13:02 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: Dariusz Sosnowski , Viacheslav Ovsiienko , Ori Kam , Suanming Mou , Matan Azrad Subject: [PATCH 2/2] net/mlx5: apply default tuning to future speeds Date: Tue, 5 Mar 2024 14:12:41 +0100 Message-ID: <20240305131241.3132128-2-thomas@monjalon.net> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240305131241.3132128-1-thomas@monjalon.net> References: <20240305131241.3132128-1-thomas@monjalon.net> 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 Some default parameters for number of queues and ring size are different starting with 100G speed capability. Instead of checking all speed above 100G, make sure it is applied for any speed capability newer than 100G (including 400G for instance). Signed-off-by: Thomas Monjalon Acked-by: Dariusz Sosnowski --- drivers/net/mlx5/mlx5_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c index fb6d9d28ba..aea799341c 100644 --- a/drivers/net/mlx5/mlx5_ethdev.c +++ b/drivers/net/mlx5/mlx5_ethdev.c @@ -242,8 +242,8 @@ mlx5_set_default_params(struct rte_eth_dev *dev, struct rte_eth_dev_info *info) info->default_txportconf.ring_size = 256; info->default_rxportconf.burst_size = MLX5_RX_DEFAULT_BURST; info->default_txportconf.burst_size = MLX5_TX_DEFAULT_BURST; - if ((priv->link_speed_capa & RTE_ETH_LINK_SPEED_200G) | - (priv->link_speed_capa & RTE_ETH_LINK_SPEED_100G)) { + if (priv->link_speed_capa >> rte_bsf32(RTE_ETH_LINK_SPEED_100G)) { + /* if supports at least 100G */ info->default_rxportconf.nb_queues = 16; info->default_txportconf.nb_queues = 16; if (dev->data->nb_rx_queues > 2 ||