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 8D54EA0540 for ; Thu, 7 Jul 2022 09:57:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8892A406B4; Thu, 7 Jul 2022 09:57:34 +0200 (CEST) Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by mails.dpdk.org (Postfix) with ESMTP id 5113A406B4 for ; Thu, 7 Jul 2022 09:57:33 +0200 (CEST) Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 115863F6FC for ; Thu, 7 Jul 2022 07:57:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1657180653; bh=CZ7i4lcEOVRXQa6hLrNzk5m/dx2ckwrnHtxkMnNnJEg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=OkHQoCUGU7RX+iHb7rk6gDWt9EOSb5YhuuogMKc4uWPyfr+ui2gKlkVNUu868JDh5 fDp3iX58daAu6yeqgRsfsGbrBYXLko0z225l+eP/C2GJDvkxTgMv0wMtd2PXdc78mt z54RQC6eiiazAfUSLkzuC+1zEZI6OPnQok+goK3bdCe8eo530e8tCOoG4q5WsId4rJ 20LXFWNH4HVkckkwd5jQmVGr22tvoRRX0laXYOUxDBwiDiO/p3+HwkRMF8xRZM2rtA h0176w3MPNlDrkeJ/hV5zOUXRNv829/WT8Z2JLzJ3sVKP5NC1EVzP+QDEEh8Id653i Co151vl8w8DjA== Received: by mail-ed1-f72.google.com with SMTP id b7-20020a056402350700b00435bd1c4523so13365719edd.5 for ; Thu, 07 Jul 2022 00:57:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CZ7i4lcEOVRXQa6hLrNzk5m/dx2ckwrnHtxkMnNnJEg=; b=k89jMIVNtfYmanuJ7VWr9aoCOnkssK7lrp7nyTP9FAvJJuXqfW8i+8Mrq9a+6Z9kzz 8W9EOlnY2udBLLxhJCevQG7hNJ8MpvLIdkqrb56loSt+q7l0ZHWonHfdkYWVxqli57Jn syEbAnnK5OeKEavxbgh4jX9TGyeyeLxeNUMqFi/rf4FwjidOau7zGFsFN1ZvDu9fDfYL 8VvlbtTS/JtYY2nDPH7RVaGJkSKpQXRbaiHbrdZsTvF+V50Dr+g0BuHwY9Xjj7DwoUWh uSrqlVMA30CF4nCspYuPVl3BCLeuEJL+orYpYVPzXCNiINxbwYQJMQtkHOypFI5uP0Sx o96g== X-Gm-Message-State: AJIora+V8VnyUN7MDav7VvSdrSHnpHPLJtkMnnm/kBs9rRvY6A2FaDlG 1g1yUhsrd4J5/caekKhJy92s2GESQtusXNW9IpglRXfUN3UrcCNzDS5yocuYhJaCmZbGyoGfyYN eyuR01kaFXWtMVzE3c1UNHVl1 X-Received: by 2002:a17:907:9494:b0:722:f3d2:ef96 with SMTP id dm20-20020a170907949400b00722f3d2ef96mr44502103ejc.705.1657180652567; Thu, 07 Jul 2022 00:57:32 -0700 (PDT) X-Google-Smtp-Source: AGRyM1twu8Xr9G5i86+k2kJpZ/ji0x76HA0spHU99TvkQlLHMyYYj75hIdvZ5NpncUhAQuwqaQkrJg== X-Received: by 2002:a17:907:9494:b0:722:f3d2:ef96 with SMTP id dm20-20020a170907949400b00722f3d2ef96mr44502086ejc.705.1657180652335; Thu, 07 Jul 2022 00:57:32 -0700 (PDT) Received: from Keschdeichel.fritz.box ([2a02:6d40:3a4f:7b00:c19b:938e:7c97:afe2]) by smtp.gmail.com with ESMTPSA id g15-20020a056402320f00b0043a85d7d15esm3756357eda.12.2022.07.07.00.57.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jul 2022 00:57:31 -0700 (PDT) From: christian.ehrhardt@canonical.com To: "Min Hu (Connor)" Cc: dpdk stable Subject: patch 'net/bonding: fix mbuf fast free usage' has been queued to stable release 19.11.13 Date: Thu, 7 Jul 2022 09:54:36 +0200 Message-Id: <20220707075522.194223-41-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220707075522.194223-1-christian.ehrhardt@canonical.com> References: <20220707075522.194223-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 19.11.13 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/09/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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/84ee8673e5ecea79eebb2a544dd025c16b7bd8dc Thanks. Christian Ehrhardt --- >From 84ee8673e5ecea79eebb2a544dd025c16b7bd8dc 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 2c55621740..812bfb8bd3 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -3540,6 +3540,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; @@ -3600,6 +3601,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.37.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-07-07 09:54:12.921571452 +0200 +++ 0041-net-bonding-fix-mbuf-fast-free-usage.patch 2022-07-07 09:54:10.913824296 +0200 @@ -1 +1 @@ -From 18c41457cbaeaf44a87f88fe861de35c923ab702 Mon Sep 17 00:00:00 2001 +From 84ee8673e5ecea79eebb2a544dd025c16b7bd8dc 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 2c55621740..812bfb8bd3 100644 @@ -30 +31 @@ -@@ -3583,6 +3583,7 @@ bond_ethdev_configure(struct rte_eth_dev *dev) +@@ -3540,6 +3540,7 @@ bond_ethdev_configure(struct rte_eth_dev *dev) @@ -38 +39 @@ -@@ -3643,6 +3644,16 @@ bond_ethdev_configure(struct rte_eth_dev *dev) +@@ -3600,6 +3601,16 @@ bond_ethdev_configure(struct rte_eth_dev *dev) @@ -43 +44 @@ -+ if ((offloads & RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE) && ++ if ((offloads & DEV_TX_OFFLOAD_MBUF_FAST_FREE) && @@ -48 +49 @@ -+ offloads &= ~RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE; ++ offloads &= ~DEV_TX_OFFLOAD_MBUF_FAST_FREE;