Lines Matching refs:act_tcam
104 struct fbnic_act_tcam *act_tcam; in fbnic_bmc_rpc_all_multi_config() local
121 set_bit(FBNIC_MAC_ADDR_T_BMC, mac_addr->act_tcam); in fbnic_bmc_rpc_all_multi_config()
126 mac_addr->act_tcam); in fbnic_bmc_rpc_all_multi_config()
129 mac_addr->act_tcam); in fbnic_bmc_rpc_all_multi_config()
130 } else if (!test_bit(FBNIC_MAC_ADDR_T_BMC, mac_addr->act_tcam) && in fbnic_bmc_rpc_all_multi_config()
133 clear_bit(FBNIC_MAC_ADDR_T_ALLMULTI, mac_addr->act_tcam); in fbnic_bmc_rpc_all_multi_config()
134 clear_bit(FBNIC_MAC_ADDR_T_BMC, mac_addr->act_tcam); in fbnic_bmc_rpc_all_multi_config()
144 act_tcam = &fbd->act_tcam[FBNIC_RPC_ACT_TBL_BMC_ALL_MULTI_OFFSET]; in fbnic_bmc_rpc_all_multi_config()
150 if (act_tcam->state == FBNIC_TCAM_S_VALID) in fbnic_bmc_rpc_all_multi_config()
151 act_tcam->state = FBNIC_TCAM_S_DELETE; in fbnic_bmc_rpc_all_multi_config()
156 act_tcam->dest = FIELD_PREP(FBNIC_RPC_ACT_TBL0_DEST_MASK, in fbnic_bmc_rpc_all_multi_config()
158 act_tcam->mask.tcam[0] = 0xffff; in fbnic_bmc_rpc_all_multi_config()
161 act_tcam->value.tcam[1] = in fbnic_bmc_rpc_all_multi_config()
165 act_tcam->mask.tcam[1] = 0xffff & in fbnic_bmc_rpc_all_multi_config()
170 act_tcam->mask.tcam[j] = 0xffff; in fbnic_bmc_rpc_all_multi_config()
172 act_tcam->state = FBNIC_TCAM_S_UPDATE; in fbnic_bmc_rpc_all_multi_config()
178 struct fbnic_act_tcam *act_tcam; in fbnic_bmc_rpc_init() local
208 set_bit(FBNIC_MAC_ADDR_T_BMC, mac_addr->act_tcam); in fbnic_bmc_rpc_init()
215 set_bit(FBNIC_MAC_ADDR_T_BMC, mac_addr->act_tcam); in fbnic_bmc_rpc_init()
219 act_tcam = &fbd->act_tcam[FBNIC_RPC_ACT_TBL_BMC_OFFSET]; in fbnic_bmc_rpc_init()
220 act_tcam->dest = FIELD_PREP(FBNIC_RPC_ACT_TBL0_DEST_MASK, in fbnic_bmc_rpc_init()
222 act_tcam->mask.tcam[0] = 0xffff; in fbnic_bmc_rpc_init()
228 act_tcam->value.tcam[1] = FBNIC_RPC_TCAM_ACT1_L2_MACDA_VALID; in fbnic_bmc_rpc_init()
229 act_tcam->mask.tcam[1] = 0xffff & in fbnic_bmc_rpc_init()
234 act_tcam->mask.tcam[j] = 0xffff; in fbnic_bmc_rpc_init()
236 act_tcam->state = FBNIC_TCAM_S_UPDATE; in fbnic_bmc_rpc_init()
271 struct fbnic_act_tcam *act_tcam = &fbd->act_tcam[idx]; in fbnic_rss_reinit() local
297 act_tcam->dest = dest; in fbnic_rss_reinit()
298 act_tcam->rss_en_mask = rss_en_mask; in fbnic_rss_reinit()
299 act_tcam->state = FBNIC_TCAM_S_UPDATE; in fbnic_rss_reinit()
301 act_tcam->mask.tcam[0] = 0xffff; in fbnic_rss_reinit()
316 act_tcam->value.tcam[1] = value; in fbnic_rss_reinit()
317 act_tcam->mask.tcam[1] = ~value; in fbnic_rss_reinit()
320 act_tcam->mask.tcam[j] = 0xffff; in fbnic_rss_reinit()
322 act_tcam->state = FBNIC_TCAM_S_UPDATE; in fbnic_rss_reinit()
413 if (!test_and_clear_bit(tcam_idx, mac_addr->act_tcam)) in __fbnic_xc_unsync()
416 if (bitmap_empty(mac_addr->act_tcam, FBNIC_RPC_TCAM_ACT_NUM_ENTRIES)) in __fbnic_xc_unsync()
440 if (!test_bit(FBNIC_MAC_ADDR_T_BMC, src_addr->act_tcam)) in fbnic_sift_macda()
449 if (bitmap_weight(src_addr->act_tcam, in fbnic_sift_macda()
483 if (test_bit(FBNIC_MAC_ADDR_T_BMC, mac_addr->act_tcam)) { in fbnic_clear_macda()
564 struct fbnic_act_tcam *act_tcam; in fbnic_clear_rules() local
580 act_tcam = &fbd->act_tcam[i]; in fbnic_clear_rules()
582 if (act_tcam->state == FBNIC_TCAM_S_VALID && in fbnic_clear_rules()
583 (act_tcam->dest & dest)) { in fbnic_clear_rules()
587 act_tcam->state = FBNIC_TCAM_S_UPDATE; in fbnic_clear_rules()
595 act_tcam = &fbd->act_tcam[i]; in fbnic_clear_rules()
597 if (act_tcam->state != FBNIC_TCAM_S_VALID) in fbnic_clear_rules()
601 act_tcam->state = FBNIC_TCAM_S_UPDATE; in fbnic_clear_rules()
608 memset(&fbd->act_tcam[idx], 0, sizeof(struct fbnic_act_tcam)); in fbnic_delete_act_tcam()
613 struct fbnic_act_tcam *act_tcam = &fbd->act_tcam[idx]; in fbnic_update_act_tcam() local
617 wr32(fbd, FBNIC_RPC_ACT_TBL0(idx), act_tcam->dest); in fbnic_update_act_tcam()
618 wr32(fbd, FBNIC_RPC_ACT_TBL1(idx), act_tcam->rss_en_mask); in fbnic_update_act_tcam()
624 act_tcam->mask.tcam[i]) | in fbnic_update_act_tcam()
626 act_tcam->value.tcam[i])); in fbnic_update_act_tcam()
631 act_tcam->state = FBNIC_TCAM_S_VALID; in fbnic_update_act_tcam()
640 struct fbnic_act_tcam *act_tcam = &fbd->act_tcam[i]; in fbnic_write_rules() local
643 if (!(act_tcam->state & FBNIC_TCAM_S_UPDATE)) in fbnic_write_rules()
646 if (act_tcam->state == FBNIC_TCAM_S_DELETE) in fbnic_write_rules()