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 5DC91455AD for ; Mon, 15 Jul 2024 17:30:48 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 59E2A40E1D; Mon, 15 Jul 2024 17:30:48 +0200 (CEST) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by mails.dpdk.org (Postfix) with ESMTP id 002E740DF8 for ; Mon, 15 Jul 2024 17:30:46 +0200 (CEST) Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-4266ea6a488so34629955e9.1 for ; Mon, 15 Jul 2024 08:30:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721057446; x=1721662246; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pCS1C5kc/K7mBwni8gYkOsutzayh6uVT0zYH5gfgCJk=; b=L+w5IMHWFzwrNXysvJqoPSLnJCcHcm0pC42qifVkcu7Z1u5gT52tPd5S4+qHldJDUZ OoUSvhzvQf4KgWK9iIIT7Oxvr8vDuDLtyDsT7iAdIzMPa3g9RdnF/z+3dMMTC1cTpxMS 3hgU4ZDP6i2Qy2idFHWJshcHrmN2bzd6PVlZ7o8jSHIF4RKC0IcFmlLlg0nN2HHeRWGH rdIAOlLjAkkl/DWpVtbl8TDOm90Rm0aa8fwUXnUdCv9D7A4tNLsFwz+Xpx21yfOoGhJb TcECQSRl2sFs3bE5t2Rt/chLCkx8LZ9XkEZSf1/TQuq1nRwtKkq4+rx7AB8pZAIBK2R3 u/Hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721057446; x=1721662246; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pCS1C5kc/K7mBwni8gYkOsutzayh6uVT0zYH5gfgCJk=; b=NsnTGpdPgIuoouVlE73ZJf50x3AkWUR7zOdBpfsGnWlXK3u3XA8eyFR0RWcs1FgXfm DaDULGyZTDAYTO1pCJeDOcSHXGMFW7zzbvdP4yjyboz1iL3cKfF+EKkCtRdZzyxigdXh qiiPLFVu+tiZRWq9r+HHm+1WNq4wzdt1KsFaoyFjuniz89yg1wvkEVc/AAtf+jZoXXVo 0HFIKea91A6ioDpCdPKGDN1yJnD9T0H4L/Oi5Bn7MI6vLsuhmCEgodQUOKXyUx1UqPpC 1M+blvOcnhqRY49FCOc7ifLg62ZQDtKK/lhX1lBPsOVmrJ8tUVfyW70dbtzQDxTNZXw1 Swrg== X-Gm-Message-State: AOJu0Yz0D8v1auF+xxUpyYY6tlGvLJ/ajuFGmwT8acDLJX6D+Vq5rnZh ykk1hSKe33VQ5BF19zz3zkXUTH0LQSaWb43oCJMdGPPWW4AlWpPVOyxS6aBbUUE= X-Google-Smtp-Source: AGHT+IGZ2tX4Sqeg9w0H1iBh6VXySLSXYlxpENE4pOim59CF6Q24e1Q/f+mdY0P8a2V9/iriSKdoEA== X-Received: by 2002:a05:600c:2e0c:b0:426:5f09:cf53 with SMTP id 5b1f17b1804b1-426707d03abmr177539505e9.15.1721057446619; Mon, 15 Jul 2024 08:30:46 -0700 (PDT) Received: from localhost ([137.220.120.171]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3680db0ee46sm6672925f8f.114.2024.07.15.08.30.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jul 2024 08:30:46 -0700 (PDT) From: luca.boccassi@gmail.com To: Jiawen Wu Cc: dpdk stable Subject: patch 'net/txgbe: fix MTU range' has been queued to stable release 22.11.6 Date: Mon, 15 Jul 2024 16:26:48 +0100 Message-Id: <20240715152704.2229503-70-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240715152704.2229503-1-luca.boccassi@gmail.com> References: <20240624235907.885628-81-luca.boccassi@gmail.com> <20240715152704.2229503-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 22.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/17/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/c5accd3813a437b0a68fa4a69bb3cb0fed1bf35e Thanks. Luca Boccassi --- >From c5accd3813a437b0a68fa4a69bb3cb0fed1bf35e 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 acfdb65eaf..d116bbd978 100644 --- a/drivers/net/txgbe/txgbe_ethdev.c +++ b/drivers/net/txgbe/txgbe_ethdev.c @@ -2655,7 +2655,9 @@ txgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) dev_info->max_rx_queues = (uint16_t)hw->mac.max_rx_queues; 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; dev_info->max_vfs = pci_dev->max_vfs; @@ -3597,12 +3599,8 @@ txgbe_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) return -EINVAL; } - 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 545ce4c9e1..4625236cb7 100644 --- a/drivers/net/txgbe/txgbe_ethdev.h +++ b/drivers/net/txgbe/txgbe_ethdev.h @@ -55,7 +55,7 @@ #define TXGBE_5TUPLE_MAX_PRI 7 #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.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-07-15 16:19:38.095376025 +0100 +++ 0070-net-txgbe-fix-MTU-range.patch 2024-07-15 16:19:34.692209111 +0100 @@ -1 +1 @@ -From af2a8b597cbb5cf8e3d53bf27c02c658d68cf6cf Mon Sep 17 00:00:00 2001 +From c5accd3813a437b0a68fa4a69bb3cb0fed1bf35e 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 acfdb65eaf..d116bbd978 100644 @@ -22 +23 @@ -@@ -2670,7 +2670,9 @@ txgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) +@@ -2655,7 +2655,9 @@ txgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) @@ -33 +34 @@ -@@ -3694,12 +3696,8 @@ txgbe_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) +@@ -3597,12 +3599,8 @@ txgbe_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) @@ -49 +50 @@ -index 050acd967f..f0f4ced5b0 100644 +index 545ce4c9e1..4625236cb7 100644 @@ -52 +53 @@ -@@ -56,7 +56,7 @@ +@@ -55,7 +55,7 @@