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 58F2642D46 for ; Sun, 25 Jun 2023 08:45:01 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 531EF40ED8; Sun, 25 Jun 2023 08:45:01 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2077.outbound.protection.outlook.com [40.107.93.77]) by mails.dpdk.org (Postfix) with ESMTP id C567D40A7F for ; Sun, 25 Jun 2023 08:44:59 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a4m79kmd9H8b1Myd7pjhNNyzRf0HmZjk/EcA3N8HYBX6UMHap7uUgmaofm8bskh9sD7/MRoxA4ugyYNKh3+DdApvkUFU//Uqm0FqF/kWVIQfW3cF/QagdVjoEEvO7rzzOJb+E4h/42ktCX7LO74WIZq2Cfiup/42n63A5h5cGXAmdc+2fbUdn76c1i/6EkPswub3V2azRyPLDpwg8oId/6TaIFpoMbGi2foieNiIWpv+iRcwE26XFSsEX2cqYvy62u0alP7NjGu5SdVo79P2NpK/1SnMhd86R245CplhnC6nnp4iPXItlCUMdQMJIFhGanOrm9sC0XQ0eA+Q9qOxjw== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+khHb+vsQyXxyRug3/uoByagStPtYXTTdVLoYgWwszo=; b=mnELiXUyjtGdBgbFKohWhxpwSYyaIeDjVHVtHNCZt/jSUZ5oWCLJ6VK++h/E8M9cdMzFqVoRUzDaE42277nzr8AAsDhdJMdj+uGea+0uixWj6qddUlfWkYKXVapiWaA7L+KEXO8sLdyeyPsflBnb3UVjUizxuNIl7uysPFZm7v2AxJ3HuGsZ1zMHtylI94ZCxf3XEt+UyrZjhzDeOLbrigK1yJYc9sjHdT/O8voZ8KpUwnPk3xbkb3z3Jh2R40JDcL5plH5EafY+MGAJ0ZbYGMSb2dKxVwmHQQkZAZ8AHdPIJBjAhi+zHyoEsnyT/sGvr5M6pQgwOMaTQiX0bOEodg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject 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=+khHb+vsQyXxyRug3/uoByagStPtYXTTdVLoYgWwszo=; b=h7drzhFbJcEf7PNvh6CZhcnLkIgPmmRBZHYjFpaBiipBtY9Ls1p2r7WTZoyVTl6dXMTwrv8eXJxWJ4eFonaa/Re8xDnjzbrI+S5XlXor2fPvMfySg7qFxa4R2HRh9r8b0Tmj4X1HAldCiJup6vbiun+A3DGRmb0J+xQwsNfHDEno6CJck9Ez6GUWqqtrwOYJiriCOludgBAMTAL0nC8+p+EnXuSw6u2DDUgZ6O7uK0OWYrQRSJnz8I6MkeBdzzsuv/TeCS7OE6KWpLDzS7QlaCb05HDM9P77+q33m03wK7200zsLGsqfxwz8/rUPFEIspYptJF/XxVjL+ATz12K95Q== Received: from BN9PR03CA0604.namprd03.prod.outlook.com (2603:10b6:408:106::9) by PH7PR12MB6883.namprd12.prod.outlook.com (2603:10b6:510:1b9::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.26; Sun, 25 Jun 2023 06:44:55 +0000 Received: from BN8NAM11FT008.eop-nam11.prod.protection.outlook.com (2603:10b6:408:106:cafe::9a) by BN9PR03CA0604.outlook.office365.com (2603:10b6:408:106::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.32 via Frontend Transport; Sun, 25 Jun 2023 06:44:55 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by BN8NAM11FT008.mail.protection.outlook.com (10.13.177.95) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.47 via Frontend Transport; Sun, 25 Jun 2023 06:44:54 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Sat, 24 Jun 2023 23:44:43 -0700 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Sat, 24 Jun 2023 23:44:42 -0700 From: Xueming Li To: Wenjun Wu CC: Qi Zhang , dpdk stable Subject: patch 'net/ice: fix Rx data buffer size' has been queued to stable release 22.11.3 Date: Sun, 25 Jun 2023 14:35:22 +0800 Message-ID: <20230625063544.11183-105-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230625063544.11183-1-xuemingl@nvidia.com> References: <20230625063544.11183-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT008:EE_|PH7PR12MB6883:EE_ X-MS-Office365-Filtering-Correlation-Id: 680b05e7-17b9-49b9-5164-08db7547af51 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pvJBsNOIuX407QMO93iJ6eZJm/LKr7m8IIqiDPBYCMTmEFSe3kI1XQHFsBrxksbOo8czTE5EpYb38fwJ1zAW2Buw5jRyd0azgKEJMuW36xmcva69+7ojVhsa6FDUgbudDB0LO1mcfQ/jrORwm9s5IoR6/JPHrO2wkxvm7uj3FeipHR7Xz5S7WxZZrabYjF8kkzqyJJotAkZkbpCEoY4FxBsrtpipNKMctexRZyTp4FMVd2IYhvQYXUrTyaXGZt4ufGGjtjWzGyZaNp63LLo0E6ML1/HXxizcW4Y73dseBU7yRt9bDilnHmfMM+59pZZmCWx0M0yMeECS/k84JQjmDJGh16wDTAUP6WQTCDNlS5y/ECwfarDY6Xa3MiP7ZZulDSpssF5+ULwj1S+Y0BR6e49C8B86NmYRUD7HkAMG9DoMz0RKnBl8PYeeo+r7roctwjcNxJYrr39uYXT12TEa9LcDGDA8D9jhIAHiF2SAW26pdkZXRU+YKzjN2u/zYJr5qX1sVY7SMMR61JekU1HhNAlqZ5dD+2QO1jwAmwWiPbd9F5Z/Xo8icVKsUi3vY6ehLCvR73y9MKEeEcpxle0FUq/bQxZq8vKIZb07bjjMFOIJWJrCn8LelS8BzOyaWmx3UnjwwsmSM9P00Mlo72Z8exs6cek0ZnXTe7GlMe9yn/kuaOS8kEo5F3L3wJbNfx5dUA07axlcG99PjqCfqEqco7es/CCSZNMPeY1EHSjVeUelckfxzHF+Ux8SWXrMlVyyP8JlwwTrNcF91gCV5clK4A== X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(396003)(376002)(346002)(39860400002)(136003)(451199021)(40470700004)(46966006)(36840700001)(40460700003)(2906002)(7696005)(82310400005)(6666004)(356005)(2616005)(47076005)(82740400003)(83380400001)(7636003)(336012)(426003)(1076003)(26005)(186003)(53546011)(16526019)(6286002)(966005)(36860700001)(55016003)(41300700001)(40480700001)(86362001)(54906003)(478600001)(70586007)(70206006)(4326008)(36756003)(6916009)(316002)(5660300002)(8936002)(8676002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jun 2023 06:44:54.5495 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 680b05e7-17b9-49b9-5164-08db7547af51 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT008.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6883 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.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/27/23. 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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=1f9af08714704c809c38e81aea2ad9826d062efa Thanks. Xueming Li --- >From 1f9af08714704c809c38e81aea2ad9826d062efa Mon Sep 17 00:00:00 2001 From: Wenjun Wu Date: Fri, 14 Apr 2023 13:47:41 +0800 Subject: [PATCH] net/ice: fix Rx data buffer size Cc: Xueming Li [ upstream commit 9a5c9dc475428c7d2c74383c0903541ab80144ea ] This patch does two fixes. 1. According to hardware spec, the data buffer size should not be greater than 16K - 128. 2. Replace RTE_ALIGN with RTE_ALIGN_FLOOR according to [1]. [1] Commit c9c45beb1b97 ("net/iavf: fix Rx queue buffer size alignment") Fixes: 50370662b727 ("net/ice: support device and queue ops") Fixes: 1b009275e2c8 ("net/ice: add Rx queue init in DCF") Signed-off-by: Wenjun Wu Acked-by: Qi Zhang --- drivers/net/ice/ice_dcf_ethdev.c | 3 ++- drivers/net/ice/ice_rxtx.c | 3 ++- drivers/net/ice/ice_rxtx.h | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c index dcbf2af5b0..7304ea721c 100644 --- a/drivers/net/ice/ice_dcf_ethdev.c +++ b/drivers/net/ice/ice_dcf_ethdev.c @@ -115,7 +115,8 @@ ice_dcf_init_rxq(struct rte_eth_dev *dev, struct ice_rx_queue *rxq) buf_size = rte_pktmbuf_data_room_size(rxq->mp) - RTE_PKTMBUF_HEADROOM; rxq->rx_hdr_len = 0; - rxq->rx_buf_len = RTE_ALIGN(buf_size, (1 << ICE_RLAN_CTX_DBUF_S)); + rxq->rx_buf_len = RTE_ALIGN_FLOOR(buf_size, (1 << ICE_RLAN_CTX_DBUF_S)); + rxq->rx_buf_len = RTE_MIN(rxq->rx_buf_len, ICE_RX_MAX_DATA_BUF_SIZE); max_pkt_len = RTE_MIN(ICE_SUPPORT_CHAIN_NUM * rxq->rx_buf_len, dev->data->mtu + ICE_ETH_OVERHEAD); diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c index 0ea0045836..560c1a4af7 100644 --- a/drivers/net/ice/ice_rxtx.c +++ b/drivers/net/ice/ice_rxtx.c @@ -259,7 +259,8 @@ ice_program_hw_rx_queue(struct ice_rx_queue *rxq) /* Set buffer size as the head split is disabled. */ buf_size = (uint16_t)(rte_pktmbuf_data_room_size(rxq->mp) - RTE_PKTMBUF_HEADROOM); - rxq->rx_buf_len = RTE_ALIGN(buf_size, (1 << ICE_RLAN_CTX_DBUF_S)); + rxq->rx_buf_len = RTE_ALIGN_FLOOR(buf_size, (1 << ICE_RLAN_CTX_DBUF_S)); + rxq->rx_buf_len = RTE_MIN(rxq->rx_buf_len, ICE_RX_MAX_DATA_BUF_SIZE); rxq->max_pkt_len = RTE_MIN((uint32_t)ICE_SUPPORT_CHAIN_NUM * rxq->rx_buf_len, frame_size); diff --git a/drivers/net/ice/ice_rxtx.h b/drivers/net/ice/ice_rxtx.h index 94f6bcf3d1..89569029e1 100644 --- a/drivers/net/ice/ice_rxtx.h +++ b/drivers/net/ice/ice_rxtx.h @@ -51,6 +51,9 @@ extern int ice_timestamp_dynfield_offset; /* Max header size can be 2K - 64 bytes */ #define ICE_RX_HDR_BUF_SIZE (2048 - 64) +/* Max data buffer size must be 16K - 128 bytes */ +#define ICE_RX_MAX_DATA_BUF_SIZE (16 * 1024 - 128) + #define ICE_HEADER_SPLIT_ENA BIT(0) typedef void (*ice_rx_release_mbufs_t)(struct ice_rx_queue *rxq); -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-06-25 14:32:01.280045500 +0800 +++ 0104-net-ice-fix-Rx-data-buffer-size.patch 2023-06-25 14:31:58.555773900 +0800 @@ -1 +1 @@ -From 9a5c9dc475428c7d2c74383c0903541ab80144ea Mon Sep 17 00:00:00 2001 +From 1f9af08714704c809c38e81aea2ad9826d062efa Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 9a5c9dc475428c7d2c74383c0903541ab80144ea ] @@ -17 +19,0 @@ -Cc: stable@dpdk.org @@ -28 +30 @@ -index 13ff24552d..76b28bface 100644 +index dcbf2af5b0..7304ea721c 100644 @@ -31 +33 @@ -@@ -114,7 +114,8 @@ ice_dcf_init_rxq(struct rte_eth_dev *dev, struct ice_rx_queue *rxq) +@@ -115,7 +115,8 @@ ice_dcf_init_rxq(struct rte_eth_dev *dev, struct ice_rx_queue *rxq)