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 370DE1A76A5; Tue, 30 Jul 2024 17:32:25 +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=1722360745; cv=none; b=dQQIUWMlJ707oudfEgxGqc9T+0eEBp3fNBDY3aNsE8bu4ANhOjb07XfUwgM7MNrXuMws8Azox6vPkXwqB4PTBd0TNJNpwUqhiDZae+BvUpIXA3vCFRXgyF4L/XvB67WZhFPdJO+NjaklEN3L1h+kTlhq2pHETJRQEVqfIIn4UEg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722360745; c=relaxed/simple; bh=czgMK5woNJP/ZHAARoL6XZLxoZYxsN93PycWJ9QQ6sU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BJofDtneDiotTrSTS7XXas18Dnv95tM5/p/PwhSQwy557yaRF08eOXaQUMcqOlqhRG+KUHOXBYI3saoDk4K+pJWSaTu6Qnuv+toPSOW7AEbR75gAcdyoKZKmuaKuAU56IOSHSC3kqjXSwOthnvw3j+0TIr4rAAD87aHq2pL6H+4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=hN2kn/jn; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="hN2kn/jn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AB1D8C32782; Tue, 30 Jul 2024 17:32:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1722360745; bh=czgMK5woNJP/ZHAARoL6XZLxoZYxsN93PycWJ9QQ6sU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hN2kn/jnNeNFcE4tjA8LBLISO+wTRFdIER5IHuL3Cd3p17lifMTMgP2eN+qiiDjq0 /XxVUjNkYNuDAhM+zO/Kypt8iOU9BHXeFDbYFC/KxymCCidlOSE177MTeZUlMhjyGc i2AoclxlZuCOJnw1SxiOX56H5PV4RP8Mqzyzn3PQ= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Marcin Szycik , Przemek Kitszel , Wojciech Drewek , Simon Horman , Sujai Buvaneswaran , Tony Nguyen , Sasha Levin Subject: [PATCH 6.10 763/809] ice: Fix recipe read procedure Date: Tue, 30 Jul 2024 17:50:39 +0200 Message-ID: <20240730151755.100842630@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240730151724.637682316@linuxfoundation.org> References: <20240730151724.637682316@linuxfoundation.org> User-Agent: quilt/0.67 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.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Wojciech Drewek [ Upstream commit 19abb9c2b900bad59e0a9818d6c83bb4cc875437 ] When ice driver reads recipes from firmware information about need_pass_l2 and allow_pass_l2 flags is not stored correctly. Those flags are stored as one bit each in ice_sw_recipe structure. Because of that, the result of checking a flag has to be casted to bool. Note that the need_pass_l2 flag currently works correctly, because it's stored in the first bit. Fixes: bccd9bce29e0 ("ice: Add guard rule when creating FDB in switchdev") Reviewed-by: Marcin Szycik Reviewed-by: Przemek Kitszel Signed-off-by: Wojciech Drewek Reviewed-by: Simon Horman Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/ice/ice_switch.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/intel/ice/ice_switch.c b/drivers/net/ethernet/intel/ice/ice_switch.c index 1191031b2a43d..ffd6c42bda1ed 100644 --- a/drivers/net/ethernet/intel/ice/ice_switch.c +++ b/drivers/net/ethernet/intel/ice/ice_switch.c @@ -2413,10 +2413,10 @@ ice_get_recp_frm_fw(struct ice_hw *hw, struct ice_sw_recipe *recps, u8 rid, /* Propagate some data to the recipe database */ recps[idx].is_root = !!is_root; recps[idx].priority = root_bufs.content.act_ctrl_fwd_priority; - recps[idx].need_pass_l2 = root_bufs.content.act_ctrl & - ICE_AQ_RECIPE_ACT_NEED_PASS_L2; - recps[idx].allow_pass_l2 = root_bufs.content.act_ctrl & - ICE_AQ_RECIPE_ACT_ALLOW_PASS_L2; + recps[idx].need_pass_l2 = !!(root_bufs.content.act_ctrl & + ICE_AQ_RECIPE_ACT_NEED_PASS_L2); + recps[idx].allow_pass_l2 = !!(root_bufs.content.act_ctrl & + ICE_AQ_RECIPE_ACT_ALLOW_PASS_L2); bitmap_zero(recps[idx].res_idxs, ICE_MAX_FV_WORDS); if (root_bufs.content.result_indx & ICE_AQ_RECIPE_RESULT_EN) { recps[idx].chain_idx = root_bufs.content.result_indx & -- 2.43.0