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 F0DBE43C60 for ; Thu, 7 Mar 2024 02:36:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E732F42EF7; Thu, 7 Mar 2024 02:36:42 +0100 (CET) Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by mails.dpdk.org (Postfix) with ESMTP id C6F5342F0D for ; Thu, 7 Mar 2024 02:36:40 +0100 (CET) Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-33e4f15710aso186906f8f.2 for ; Wed, 06 Mar 2024 17:36:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709775400; x=1710380200; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=weNjD16KrWiKwGAjME1lQSX9daQgJrJXBD3LyaVNOrE=; b=h4HNJ725WLC82rvidbI5N1Bni4KY62B+RH8NZsunMnPi7+9szHElE7m/I/cJ0ERfpy OcQkfXo8+HBpeuiSh0WsX5uT6ylWu2EqnbCrXDIlDpHZsWRdGFKdT6X4PVyAGjrlDQbY CcFh2cxF88YmzFs3WJ/XNKcDym4jK/ftNlBr0kuaRuJyGAG7kV+UdaUeAnKFJ90qfX+3 ieICU6ff/EGUroQctuEEobnWffSngydNkB5GnAxLfaGlLVov5tr1QjR3UvRMq3rAwolk hm/vxnjjlFjuaN7l/5rIr4OiGQINu6eZ/aYPRz68ajfUMtHSsAJhTVdBSjHNMhclb7pu jTkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709775400; x=1710380200; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=weNjD16KrWiKwGAjME1lQSX9daQgJrJXBD3LyaVNOrE=; b=wx0qLnOwZVYElGHCTv6eI3Vz5R1eLLeJ7uFgpexS93gVX6X6GAqMmyKu+TLGSbS09F z1W94BzQFE85BgZ32uz8DN7H0kGgYEkd0RQmzcQrig5kOHTUjtB/ZqsaiGb0zFg7IGrW S5JZToq+adCI7067N+Hhi0EA4p6co0yfGTWKH1K9jqPOiuZ7zZ9WMldDK6Ll28rcDFBq xK4f4rtNTK5TkQSsEcKtc7kHwPO3H0Xq1sp0aLWAY7zLaIn/2AczIXIAQatHmCrZIcZX 9F+pRol1/bog9vym6QMgAdS4+dreYitWQPZZFMianaMwFC+U4YESgKtboZK9TN7xmxK2 nzcw== X-Forwarded-Encrypted: i=1; AJvYcCU7pmDAUst7M+t/bi+RsuTeA1t4dtxPmxF6YcwAvtaPQ0kBhkxngUmYxf+eJyNGWuioiNyPCkkbeOo5gkmUelw= X-Gm-Message-State: AOJu0YxZkEa+HFBEMcxh1Ui5AyCgjZayyRVqERZ4S0eL3CqFJzmfOtqp Y5KqDOdMNMfkhTMxVZ7jvnYZlyL8qp5/GS6x0MytBReH6qe8rdAqdzu/+C1/kqQ= X-Google-Smtp-Source: AGHT+IHuGlJZO6Fc+WvtJRKu3XjLIvPbQkMJMtGt8PAqsDgODLS7jP1j4U1raAyKOg1G61kpZe3tGQ== X-Received: by 2002:adf:fdd2:0:b0:33d:8b2a:5428 with SMTP id i18-20020adffdd2000000b0033d8b2a5428mr11754696wrs.12.1709775400356; Wed, 06 Mar 2024 17:36:40 -0800 (PST) Received: from localhost ([137.220.120.171]) by smtp.gmail.com with ESMTPSA id da8-20020a056000196800b0033b87c2725csm18769970wrb.104.2024.03.06.17.36.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 17:36:39 -0800 (PST) From: luca.boccassi@gmail.com To: =?UTF-8?q?M=C3=A1rio=20Kuka?= Cc: Ferruh Yigit , dpdk stable Subject: patch 'net/bonding: fix flow count query' has been queued to stable release 22.11.5 Date: Thu, 7 Mar 2024 01:31:35 +0000 Message-Id: <20240307013159.1735343-78-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240307013159.1735343-1-luca.boccassi@gmail.com> References: <20240307013159.1735343-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 22.11.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/09/24. 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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/32bf2f21f5f63399e5d67e2550ecf8daec3c063f Thanks. Luca Boccassi --- >From 32bf2f21f5f63399e5d67e2550ecf8daec3c063f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rio=20Kuka?= Date: Wed, 3 Jan 2024 12:10:35 +0100 Subject: [PATCH] net/bonding: fix flow count query MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 02a2accb5f54183d448edf35902b71023ab908ac ] The rte_flow_query_count structure returned from the bonding driver always indicates that hits and bytes are invalid (bytes_set and hits_set flags are zero) because bond_flow_query_count() from the net/bonding driver does not set the bytes_set and hits_set flags. Fixes: 49dad9028e2a ("net/bonding: support flow API") Signed-off-by: Mário Kuka Acked-by: Ferruh Yigit --- drivers/net/bonding/rte_eth_bond_flow.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/bonding/rte_eth_bond_flow.c b/drivers/net/bonding/rte_eth_bond_flow.c index 65b77faae7..b38a9f89d0 100644 --- a/drivers/net/bonding/rte_eth_bond_flow.c +++ b/drivers/net/bonding/rte_eth_bond_flow.c @@ -180,6 +180,8 @@ bond_flow_query_count(struct rte_eth_dev *dev, struct rte_flow *flow, count->bytes = 0; count->hits = 0; + count->bytes_set = 0; + count->hits_set = 0; rte_memcpy(&slave_count, count, sizeof(slave_count)); for (i = 0; i < internals->slave_count; i++) { ret = rte_flow_query(internals->slaves[i].port_id, @@ -192,8 +194,12 @@ bond_flow_query_count(struct rte_eth_dev *dev, struct rte_flow *flow, } count->bytes += slave_count.bytes; count->hits += slave_count.hits; + count->bytes_set |= slave_count.bytes_set; + count->hits_set |= slave_count.hits_set; slave_count.bytes = 0; slave_count.hits = 0; + slave_count.bytes_set = 0; + slave_count.hits_set = 0; } return 0; } -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-07 01:05:41.418516355 +0000 +++ 0078-net-bonding-fix-flow-count-query.patch 2024-03-07 01:05:34.930942818 +0000 @@ -1 +1 @@ -From 02a2accb5f54183d448edf35902b71023ab908ac Mon Sep 17 00:00:00 2001 +From 32bf2f21f5f63399e5d67e2550ecf8daec3c063f Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit 02a2accb5f54183d448edf35902b71023ab908ac ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -24 +25 @@ -index 71a91675f7..5d0be5caf5 100644 +index 65b77faae7..b38a9f89d0 100644 @@ -33,3 +34,3 @@ - rte_memcpy(&member_count, count, sizeof(member_count)); - for (i = 0; i < internals->member_count; i++) { - ret = rte_flow_query(internals->members[i].port_id, + rte_memcpy(&slave_count, count, sizeof(slave_count)); + for (i = 0; i < internals->slave_count; i++) { + ret = rte_flow_query(internals->slaves[i].port_id, @@ -38,8 +39,8 @@ - count->bytes += member_count.bytes; - count->hits += member_count.hits; -+ count->bytes_set |= member_count.bytes_set; -+ count->hits_set |= member_count.hits_set; - member_count.bytes = 0; - member_count.hits = 0; -+ member_count.bytes_set = 0; -+ member_count.hits_set = 0; + count->bytes += slave_count.bytes; + count->hits += slave_count.hits; ++ count->bytes_set |= slave_count.bytes_set; ++ count->hits_set |= slave_count.hits_set; + slave_count.bytes = 0; + slave_count.hits = 0; ++ slave_count.bytes_set = 0; ++ slave_count.hits_set = 0;