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 46185A0555 for ; Thu, 9 Jun 2022 13:38:00 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 417AF42820; Thu, 9 Jun 2022 13:37:59 +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 1BC28406B4 for ; Thu, 9 Jun 2022 13:37:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654774677; 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=KGIZgHkSF09QfhNvVIU8NnUiItwoSPdoeJ4oDybs8No=; b=TDaCXg+tJW4GNBixUn61MXexuctHFpMN05dlTaEnXdWMcvhZrESzju9/js0mAsGZlwODJk oSCBewYkljTDkfrah+h3UwukMJlOvmvomZ/zWZjnA7s4sDaRj0rInOgylQMhyR8xAR3Pub AElpEYj5UGs/vDwwyVSGZy/Rw35FhpE= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-543-n65zxDqEOje9oFuY83EwCQ-1; Thu, 09 Jun 2022 07:37:56 -0400 X-MC-Unique: n65zxDqEOje9oFuY83EwCQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 33AF23C021B3; Thu, 9 Jun 2022 11:37:56 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.195.82]) by smtp.corp.redhat.com (Postfix) with ESMTP id 796ED18EA3; Thu, 9 Jun 2022 11:37:55 +0000 (UTC) From: Kevin Traynor To: "Min Hu (Connor)" Cc: dpdk stable Subject: patch 'net/bonding: fix mbuf fast free usage' has been queued to stable release 21.11.2 Date: Thu, 9 Jun 2022 12:36:20 +0100 Message-Id: <20220609113701.386938-33-ktraynor@redhat.com> In-Reply-To: <20220609113701.386938-1-ktraynor@redhat.com> References: <20220609113701.386938-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com 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.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 06/13/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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/046b6944e8e3f66ec27284861c37657240755504 Thanks. Kevin --- >From 046b6944e8e3f66ec27284861c37657240755504 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 [ 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 5257d4c07b..b6fed1495b 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -3583,4 +3583,5 @@ bond_ethdev_configure(struct rte_eth_dev *dev) 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; @@ -3643,4 +3644,14 @@ bond_ethdev_configure(struct rte_eth_dev *dev) } + offloads = dev->data->dev_conf.txmode.offloads; + if ((offloads & RTE_ETH_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 &= ~RTE_ETH_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.34.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-06-09 12:34:30.563342782 +0100 +++ 0033-net-bonding-fix-mbuf-fast-free-usage.patch 2022-06-09 12:34:29.734980622 +0100 @@ -1 +1 @@ -From 18c41457cbaeaf44a87f88fe861de35c923ab702 Mon Sep 17 00:00:00 2001 +From 046b6944e8e3f66ec27284861c37657240755504 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 18c41457cbaeaf44a87f88fe861de35c923ab702 ] + @@ -19 +20,0 @@ -Cc: stable@dpdk.org @@ -27 +28 @@ -index f0668a636f..ace8f8b45e 100644 +index 5257d4c07b..b6fed1495b 100644 @@ -30 +31 @@ -@@ -3584,4 +3584,5 @@ bond_ethdev_configure(struct rte_eth_dev *dev) +@@ -3583,4 +3583,5 @@ bond_ethdev_configure(struct rte_eth_dev *dev) @@ -36 +37 @@ -@@ -3644,4 +3645,14 @@ bond_ethdev_configure(struct rte_eth_dev *dev) +@@ -3643,4 +3644,14 @@ bond_ethdev_configure(struct rte_eth_dev *dev)