From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 CB5844BCADD; Fri, 15 May 2026 16:56:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778864206; cv=none; b=dXk5M4L2kYgnq5DnVRNCcRW9qubZIxmVRwVGocjfrBFEIaVm/pympuYxTdlggrRN+TIZ241La2hA5VjJW3D9RSVIvxORg88mOaunOidyvr8ZNap6NUbQUyQzUwTz5FYl1Bh9bCKqXJQVOD02X3GBml6QO+FX+ZE3Nttt6SgSHuQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778864206; c=relaxed/simple; bh=dZHgEcaZBIQfE1fvYidv499aEgftN6jjFY8pvgQKqmc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=eCAmYz2rExTe06zmjwj25WYuP4ss1OTtqY1ImeuUtH5mi+wvfqnsTogV/eXrWlATaI6uBU11bNNTk80qaplWpbba8ubheMm2eXnOU+pIt98maTHwyAmdLEx6KKY9X9+WKvaks2468aVAh0/NSL1u0VVAprFwNRlXDn/DvJmmH8c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RN/Af64x; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RN/Af64x" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE4C9C2BCB0; Fri, 15 May 2026 16:56:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778864206; bh=dZHgEcaZBIQfE1fvYidv499aEgftN6jjFY8pvgQKqmc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RN/Af64xbNg/u1YS5KlA/eqkY1kPJEeIanb4/QGBrhMQryB7pSzhHEp4nSDXdmrS9 JKe5y0kPXp+q/V3Hs78g+cmmaylvS7PqyiEGnNTtfaJgZsLdulkr1Jf2iA73KWMfgF JrgIz5h6F9KIP3CPtgdNkYJj7kp2L2Vju5m8hvBpf8RaMueYWypp9PxThPVp0MBZrh 5EkMeBkMXaeERogYPdYeqY0HvLR2ZanKBj+8/svwU7XyIfmSBbp0fUIw+Nle2Wifkq jgvzO53yIh4gSJfG9AI8636Itb8hUb1ignxEMZVg43XdVWKbM+wJ/hxssRd974kAi+ MkQJeBXyV+Uzg== Date: Fri, 15 May 2026 17:56:41 +0100 From: Simon Horman To: Prathamesh Deshpande Cc: Saeed Mahameed , Leon Romanovsky , Tariq Toukan , Mark Bloch , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Carolina Jubran , Boris Pismenny , Andrew Lunn , netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net v1] net/mlx5e: Fix eswitch mode block underflow on IPsec acquire SA Message-ID: <20260515165641.GF227382@horms.kernel.org> References: <20260510225903.13184-1-prathameshdeshpande7@gmail.com> Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260510225903.13184-1-prathameshdeshpande7@gmail.com> On Sun, May 10, 2026 at 11:59:00PM +0100, Prathamesh Deshpande wrote: > mlx5e_xfrm_add_state() handles acquire-flow temporary SAs by allocating > software state and skipping hardware offload setup. > > That path jumps to the common success label before taking the eswitch mode > block. After tunnel-mode validation was moved earlier, the common success > label unconditionally calls mlx5_eswitch_unblock_mode(). For acquire SAs, > this decrements esw->offloads.num_block_mode without a matching increment. > > Return directly after installing the acquire SA offload handle, so only the > paths that successfully called mlx5_eswitch_block_mode() call the matching > unblock. > > Fixes: 22239eb258bc ("net/mlx5e: Prevent tunnel reformat when tunnel mode not allowed") > Signed-off-by: Prathamesh Deshpande Reviewed-by: Simon Horman