Skip to content

Commit 19abb9c

Browse files
WojDrewanguy11
authored andcommitted
ice: Fix recipe read procedure
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: bccd9bc ("ice: Add guard rule when creating FDB in switchdev") Reviewed-by: Marcin Szycik <[email protected]> Reviewed-by: Przemek Kitszel <[email protected]> Signed-off-by: Wojciech Drewek <[email protected]> Reviewed-by: Simon Horman <[email protected]> Tested-by: Sujai Buvaneswaran <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent 6ebbe97 commit 19abb9c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/net/ethernet/intel/ice/ice_switch.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2400,10 +2400,10 @@ ice_get_recp_frm_fw(struct ice_hw *hw, struct ice_sw_recipe *recps, u8 rid,
24002400

24012401
/* Propagate some data to the recipe database */
24022402
recps[idx].priority = root_bufs.content.act_ctrl_fwd_priority;
2403-
recps[idx].need_pass_l2 = root_bufs.content.act_ctrl &
2404-
ICE_AQ_RECIPE_ACT_NEED_PASS_L2;
2405-
recps[idx].allow_pass_l2 = root_bufs.content.act_ctrl &
2406-
ICE_AQ_RECIPE_ACT_ALLOW_PASS_L2;
2403+
recps[idx].need_pass_l2 = !!(root_bufs.content.act_ctrl &
2404+
ICE_AQ_RECIPE_ACT_NEED_PASS_L2);
2405+
recps[idx].allow_pass_l2 = !!(root_bufs.content.act_ctrl &
2406+
ICE_AQ_RECIPE_ACT_ALLOW_PASS_L2);
24072407
bitmap_zero(recps[idx].res_idxs, ICE_MAX_FV_WORDS);
24082408
if (root_bufs.content.result_indx & ICE_AQ_RECIPE_RESULT_EN) {
24092409
set_bit(root_bufs.content.result_indx &

0 commit comments

Comments
 (0)