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 C4D11A0A0E for ; Mon, 10 May 2021 18:06:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BC1514003E; Mon, 10 May 2021 18:06:35 +0200 (CEST) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam08on2076.outbound.protection.outlook.com [40.107.101.76]) by mails.dpdk.org (Postfix) with ESMTP id BF78E4003E for ; Mon, 10 May 2021 18:06:34 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Gk6ekBp7cfh1hDIKT4cC3rj9ALrc131w1gI4kMfkeUSHIe5b3yHUxhJb2cTbfhfPaXWWGaCZU2SeKmm0jyLCzUWnpA/eE7R12yEIhjhPIxUANtE1heRv88hEYEMZxTjXBwwATYk/E3hnRVQe1ndOJRbGhM2TzXvd3Zd84vVIk49tjaf9r7XeBgXx88gbA/IsXM6Nj+LrTm0dt9hPjQADd9r1BLphxvC6tfxYOCWuvPnwnkPQKDQlbWy/PoT4dsa+CM6ABG2FwL15ELwyyznwmM2FXyFW+qmclGetl9xje8KpZnMQtl7K04VUP0IsdOY4XxeJ3DxKPLYWre9x2Sg3PA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=u9e4DEg5xd1XCdyWBLku1m9FWvw1YmFN1HcllEeIal8=; b=Sj+NeRcigcUVYg2BeTgqSw66C4nBJokTFPodtyRw9hULPez3Hp4c6vmGKPSesiTp/ZkTyTa3hSWT8+xo00rrsWkeII2zaQhpOueye6tq7WiIcFZYqEc+BwQ8pjOK8fcIW8TCGPfwxcdDd2kA7GlScC221I94pffVYzUcVhm+n8Jm9A9/HOZUnIDpmL5iglC4tEO/Nk77lcuTUVjE37umiI2MMuqBWaYnQNUq+TciZ8WniG5ussMmUaC11NdH6kHLfla0SlwXaXjZ941fLXTzn2seM+4u4NBf7XJkIQmrCdWJqHStbfz598ZL5wxT+e4cCLIIWif6aV3kHseu+IeoJA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=u9e4DEg5xd1XCdyWBLku1m9FWvw1YmFN1HcllEeIal8=; b=jHwjnQi9jN17J2N0GPps8YE/LSibDsotbnk6t7Liy0trXBDRmdirThKOKG1AV32Ww/RG/3tcxlqXHHUdwHLQQMnOOWBYZRBSJKwBGvFSfCehfmOA3zqpvSys4xAnzDVsn1zW2sMTJsTBG1A7diglFDHfLT9qrK7B4k1GOR+z02KNtABgd5Teg/DiJX4OPZzppgKYyqy0ePE3u5vSt9pYeWgXAAYVsodVZaCNI4wDRG6Ce6C7Z1nmB5PHilRBz0ZzhcV0UOgtPHOyP3ingFSFapOzrvMLGIRkL35s6jMUkwB3N+JtJO0+U91V0cHsUZ6UHYmk6kntuoAvLV39Z0hOZQ== Received: from BN9PR03CA0887.namprd03.prod.outlook.com (2603:10b6:408:13c::22) by CY4PR12MB1734.namprd12.prod.outlook.com (2603:10b6:903:121::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25; Mon, 10 May 2021 16:06:33 +0000 Received: from BN8NAM11FT022.eop-nam11.prod.protection.outlook.com (2603:10b6:408:13c:cafe::69) by BN9PR03CA0887.outlook.office365.com (2603:10b6:408:13c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:06:33 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT022.mail.protection.outlook.com (10.13.176.112) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:06:32 +0000 Received: from nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 10 May 2021 16:06:27 +0000 From: Xueming Li To: Dapeng Yu CC: Luca Boccassi , Jeff Guo , dpdk stable Date: Mon, 10 May 2021 23:59:44 +0800 Message-ID: <20210510160258.30982-35-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210510160258.30982-1-xuemingl@nvidia.com> References: <20210510160258.30982-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7363662c-85cf-49b3-40d9-08d913cd948f X-MS-TrafficTypeDiagnostic: CY4PR12MB1734: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +6ndaprzwcBDjmUxwQGDZ4CWBWBz+j6LWHwq0FO1/xxFJNzB4ky8cqqmnzTcdmjQnSqq1Rb7kavdUxO53LgX1U2L0hnHFlmI3odcS75fmwvj3pFhRc5yA9vk0TwsEJcKPYlfldigXB7P2anIWjsRYE/neSKMkqqMwAWTsPNlivbL0BjTt5xZj0tee+1M4i0QDJDel25WvFhcVQPT3DN4BAXwzheae6e+qQKqgdK6uLII80lGpXzH6L2PHeKfGS3XXu1aGYDXl36BVLnEA43kAzfYNDpeH54aklTihh9t36SoaFEel7idrvU7wiWYya+XRfG7LfqptdbMbRZB1oJaH69mSxo/DgWrvwLXr6t6y6ahBqh4/oDJzDrXW37rsK5lCgedkTYSJrEgiE/F+LeXqTK8U4S06njAVGfbRycth2xd4QfWkpUKzVZs4edH1//CmNpFqP8wv+oSpq4X8tb0oYp/TIJMgCT3+BgaoTABQ5PRmiPi2HV+vhqS9Mv5cqpMY6Ig1f5HYTWDUIQ3YIJAgtXHbF6WNtzgYXlsqoZHOuTZrJ7CAyB6sVPXZGGzw7Q4piqIXaZ62u1YELp2S3ZNWQJgLfjuqcrVW2zsZz84NZHi1B91i6xAb3nP5HqECkR834CXDnhKyv7g0qRPW9tVetGsiq1gmopYRLF486VVVqFsig5Jhi15ePy6DRHVde18g2SoZ36fgbfoNV/XyxalFzaSHu9Bg5+qzv0LznQzi9s45A2Z2D5tP3lUeOLsJogDo5UxlXXQLRZYxD3R5wlNvg== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(396003)(346002)(136003)(376002)(39860400002)(36840700001)(46966006)(1076003)(26005)(4326008)(16526019)(356005)(8676002)(186003)(8936002)(82310400003)(316002)(82740400003)(7636003)(6286002)(36906005)(54906003)(47076005)(478600001)(55016002)(83380400001)(966005)(2906002)(70586007)(70206006)(336012)(36860700001)(86362001)(53546011)(36756003)(2616005)(7696005)(426003)(6666004)(6916009)(5660300002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2021 16:06:32.9346 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7363662c-85cf-49b3-40d9-08d913cd948f X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT022.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1734 Subject: [dpdk-stable] patch 'net/e1000: remove MTU setting limitation' has been queued to stable release 20.11.2 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/12/21. 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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/e3486cbde8ea2bb1c791c9711e28820ce75a0e7d Thanks. Xueming Li --- >From e3486cbde8ea2bb1c791c9711e28820ce75a0e7d Mon Sep 17 00:00:00 2001 From: Dapeng Yu Date: Fri, 19 Feb 2021 18:03:23 +0800 Subject: [PATCH] net/e1000: remove MTU setting limitation Cc: Luca Boccassi [ upstream commit 0984d196be2a92eb6e2e0b926fdb4a06a1d7d823 ] Currently, if requested MTU is bigger than mbuf size and scattered receive is not enabled, setting MTU to that value fails. This patch allows setting this special MTU when device is stopped, because scattered_rx will be re-configured during next port start and driver may enable scattered receive according new MTU value. After this patch, driver may select different receive function automatically after MTU set, according MTU values selected. Fixes: 59d0ecdbf0e1 ("ethdev: MTU accessors") Signed-off-by: Dapeng Yu Acked-by: Jeff Guo --- drivers/net/e1000/em_ethdev.c | 12 ++++++++---- drivers/net/e1000/igb_ethdev.c | 12 ++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c index 2036c6e917..f116063876 100644 --- a/drivers/net/e1000/em_ethdev.c +++ b/drivers/net/e1000/em_ethdev.c @@ -1805,11 +1805,15 @@ eth_em_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) if (mtu < RTE_ETHER_MIN_MTU || frame_size > dev_info.max_rx_pktlen) return -EINVAL; - /* refuse mtu that requires the support of scattered packets when this - * feature has not been enabled before. */ - if (!dev->data->scattered_rx && - frame_size > dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM) + /* + * If device is started, refuse mtu that requires the support of + * scattered packets when this feature has not been enabled before. + */ + if (dev->data->dev_started && !dev->data->scattered_rx && + frame_size > dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM) { + PMD_INIT_LOG(ERR, "Stop port first."); return -EINVAL; + } hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private); rctl = E1000_READ_REG(hw, E1000_RCTL); diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c index 5bcc67d75f..669af23103 100644 --- a/drivers/net/e1000/igb_ethdev.c +++ b/drivers/net/e1000/igb_ethdev.c @@ -4394,11 +4394,15 @@ eth_igb_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) frame_size > dev_info.max_rx_pktlen) return -EINVAL; - /* refuse mtu that requires the support of scattered packets when this - * feature has not been enabled before. */ - if (!dev->data->scattered_rx && - frame_size > dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM) + /* + * If device is started, refuse mtu that requires the support of + * scattered packets when this feature has not been enabled before. + */ + if (dev->data->dev_started && !dev->data->scattered_rx && + frame_size > dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM) { + PMD_INIT_LOG(ERR, "Stop port first."); return -EINVAL; + } rctl = E1000_READ_REG(hw, E1000_RCTL); -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-05-10 23:59:27.600968100 +0800 +++ 0036-net-e1000-remove-MTU-setting-limitation.patch 2021-05-10 23:59:26.370000000 +0800 @@ -1 +1 @@ -From 0984d196be2a92eb6e2e0b926fdb4a06a1d7d823 Mon Sep 17 00:00:00 2001 +From e3486cbde8ea2bb1c791c9711e28820ce75a0e7d Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Luca Boccassi + +[ upstream commit 0984d196be2a92eb6e2e0b926fdb4a06a1d7d823 ] @@ -17 +19,0 @@ -Cc: stable@dpdk.org @@ -27 +29 @@ -index 9b8c4a7de5..3c6f643c19 100644 +index 2036c6e917..f116063876 100644 @@ -51 +53 @@ -index 5323504e98..1716d6b904 100644 +index 5bcc67d75f..669af23103 100644