Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3171F282F29; Mon, 17 Aug 2026 15:07:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786979256; cv=none; b=oCGZ6WFjWCi5yeTngeMPowTJ5Mrl2MHKAegAZqPggAy8YW2Z26vMVx+0kEETnUvbMY2IyIdjvxOYaZzZN1Zw1sn4UQFJupCuQPGY8SARFRMBfQoxs+p591olW7x0EGoLgsI0Oej0xcywwtV2paHz1sOlR97yJVtSLC2H9QXw2Qo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786979256; c=relaxed/simple; bh=1nnOONo9PZEbKUmFtgwSTx35CTEscN2Pga/j4DMdPPg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TxFrb7a6/Ut/ifcY3hoAiY+ubvzzcMOlmhm536IkH6vQluIxg2uOIwqzoGJGUO6c9/5+pcqyCzxImAlNEKicsxYvlZqdzaGXPCBG2E1yDcKywZMgiddN/e3T87DY0dEl59UH/iW+Fn0p4GL8V2QaMzSdgVkg0uP4xaaiXDklVSc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=nsBPfIAG; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="nsBPfIAG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 89A9F1F000E9; Mon, 17 Aug 2026 15:07:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1786979255; bh=iY6fCm//c9rEIWMkT9NNldwV6aHvJQpgkCCVaXeMJOA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=nsBPfIAG7yUgSs63w4W5Vt6eKQzo4qPZ5stMG66oN9xY6HIebgXlUYkZtNB9YpDab LpkCuAnFyqdBqaZV2VqNv89NlGVPW4nCRpmd/gxSjnHhxJSIOykGzNdZe0dv5NW5at moHt1iSeTZTsQh95Rp49vuy8wH5oBnLtfYi1UlwQ= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Yael Chemla , Cosmin Ratiu , Tariq Toukan , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.1 163/609] net/mlx5: E-Switch, fix zero num_dest in prio_tag egress vlan rule Date: Mon, 17 Aug 2026 15:27:39 +0200 Message-ID: <20260817132549.473199111@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260817132543.039278408@linuxfoundation.org> References: <20260817132543.039278408@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Yael Chemla [ Upstream commit d12956d083eb70f2c6d72711aebaf8c2ce21e170 ] esw_egress_acl_vlan_create() hardcodes num_dest=0 in its mlx5_add_flow_rules() call. When invoked from the non-bond path fwd_dest is NULL and num_dest=0 is correct. When invoked from esw_acl_egress_ofld_rules_create() during a bond event, fwd_dest is non-NULL and flow_act.action carries MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, but _mlx5_add_flow_rules() rejects a non-NULL dest pointer paired with dest_num<=0 and returns -EINVAL. The error propagates as "configure slave vport egress fwd, err(-22)". The passive vport's egress ACL table ends up with its flow groups allocated but no FTEs, so prio-tagged packets are not popped and bond failover is broken on prio_tag_required devices. Fix by passing fwd_dest ? 1 : 0 as num_dest to match the actual number of destinations supplied. Fixes: bf773dc0e6d5 ("net/mlx5: E-Switch, Introduce APIs to enable egress acl forward-to-vport rule") Signed-off-by: Yael Chemla Reviewed-by: Cosmin Ratiu Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/20260717073306.1242399-1-tariqt@nvidia.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlx5/core/esw/acl/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/esw/acl/helper.c b/drivers/net/ethernet/mellanox/mlx5/core/esw/acl/helper.c index 45b839116212df..61d299f8ca25ce 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/esw/acl/helper.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/esw/acl/helper.c @@ -70,7 +70,7 @@ int esw_egress_acl_vlan_create(struct mlx5_eswitch *esw, flow_act.action = flow_action; vport->egress.allowed_vlan = mlx5_add_flow_rules(vport->egress.acl, spec, - &flow_act, fwd_dest, 0); + &flow_act, fwd_dest, fwd_dest ? 1 : 0); if (IS_ERR(vport->egress.allowed_vlan)) { err = PTR_ERR(vport->egress.allowed_vlan); esw_warn(esw->dev, -- 2.53.0