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 D9B22A0543 for ; Tue, 21 Jun 2022 10:10:44 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E3EC942B91; Tue, 21 Jun 2022 10:10:22 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2086.outbound.protection.outlook.com [40.107.236.86]) by mails.dpdk.org (Postfix) with ESMTP id 96D6342B70 for ; Tue, 21 Jun 2022 10:10:21 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NkA5Y1EQvRt3LvNSqsr+QBatOQ89fx1i8h/aVYNo0QOL36CH4gdXhkMRnBOP8wKE6eg1eD5gZHYTZpShB8dCYVy7Ptw3wlH3czuxlKnAyfWm2jEEz55tJZCGh1/XzBpyLGr9o/WikUlrL0WNBmRIBA4HDoS163x9RRxxQH9WfHHmnb8bLpMJsBJGvcyyFQgp2Iqqv2h/pCSGXatPPOtWgwukUFpcX6XYEvwyOBlXTpqvLj9v9ibTUmtsGRTy+ZczwVhc4ApwC+ceqmG6AugMm9/Hqo9HNuR6zXbLMs9Eu8JXsuC208tMU7CwAgWhJLfWzNOkrJYG3gUHAKkP0OKsrw== 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=TP2qBnzBtxFsuso0wlrhg6uxmfqCjT+L/J+g3yoLKEQ=; b=NDijYPuy3Ib3MEz4dU1L+ZBRoDdbgPIQBrscdHLiROnUtcPMBtfqyyc+f0ftx1CDZ15eD/xOXIUMQo6V+UJd3sx32e2HWx64pgigngtAT2FDDFLeMny6ZvVl3JUAr0jOs6+JYv0WUWj4p4rBp3bryyQ+0pACuKCYYFsojf4pezoibFgm2hB+ClQZfCA0jD6+yXTKC0xjgFKNzOSq1r7BxcJB6H1Tjjptpc8o+vIViAen9ywMLt3yiLWXs89xl9g4X0eg951CEnCJ+LdmdkuR/cRlAd68RkHsU8z6SaMUqhgz73gLQZxBg4/p/VOFJNSF7nPRitBdZyX8Hec4X/VBhg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.234) smtp.rcpttodomain=dpdk.org 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=TP2qBnzBtxFsuso0wlrhg6uxmfqCjT+L/J+g3yoLKEQ=; b=K2Apn0vDXULKJR1vN2pKtmB/MLYpZ6/C4EgAgWtE9TV3JBJ+RsunRZFMoIZktlIpLZx06nbT4f4WVRY+f6aaQyGZpihshxn1j13PrMt04E7+/NfQbCYpCr0l4yYniCjEy7mLL+aJVRD8fmm1tJ76gVFoLWzd1eQnJ6G3J4oMBl9H7fZnuDhZHfFPyagVLuCNsXlWxmdz93KXmw5+yndLVgyPSxfpKuCr7+kfjiacct0xLThzbh3vx54uO/mFf0f6UK1iVWbQyDuxGaeLvWXAi9qGBAYVazyC9oKigDAlNnw7LIzJWfGgy0GpmBkCk0YVOIV0AbyzDm7DmK2g8nVQxA== Received: from BN9PR03CA0666.namprd03.prod.outlook.com (2603:10b6:408:10e::11) by CY4PR1201MB0039.namprd12.prod.outlook.com (2603:10b6:910:1e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.17; Tue, 21 Jun 2022 08:10:20 +0000 Received: from BN8NAM11FT049.eop-nam11.prod.protection.outlook.com (2603:10b6:408:10e:cafe::f4) by BN9PR03CA0666.outlook.office365.com (2603:10b6:408:10e::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.16 via Frontend Transport; Tue, 21 Jun 2022 08:10:19 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.234) 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 12.22.5.234 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.234; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.234) by BN8NAM11FT049.mail.protection.outlook.com (10.13.177.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5353.14 via Frontend Transport; Tue, 21 Jun 2022 08:10:19 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL101.nvidia.com (10.27.9.10) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Tue, 21 Jun 2022 08:10:18 +0000 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.22; Tue, 21 Jun 2022 01:10:17 -0700 From: Xueming Li To: "Min Hu (Connor)" CC: dpdk stable Subject: patch 'net/bonding: fix mbuf fast free usage' has been queued to stable release 20.11.6 Date: Tue, 21 Jun 2022 11:02:27 +0300 Message-ID: <20220621080301.2315720-82-xuemingl@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220621080301.2315720-1-xuemingl@nvidia.com> References: <20220621080301.2315720-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-Office365-Filtering-Correlation-Id: 5d27d965-a5e6-44ca-a627-08da535d7b9b X-MS-TrafficTypeDiagnostic: CY4PR1201MB0039:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dqwcu+ggRyW0NdExMreZuATTIcwNZFIpzolAE6xn3fMIBTdni49GNPegmV27q/FklgNhxLNs1zdcvt+9rPa5GGKpUqT9lfHawM61IeID6LEMnCFXA57k9jf9VDexEcEuNppKGg/wL1Y52Y3ped+ZvwPW1Mt/L9XycQpsz08wuaOUCJULvZYV88dmIOM/E1EiO9mWGUNmZo3hRYZyYCy+N2h5/DQsmcZGpyzCpvfNxdgXl2tu7ZQjP/0rnHShv11GXgVcXh2hgR4bK4Dfr4wmvHlmjGr/B7EL2eYVGENSmdpkdfBi+3/LNGCIQiLum6bJBieGzV+tEPW2VkGoSKZuLr+GfB/bFFcXc4XsJwiXw5n2C7TZw5QYCbnMXEvbAooSu8zrCbFkFB/di7VMqedMvP5L8CaO/ZgwUBKZdx/c0pftyggXDmAfIfhS+Jf5W9U1SMfelL0SGrEMDZX/QBVHg4IjoAOvx/iJ1K4Z1iB4upx0vX16lTcQIwQEV8xETrzjXg7RMsnssB9x8cGvUPHhd/yiDH9I8l66HKbvbLIvl3PGPLPpkWl75/xeRzbQzWYd64NUVvVytTOx5RN30Zl8oEdpJ6bADmFm+fTXK/b/lSrBUyfkhqomf9mChwhaD/4VAOvbrWuFAgSAKaDKzlp8ep79vvThsHNISu45Fa10NZ+Oo2I6Zj3jStU7p4SXRZqkSpnPImNOYvwCHrrIxAh52+cOkvveFza3zjBBnZ+1AaVYURhmUMlzv17JIPSid7HmQTK6AmZn9cVr3XgdhYiIgNsybpegOvniqsUVB/YfXrqp3MLMqpKfcJRHJeHwcUWK7MYEibx2F/rPvv8t5At1z3TH9WoB74bFmFxLgmh53/E= X-Forefront-Antispam-Report: CIP:12.22.5.234; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(346002)(136003)(396003)(39860400002)(376002)(36840700001)(46966006)(40470700004)(53546011)(6286002)(316002)(41300700001)(2616005)(478600001)(966005)(55016003)(1076003)(26005)(40480700001)(81166007)(356005)(86362001)(6916009)(82310400005)(82740400003)(7696005)(5660300002)(36756003)(47076005)(6666004)(36860700001)(83380400001)(16526019)(336012)(186003)(426003)(40460700003)(2906002)(70586007)(70206006)(4326008)(8676002)(8936002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2022 08:10:19.5489 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5d27d965-a5e6-44ca-a627-08da535d7b9b X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.234]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT049.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1201MB0039 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 20.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 06/23/22. 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/711575cd7f765ef2ff441aacd0b558717a85278d Thanks. Xueming Li --- >From 711575cd7f765ef2ff441aacd0b558717a85278d Mon Sep 17 00:00:00 2001 From: "Min Hu (Connor)" Date: Wed, 25 May 2022 09:08:28 +0800 Subject: [PATCH] net/bonding: fix mbuf fast free usage Cc: Xueming Li [ upstream commit 18c41457cbaeaf44a87f88fe861de35c923ab702 ] Usage of 'RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE' offload has two constraints: per-queue all mbufs comes from the same mempool and has refcnt = 1. Bonding mode Broadcast, Tx mbuf has more than one refcnt. Bonding mode 8023AD, It contains two mempools separately for LACP packets and other packets. In Tx or Rx, Fast mbuf free will operate mbuf from different mempool. This patch will prevent 'RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE' offload when in bonding mode Broadcast and mode 8023AD. Fixes: 78aecefed955 ("bond: move param parsing in configure step") Signed-off-by: Min Hu (Connor) --- drivers/net/bonding/rte_eth_bond_pmd.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 259651a0c5..43383db319 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -3563,6 +3563,7 @@ bond_ethdev_configure(struct rte_eth_dev *dev) const char *name = dev->device->name; struct bond_dev_private *internals = dev->data->dev_private; struct rte_kvargs *kvlist = internals->kvlist; + uint64_t offloads; int arg_count; uint16_t port_id = dev - rte_eth_devices; uint8_t agg_mode; @@ -3623,6 +3624,16 @@ bond_ethdev_configure(struct rte_eth_dev *dev) } } + offloads = dev->data->dev_conf.txmode.offloads; + if ((offloads & DEV_TX_OFFLOAD_MBUF_FAST_FREE) && + (internals->mode == BONDING_MODE_8023AD || + internals->mode == BONDING_MODE_BROADCAST)) { + RTE_BOND_LOG(WARNING, + "bond mode broadcast & 8023AD don't support MBUF_FAST_FREE offload, force disable it."); + offloads &= ~DEV_TX_OFFLOAD_MBUF_FAST_FREE; + dev->data->dev_conf.txmode.offloads = offloads; + } + /* set the max_rx_pktlen */ internals->max_rx_pktlen = internals->candidate_max_rx_pktlen; -- 2.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-06-21 15:37:52.929518969 +0800 +++ 0081-net-bonding-fix-mbuf-fast-free-usage.patch 2022-06-21 15:37:49.167785046 +0800 @@ -1 +1 @@ -From 18c41457cbaeaf44a87f88fe861de35c923ab702 Mon Sep 17 00:00:00 2001 +From 711575cd7f765ef2ff441aacd0b558717a85278d Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 18c41457cbaeaf44a87f88fe861de35c923ab702 ] @@ -19 +21,0 @@ -Cc: stable@dpdk.org @@ -27 +29 @@ -index f0668a636f..ace8f8b45e 100644 +index 259651a0c5..43383db319 100644 @@ -30 +32 @@ -@@ -3583,6 +3583,7 @@ bond_ethdev_configure(struct rte_eth_dev *dev) +@@ -3563,6 +3563,7 @@ bond_ethdev_configure(struct rte_eth_dev *dev) @@ -38 +40 @@ -@@ -3643,6 +3644,16 @@ bond_ethdev_configure(struct rte_eth_dev *dev) +@@ -3623,6 +3624,16 @@ bond_ethdev_configure(struct rte_eth_dev *dev) @@ -43 +45 @@ -+ if ((offloads & RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE) && ++ if ((offloads & DEV_TX_OFFLOAD_MBUF_FAST_FREE) && @@ -48 +50 @@ -+ offloads &= ~RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE; ++ offloads &= ~DEV_TX_OFFLOAD_MBUF_FAST_FREE;