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 E7A8C45804 for ; Fri, 23 Aug 2024 18:23:19 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E1F8A4337F; Fri, 23 Aug 2024 18:23:19 +0200 (CEST) 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 9C2214336F for ; Fri, 23 Aug 2024 18:23:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724430198; 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=suartJnNZVAG+SaYeD8Nv8uT6LyFFjxK+dk9+3PDRlA=; b=YM7YiCepI+XfvX09wRYB3oh4UrLjgXPElCXpMjO47kVL7sJYEUoDLcyaFczR7ZVrm/57x2 2PGODysjAxJmXAcNL4A9Ww/AwGIXpFvZylkGptEGxVZei6cMvdVT3FRsl+sWSVT0YJZZTK 4PuOwQWUiqstdWWI4PlWHzYlpJnUx2w= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-683-Q2SK8q1ZMf2lKvzS0yZlxg-1; Fri, 23 Aug 2024 12:23:15 -0400 X-MC-Unique: Q2SK8q1ZMf2lKvzS0yZlxg-1 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3FB9719560B4; Fri, 23 Aug 2024 16:23:14 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.193.224]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 22E8F1956053; Fri, 23 Aug 2024 16:23:12 +0000 (UTC) From: Kevin Traynor To: Jiawen Wu Cc: dpdk stable Subject: patch 'net/txgbe: fix MTU range' has been queued to stable release 21.11.8 Date: Fri, 23 Aug 2024 17:18:51 +0100 Message-ID: <20240823161929.1004778-103-ktraynor@redhat.com> In-Reply-To: <20240823161929.1004778-1-ktraynor@redhat.com> References: <20240823161929.1004778-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 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.8 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/28/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/329e6c3c4f1b19db3d2f1d81aaaa76953c1f3162 Thanks. Kevin --- >From 329e6c3c4f1b19db3d2f1d81aaaa76953c1f3162 Mon Sep 17 00:00:00 2001 From: Jiawen Wu Date: Tue, 18 Jun 2024 15:11:43 +0800 Subject: [PATCH] net/txgbe: fix MTU range [ upstream commit af2a8b597cbb5cf8e3d53bf27c02c658d68cf6cf ] The valid range of MTU is 68 to 9414. Set min_mtu and max_mtu in dev_info. Fixes: 3926214fd80d ("net/txgbe: support MTU set") Signed-off-by: Jiawen Wu --- drivers/net/txgbe/txgbe_ethdev.c | 12 +++++------- drivers/net/txgbe/txgbe_ethdev.h | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c index 00375b3b94..5c6e07f200 100644 --- a/drivers/net/txgbe/txgbe_ethdev.c +++ b/drivers/net/txgbe/txgbe_ethdev.c @@ -2617,5 +2617,7 @@ txgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) dev_info->max_tx_queues = (uint16_t)hw->mac.max_tx_queues; dev_info->min_rx_bufsize = 1024; - dev_info->max_rx_pktlen = 15872; + dev_info->max_rx_pktlen = TXGBE_MAX_MTU + TXGBE_ETH_OVERHEAD; + dev_info->min_mtu = RTE_ETHER_MIN_MTU; + dev_info->max_mtu = TXGBE_MAX_MTU; dev_info->max_mac_addrs = hw->mac.num_rar_entries; dev_info->max_hash_mac_addrs = TXGBE_VMDQ_NUM_UC_MAC; @@ -3504,10 +3506,6 @@ txgbe_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) } - if (hw->mode) - wr32m(hw, TXGBE_FRMSZ, TXGBE_FRMSZ_MAX_MASK, - TXGBE_FRAME_SIZE_MAX); - else - wr32m(hw, TXGBE_FRMSZ, TXGBE_FRMSZ_MAX_MASK, - TXGBE_FRMSZ_MAX(frame_size)); + wr32m(hw, TXGBE_FRMSZ, TXGBE_FRMSZ_MAX_MASK, + TXGBE_FRMSZ_MAX(frame_size)); return 0; diff --git a/drivers/net/txgbe/txgbe_ethdev.h b/drivers/net/txgbe/txgbe_ethdev.h index edc3311e19..87cdb63e88 100644 --- a/drivers/net/txgbe/txgbe_ethdev.h +++ b/drivers/net/txgbe/txgbe_ethdev.h @@ -56,5 +56,5 @@ #define TXGBE_5TUPLE_MIN_PRI 1 - +#define TXGBE_MAX_MTU 9414 /* The overhead from MTU to max frame size. */ #define TXGBE_ETH_OVERHEAD (RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN) -- 2.46.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-08-23 17:18:12.746512060 +0100 +++ 0103-net-txgbe-fix-MTU-range.patch 2024-08-23 17:18:09.834430504 +0100 @@ -1 +1 @@ -From af2a8b597cbb5cf8e3d53bf27c02c658d68cf6cf Mon Sep 17 00:00:00 2001 +From 329e6c3c4f1b19db3d2f1d81aaaa76953c1f3162 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit af2a8b597cbb5cf8e3d53bf27c02c658d68cf6cf ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index 20fa0a5b05..c2df5a314b 100644 +index 00375b3b94..5c6e07f200 100644 @@ -22 +23 @@ -@@ -2671,5 +2671,7 @@ txgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) +@@ -2617,5 +2617,7 @@ txgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) @@ -31 +32 @@ -@@ -3695,10 +3697,6 @@ txgbe_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) +@@ -3504,10 +3506,6 @@ txgbe_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) @@ -45 +46 @@ -index 050acd967f..f0f4ced5b0 100644 +index edc3311e19..87cdb63e88 100644 @@ -48 +49 @@ -@@ -57,5 +57,5 @@ +@@ -56,5 +56,5 @@