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 CFE9443829 for ; Fri, 8 Mar 2024 15:32:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C7AC642F0D; Fri, 8 Mar 2024 15:32:05 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 75EA14334C for ; Fri, 8 Mar 2024 15:32:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1709908322; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RNpybZribit4uWNJi7IiHV0FWqaqqhQoEWVq3KuXuBg=; b=PYjHuyhXBee0ZtIbCLZ2CQVAE8tqcHd+HpXkDngVbhSaNgsfgruqhSynE5pxOprRhuEb0H qOx4argMIgZ/1+vdnri/+4M1hnGqFrxWYtvoivmqs2MgK07o4W3EfzlqBvTKMDhYeBzDjY 2iOcAq93YEAXL/zKEujhY78bxSBtjIk= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-423-QIXytBCtN5yBIDYEb3XVqg-1; Fri, 08 Mar 2024 09:32:00 -0500 X-MC-Unique: QIXytBCtN5yBIDYEb3XVqg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4095B101A595; Fri, 8 Mar 2024 14:32:00 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.194.94]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8189137F6; Fri, 8 Mar 2024 14:31:59 +0000 (UTC) From: Kevin Traynor To: Nithin Dabilpuram Cc: dpdk stable Subject: patch 'common/cnxk: fix Tx MTU configuration' has been queued to stable release 21.11.7 Date: Fri, 8 Mar 2024 14:28:07 +0000 Message-ID: <20240308142824.528417-19-ktraynor@redhat.com> In-Reply-To: <20240308142824.528417-1-ktraynor@redhat.com> References: <20240308142824.528417-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 21.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/13/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/603e63f7a695ca8141a7d30830a6a6f7b98a7413 Thanks. Kevin --- >From 603e63f7a695ca8141a7d30830a6a6f7b98a7413 Mon Sep 17 00:00:00 2001 From: Nithin Dabilpuram Date: Mon, 26 Feb 2024 19:05:29 +0530 Subject: [PATCH] common/cnxk: fix Tx MTU configuration [ upstream commit cc9f534f60815d858b946062cb1d9701c91b9b58 ] Skip setting Tx MTU separately as now the Tx credit configuration is based on max MTU possible for that link. Also, initialize MTU with max value for that port. Fixes: 8589ec212e80 ("net/cnxk: support MTU set") Signed-off-by: Nithin Dabilpuram --- drivers/common/cnxk/roc_nix.c | 2 +- drivers/common/cnxk/roc_nix.h | 2 -- drivers/net/cnxk/cnxk_ethdev_ops.c | 12 +----------- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/common/cnxk/roc_nix.c b/drivers/common/cnxk/roc_nix.c index 151d8c3426..74ecb67901 100644 --- a/drivers/common/cnxk/roc_nix.c +++ b/drivers/common/cnxk/roc_nix.c @@ -414,5 +414,5 @@ skip_dev_init: nix->pci_dev = pci_dev; nix->reta_sz = reta_sz; - nix->mtu = ROC_NIX_DEFAULT_HW_FRS; + nix->mtu = roc_nix_max_pkt_len(roc_nix); /* Always start with full FC for LBK */ diff --git a/drivers/common/cnxk/roc_nix.h b/drivers/common/cnxk/roc_nix.h index 986aac9e57..89b12c1f94 100644 --- a/drivers/common/cnxk/roc_nix.h +++ b/drivers/common/cnxk/roc_nix.h @@ -208,6 +208,4 @@ struct roc_nix_eeprom_info { #define ROC_NIX_RSS_MCAM_IDX_DEFAULT (-1) -#define ROC_NIX_DEFAULT_HW_FRS 1514 - #define ROC_NIX_VWQE_MAX_SIZE_LOG2 11 #define ROC_NIX_VWQE_MIN_SIZE_LOG2 2 diff --git a/drivers/net/cnxk/cnxk_ethdev_ops.c b/drivers/net/cnxk/cnxk_ethdev_ops.c index 9662bb0a2c..82943e52d4 100644 --- a/drivers/net/cnxk/cnxk_ethdev_ops.c +++ b/drivers/net/cnxk/cnxk_ethdev_ops.c @@ -483,17 +483,7 @@ cnxk_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu) frame_size -= RTE_ETHER_CRC_LEN; - /* Update mtu on Tx */ - rc = roc_nix_mac_mtu_set(nix, frame_size); - if (rc) { - plt_err("Failed to set MTU, rc=%d", rc); - goto exit; - } - - /* Sync same frame size on Rx */ + /* Set frame size on Rx */ rc = roc_nix_mac_max_rx_len_set(nix, frame_size); if (rc) { - /* Rollback to older mtu */ - roc_nix_mac_mtu_set(nix, - old_frame_size - RTE_ETHER_CRC_LEN); plt_err("Failed to max Rx frame length, rc=%d", rc); goto exit; -- 2.43.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-08 13:47:49.604919349 +0000 +++ 0019-common-cnxk-fix-Tx-MTU-configuration.patch 2024-03-08 13:47:49.017686660 +0000 @@ -1 +1 @@ -From cc9f534f60815d858b946062cb1d9701c91b9b58 Mon Sep 17 00:00:00 2001 +From 603e63f7a695ca8141a7d30830a6a6f7b98a7413 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit cc9f534f60815d858b946062cb1d9701c91b9b58 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ -index 97c0ae3e25..90ccb260fb 100644 +index 151d8c3426..74ecb67901 100644 @@ -25 +26 @@ -@@ -485,5 +485,5 @@ skip_dev_init: +@@ -414,5 +414,5 @@ skip_dev_init: @@ -30 +30,0 @@ - nix->dmac_flt_idx = -1; @@ -31,0 +32 @@ + /* Always start with full FC for LBK */ @@ -33 +34 @@ -index 2a198de458..4db71544f0 100644 +index 986aac9e57..89b12c1f94 100644 @@ -36 +37 @@ -@@ -268,6 +268,4 @@ struct roc_nix_eeprom_info { +@@ -208,6 +208,4 @@ struct roc_nix_eeprom_info { @@ -44 +45 @@ -index e816884d47..4962f3bced 100644 +index 9662bb0a2c..82943e52d4 100644 @@ -47 +48 @@ -@@ -611,17 +611,7 @@ skip_buffsz_check: +@@ -483,17 +483,7 @@ cnxk_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)