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 5DE26A00C2 for ; Wed, 23 Nov 2022 19:04:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5992142DB0; Wed, 23 Nov 2022 19:04:42 +0100 (CET) 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 82F3940E5A for ; Wed, 23 Nov 2022 19:04:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669226679; 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=h1+2S79nmi//h0mtrcBR3TwHvWlles9IDhzOsfYguTI=; b=hAxB97WIycDR2Dd64hd6+8KwiLEgeRUk25LXMO5Hdg04gWIJWo3uFJ/iPpIINAsGr4m0vr +TvNZ55kadZMRYwXgyinGuepMhKWLo9t6D+y69qep7KaQyhNhIBSvWuW9epXPuZIKkUdIu FWjDXVrucIkgBhNnoDi1Rq8RFBdujjY= 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-359-JWxtx-5dP4WpXd0JsihIzA-1; Wed, 23 Nov 2022 13:04:33 -0500 X-MC-Unique: JWxtx-5dP4WpXd0JsihIzA-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F404F2A5957A; Wed, 23 Nov 2022 18:04:32 +0000 (UTC) Received: from rh.Home (unknown [10.39.195.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4F641492B07; Wed, 23 Nov 2022 18:04:32 +0000 (UTC) From: Kevin Traynor To: Huisong Li Cc: Stephen Hemminger , dpdk stable Subject: patch 'net/bonding: fix mbuf fast free handling' has been queued to stable release 21.11.3 Date: Wed, 23 Nov 2022 18:03:18 +0000 Message-Id: <20221123180413.733554-5-ktraynor@redhat.com> In-Reply-To: <20221123180413.733554-1-ktraynor@redhat.com> References: <20221123180413.733554-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 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.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 11/28/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/89f4c06b0feb94e641380f52ba7d6242dcdc10fb Thanks. Kevin --- >From 89f4c06b0feb94e641380f52ba7d6242dcdc10fb Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Wed, 9 Nov 2022 10:22:37 +0800 Subject: [PATCH] net/bonding: fix mbuf fast free handling [ upstream commit b4924c0db589b5d4698abfab3ce60978d9df518b ] The RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE offload can't be used in bonding mode Broadcast and mode 8023AD. Currently, bonding driver forcibly removes from the dev->data->dev_conf.txmode.offloads and processes as success in bond_ethdev_configure(). But this still cause that rte_eth_dev_configure() fails to execute because of the failure of validating Tx offload in the eth_dev_validate_offloads(). So this patch moves the modification of txmode offlaods to the stage of adding slave device to report the correct txmode offloads. Fixes: 18c41457cbae ("net/bonding: fix mbuf fast free usage") Signed-off-by: Huisong Li Acked-by: Stephen Hemminger --- drivers/net/bonding/rte_eth_bond_api.c | 5 +++++ drivers/net/bonding/rte_eth_bond_pmd.c | 11 ----------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c index 919c580fb8..14dfd2059f 100644 --- a/drivers/net/bonding/rte_eth_bond_api.c +++ b/drivers/net/bonding/rte_eth_bond_api.c @@ -542,4 +542,9 @@ __eth_bond_slave_add_lock_free(uint16_t bonded_port_id, uint16_t slave_port_id) } + /* Bond mode Broadcast & 8023AD don't support MBUF_FAST_FREE offload. */ + if (internals->mode == BONDING_MODE_8023AD || + internals->mode == BONDING_MODE_BROADCAST) + internals->tx_offload_capa &= ~RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE; + bonded_eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf &= internals->flow_type_rss_offloads; diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 51758d4cca..d3bf95b845 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -3600,5 +3600,4 @@ 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; @@ -3661,14 +3660,4 @@ 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.38.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-23 09:55:57.243251990 +0000 +++ 0005-net-bonding-fix-mbuf-fast-free-handling.patch 2022-11-23 09:55:57.012149163 +0000 @@ -1 +1 @@ -From b4924c0db589b5d4698abfab3ce60978d9df518b Mon Sep 17 00:00:00 2001 +From 89f4c06b0feb94e641380f52ba7d6242dcdc10fb Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit b4924c0db589b5d4698abfab3ce60978d9df518b ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -26 +27 @@ -index 694fe86115..c0178369b4 100644 +index 919c580fb8..14dfd2059f 100644 @@ -29 +30 @@ -@@ -545,4 +545,9 @@ __eth_bond_slave_add_lock_free(uint16_t bonded_port_id, uint16_t slave_port_id) +@@ -542,4 +542,9 @@ __eth_bond_slave_add_lock_free(uint16_t bonded_port_id, uint16_t slave_port_id) @@ -40 +41 @@ -index 864e073db8..2efaad1e8e 100644 +index 51758d4cca..d3bf95b845 100644 @@ -43 +44 @@ -@@ -3644,5 +3644,4 @@ bond_ethdev_configure(struct rte_eth_dev *dev) +@@ -3600,5 +3600,4 @@ bond_ethdev_configure(struct rte_eth_dev *dev) @@ -49 +50 @@ -@@ -3709,14 +3708,4 @@ bond_ethdev_configure(struct rte_eth_dev *dev) +@@ -3661,14 +3660,4 @@ bond_ethdev_configure(struct rte_eth_dev *dev) @@ -62,2 +63,2 @@ - link_speeds = dev->data->dev_conf.link_speeds; - /* + /* set the max_rx_pktlen */ + internals->max_rx_pktlen = internals->candidate_max_rx_pktlen;