Lines Matching refs:rule_index

213 				   unsigned int rule_index,  in bcm_sf2_cfp_act_pol_set()  argument
239 core_writel(priv, rule_index << CHAIN_ID_SHIFT, CORE_ACT_POL_DATA1); in bcm_sf2_cfp_act_pol_set()
246 pr_err("Policer entry at %d failed\n", rule_index); in bcm_sf2_cfp_act_pol_set()
256 pr_err("Meter entry at %d failed\n", rule_index); in bcm_sf2_cfp_act_pol_set()
354 unsigned int slice_num, rule_index; in bcm_sf2_cfp_ipv4_rule_set() local
385 rule_index = find_first_zero_bit(priv->cfp.used, in bcm_sf2_cfp_ipv4_rule_set()
388 rule_index = fs->location; in bcm_sf2_cfp_ipv4_rule_set()
390 if (rule_index > bcm_sf2_cfp_rule_size(priv)) in bcm_sf2_cfp_ipv4_rule_set()
451 bcm_sf2_cfp_rule_addr_set(priv, rule_index); in bcm_sf2_cfp_ipv4_rule_set()
455 pr_err("TCAM entry at addr %d failed\n", rule_index); in bcm_sf2_cfp_ipv4_rule_set()
460 ret = bcm_sf2_cfp_act_pol_set(priv, rule_index, port, port_num, in bcm_sf2_cfp_ipv4_rule_set()
471 set_bit(rule_index, priv->cfp.used); in bcm_sf2_cfp_ipv4_rule_set()
472 set_bit(rule_index, priv->cfp.unique); in bcm_sf2_cfp_ipv4_rule_set()
473 fs->location = rule_index; in bcm_sf2_cfp_ipv4_rule_set()
634 unsigned int slice_num, rule_index[2]; in bcm_sf2_cfp_ipv6_rule_set() local
683 rule_index[1] = find_first_zero_bit(priv->cfp.used, in bcm_sf2_cfp_ipv6_rule_set()
686 rule_index[1] = fs->location; in bcm_sf2_cfp_ipv6_rule_set()
687 if (rule_index[1] > bcm_sf2_cfp_rule_size(priv)) in bcm_sf2_cfp_ipv6_rule_set()
693 set_bit(rule_index[1], priv->cfp.used); in bcm_sf2_cfp_ipv6_rule_set()
695 rule_index[0] = find_first_zero_bit(priv->cfp.used, in bcm_sf2_cfp_ipv6_rule_set()
697 if (rule_index[0] > bcm_sf2_cfp_rule_size(priv)) { in bcm_sf2_cfp_ipv6_rule_set()
753 bcm_sf2_cfp_rule_addr_set(priv, rule_index[0]); in bcm_sf2_cfp_ipv6_rule_set()
757 pr_err("TCAM entry at addr %d failed\n", rule_index[0]); in bcm_sf2_cfp_ipv6_rule_set()
762 ret = bcm_sf2_cfp_act_pol_set(priv, rule_index[0], port, port_num, in bcm_sf2_cfp_ipv6_rule_set()
792 reg = rule_index[0] << 24 | udf_upper_bits(num_udf) << 16 | in bcm_sf2_cfp_ipv6_rule_set()
809 bcm_sf2_cfp_rule_addr_set(priv, rule_index[1]); in bcm_sf2_cfp_ipv6_rule_set()
813 pr_err("TCAM entry at addr %d failed\n", rule_index[1]); in bcm_sf2_cfp_ipv6_rule_set()
820 ret = bcm_sf2_cfp_act_pol_set(priv, rule_index[1], port, port_num, in bcm_sf2_cfp_ipv6_rule_set()
833 set_bit(rule_index[0], priv->cfp.used); in bcm_sf2_cfp_ipv6_rule_set()
834 set_bit(rule_index[1], priv->cfp.unique); in bcm_sf2_cfp_ipv6_rule_set()
835 fs->location = rule_index[1]; in bcm_sf2_cfp_ipv6_rule_set()
842 clear_bit(rule_index[1], priv->cfp.used); in bcm_sf2_cfp_ipv6_rule_set()