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 C560B43CAD for ; Thu, 14 Mar 2024 01:12:20 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8A8DA42E5D; Thu, 14 Mar 2024 01:12:20 +0100 (CET) Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by mails.dpdk.org (Postfix) with ESMTP id 144CF42E40 for ; Thu, 14 Mar 2024 01:12:18 +0100 (CET) Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-413ebcf1315so3014005e9.2 for ; Wed, 13 Mar 2024 17:12:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710375138; x=1710979938; 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=rtnKOjrTE8DiutHLd/ibc8nj+zMbvcyHNkywvAQGGx0=; b=QhoeoX2Wp2xADDO/rmG9Hnh1aJ6Eziux2+ZE1WJFjJevXfmL65iDstq8vIzItx3bdo uq8lh3i14/ZaH5p+tT+mDtFMOoPyZhCOnIZ5RqBkIBeKdiwAeL7oIYQDQ2jbF4npn7bH pGk+BHPBpZGH9F1njAV4e2uRrgPHjPDqnRz/BO50pbUzy/6e6oa7z//w+Eld1rr08fma ygkWsNXGwqd7+EYkYwATG4F+TqNJcxaLqS0ZNfYym6Qj/OvZYURqU/5qVjzQb1YKCews fnIgGtu3CRqFVfK7/jM+cmwx0xafy3g2J+BG0DdgHyyVpaf/A38LAvB60K0jPPbUvUbD D0lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710375138; x=1710979938; 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=rtnKOjrTE8DiutHLd/ibc8nj+zMbvcyHNkywvAQGGx0=; b=YLOuL/WVQzcldRIZYNND+3QoSI1WE1KRC3qVZfgr6qPC8ywf1mxJ+8W3O4w04IZ5eB j4FLtrpe9o7AlXEHr7lPdMlGDIE9WmG2ESntGcaB3D/snPLOnJkGAlm4I1pAHauamMEa 8ZWOZuHkD6rY54I/V+J3L550i0CnqCkYzRykbrXZ750FJeZnfg85y6OmVstXXOwHAkJY u9/4gyH7FN7cB3s7NbkpNDl2HvvnP+FLKx50ac0Fi0fcSx1lMxdF22mrTuFA/pRbwkHn 1bfpz4KeoqjnuRHbH5Xv3xmLaYWyTTItDUb67Fl+fgkktsh2j3TqpQlNqwtByCmC1uu2 jbwA== X-Forwarded-Encrypted: i=1; AJvYcCUs44hc3bA2a2rEZzaOEFdgJDcsyBjQhRG6B0FglwpBnHypcPgOR+x4xiMKFWdgmc3ZNWCLo8XaE4TzP9eNCsA= X-Gm-Message-State: AOJu0YzQwRa/E46/y0ll+o8EX2Ld/cRuUNVW5+mGJ/5PcErYvpa8ByxA dprUakMWjE/JA2O/wUBtrDhk+HcOjuVAtLVXQs70+3RB5thx9bcT6UFPaQ0hjJM= X-Google-Smtp-Source: AGHT+IGTpu4kpK44oTiH2hzUX2O0eRpFhsrBJ3RNz0o1WffHzX6PrGErEM5KEHDQFp2GFali6qrjSg== X-Received: by 2002:a05:600c:4e92:b0:413:38ee:69e7 with SMTP id f18-20020a05600c4e9200b0041338ee69e7mr195616wmq.36.1710375137730; Wed, 13 Mar 2024 17:12:17 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:7aef:1aaa:3dff:d546]) by smtp.gmail.com with ESMTPSA id o18-20020a05600c4fd200b004132f9cf053sm3762787wmq.33.2024.03.13.17.12.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 17:12:17 -0700 (PDT) From: luca.boccassi@gmail.com To: Bing Zhao Cc: Suanming Mou , dpdk stable Subject: patch 'net/mlx5: fix condition of LACP miss flow' has been queued to stable release 22.11.5 Date: Thu, 14 Mar 2024 00:09:40 +0000 Message-Id: <20240314000957.2810803-44-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240314000957.2810803-1-luca.boccassi@gmail.com> References: <20240307013159.1735343-102-luca.boccassi@gmail.com> <20240314000957.2810803-1-luca.boccassi@gmail.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 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/16/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/25f2e790457624521449eba5a35f4adf75b58e71 Thanks. Luca Boccassi --- >From 25f2e790457624521449eba5a35f4adf75b58e71 Mon Sep 17 00:00:00 2001 From: Bing Zhao Date: Wed, 21 Feb 2024 08:49:48 +0200 Subject: [PATCH] net/mlx5: fix condition of LACP miss flow [ upstream commit 87e4384d2662f520bfae28ae14dbff2429c6923d ] The LACP traffic is only related to the bond interface. The default miss flow to redirect the LACP traffic with ethertype 0x8809 to the kernel driver should only be created on the bond device. This commit will: 1. remove the incorrect assertion of the port role. 2. skip the resource allocation and flow rule creation on the representor port. Fixes: 0f0ae73a3287 ("net/mlx5: add parameter for LACP packets control") Fixes: 49dffadf4b0c ("net/mlx5: fix LACP redirection in Rx domain") Signed-off-by: Bing Zhao Acked-by: Suanming Mou --- drivers/net/mlx5/mlx5_flow_hw.c | 3 +-- drivers/net/mlx5/mlx5_trigger.c | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c index 2b90748d04..948c56099f 100644 --- a/drivers/net/mlx5/mlx5_flow_hw.c +++ b/drivers/net/mlx5/mlx5_flow_hw.c @@ -6446,7 +6446,7 @@ flow_hw_create_ctrl_tables(struct rte_eth_dev *dev, struct rte_flow_error *error } } /* Create LACP default miss table. */ - if (!priv->sh->config.lacp_by_user && priv->pf_bond >= 0) { + if (!priv->sh->config.lacp_by_user && priv->pf_bond >= 0 && priv->master) { lacp_rx_items_tmpl = flow_hw_create_lacp_rx_pattern_template(dev, error); if (!lacp_rx_items_tmpl) { DRV_LOG(ERR, "port %u failed to create pattern template" @@ -9286,7 +9286,6 @@ mlx5_flow_hw_lacp_rx_flow(struct rte_eth_dev *dev) .type = MLX5_HW_CTRL_FLOW_TYPE_LACP_RX, }; - MLX5_ASSERT(priv->master); if (!priv->dr_ctx || !priv->hw_lacp_rx_tbl) return 0; return flow_hw_create_ctrl_flow(dev, dev, priv->hw_lacp_rx_tbl, eth_lacp, 0, diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c index b12a1dc1c7..dbf5719a7e 100644 --- a/drivers/net/mlx5/mlx5_trigger.c +++ b/drivers/net/mlx5/mlx5_trigger.c @@ -1524,7 +1524,7 @@ mlx5_traffic_enable_hws(struct rte_eth_dev *dev) } if (priv->isolated) return 0; - if (!priv->sh->config.lacp_by_user && priv->pf_bond >= 0) + if (!priv->sh->config.lacp_by_user && priv->pf_bond >= 0 && priv->master) if (mlx5_flow_hw_lacp_rx_flow(dev)) goto error; if (dev->data->promiscuous) @@ -1632,14 +1632,14 @@ mlx5_traffic_enable(struct rte_eth_dev *dev) DRV_LOG(INFO, "port %u FDB default rule is disabled", dev->data->port_id); } - if (!priv->sh->config.lacp_by_user && priv->pf_bond >= 0) { + if (!priv->sh->config.lacp_by_user && priv->pf_bond >= 0 && priv->master) { ret = mlx5_flow_lacp_miss(dev); if (ret) DRV_LOG(INFO, "port %u LACP rule cannot be created - " "forward LACP to kernel.", dev->data->port_id); else - DRV_LOG(INFO, "LACP traffic will be missed in port %u." - , dev->data->port_id); + DRV_LOG(INFO, "LACP traffic will be missed in port %u.", + dev->data->port_id); } if (priv->isolated) return 0; -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-14 00:09:22.709237729 +0000 +++ 0044-net-mlx5-fix-condition-of-LACP-miss-flow.patch 2024-03-14 00:09:20.653616015 +0000 @@ -1 +1 @@ -From 87e4384d2662f520bfae28ae14dbff2429c6923d Mon Sep 17 00:00:00 2001 +From 25f2e790457624521449eba5a35f4adf75b58e71 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 87e4384d2662f520bfae28ae14dbff2429c6923d ] + @@ -17 +18,0 @@ -Cc: stable@dpdk.org @@ -27 +28 @@ -index 91d1c59fbd..e7f1b5f551 100644 +index 2b90748d04..948c56099f 100644 @@ -30 +31 @@ -@@ -8934,7 +8934,7 @@ flow_hw_create_ctrl_tables(struct rte_eth_dev *dev, struct rte_flow_error *error +@@ -6446,7 +6446,7 @@ flow_hw_create_ctrl_tables(struct rte_eth_dev *dev, struct rte_flow_error *error @@ -39 +40 @@ -@@ -12761,7 +12761,6 @@ mlx5_flow_hw_lacp_rx_flow(struct rte_eth_dev *dev) +@@ -9286,7 +9286,6 @@ mlx5_flow_hw_lacp_rx_flow(struct rte_eth_dev *dev) @@ -48 +49 @@ -index 5ac25d7e2d..f8d67282ce 100644 +index b12a1dc1c7..dbf5719a7e 100644