Lines Matching refs:port

23 	int port;
53 /* End of L3, byte offset 0, src port */
55 /* End of L3, byte offset 2, dst port */
86 /* End of L3, byte offset 0, src port */
110 /* End of L3, byte offset 2, dst port */
223 * which port and queue this should be forwarded to.
232 /* Enable looping back to the original port */
346 static int bcm_sf2_cfp_ipv4_rule_set(struct bcm_sf2_priv *priv, int port,
415 /* Apply to all packets received through this port */
416 core_writel(priv, BIT(port), CORE_CFP_DATA_PORT(7));
418 /* Source port map match */
460 ret = bcm_sf2_cfp_act_pol_set(priv, rule_index, port, port_num,
467 reg |= BIT(port);
483 const __be32 *ip6_addr, const __be16 port,
501 * UDF_n_B8 [23:8] (port)
505 val = (u32)be16_to_cpu(port) << 8 | ((reg >> 8) & 0xff);
568 int port, u32 location)
573 if (rule->port == port && rule->fs.location == location)
580 static int bcm_sf2_cfp_rule_cmp(struct bcm_sf2_priv *priv, int port,
592 if (rule->port != port)
627 static int bcm_sf2_cfp_ipv6_rule_set(struct bcm_sf2_priv *priv, int port,
714 /* Apply to all packets received through this port */
715 core_writel(priv, BIT(port), CORE_CFP_DATA_PORT(7));
717 /* Source port map match */
744 /* Slice the IPv6 source address and port */
762 ret = bcm_sf2_cfp_act_pol_set(priv, rule_index[0], port, port_num,
779 /* Chained rule, source port match is coming from the rule we are
820 ret = bcm_sf2_cfp_act_pol_set(priv, rule_index[1], port, port_num,
827 reg |= BIT(port);
846 static int bcm_sf2_cfp_rule_insert(struct dsa_switch *ds, int port,
850 s8 cpu_port = dsa_to_port(ds, port)->cpu_dp->index;
858 * target the CPU port in order for it to be working.
864 * destination port is enabled and that we are within the
876 * the matching and have it tagged or untagged on the destination port,
910 ret = bcm_sf2_cfp_ipv4_rule_set(priv, port, port_num,
915 ret = bcm_sf2_cfp_ipv6_rule_set(priv, port, port_num,
926 static int bcm_sf2_cfp_rule_set(struct dsa_switch *ds, int port,
949 ret = bcm_sf2_cfp_rule_cmp(priv, port, fs);
957 ret = bcm_sf2_cfp_rule_insert(ds, port, fs);
963 rule->port = port;
970 static int bcm_sf2_cfp_rule_del_one(struct bcm_sf2_priv *priv, int port,
1007 static int bcm_sf2_cfp_rule_remove(struct bcm_sf2_priv *priv, int port,
1013 ret = bcm_sf2_cfp_rule_del_one(priv, port, loc, &next_loc);
1019 ret = bcm_sf2_cfp_rule_del_one(priv, port, next_loc, NULL);
1024 static int bcm_sf2_cfp_rule_del(struct bcm_sf2_priv *priv, int port, u32 loc)
1039 rule = bcm_sf2_cfp_rule_find(priv, port, loc);
1043 ret = bcm_sf2_cfp_rule_remove(priv, port, loc);
1064 static int bcm_sf2_cfp_rule_get(struct bcm_sf2_priv *priv, int port,
1069 rule = bcm_sf2_cfp_rule_find(priv, port, nfc->fs.location);
1085 int port, struct ethtool_rxnfc *nfc,
1102 int bcm_sf2_get_rxnfc(struct dsa_switch *ds, int port,
1105 struct net_device *p = dsa_port_to_master(dsa_to_port(ds, port));
1120 ret = bcm_sf2_cfp_rule_get(priv, port, nfc);
1123 ret = bcm_sf2_cfp_rule_get_all(priv, port, nfc, rule_locs);
1145 int bcm_sf2_set_rxnfc(struct dsa_switch *ds, int port,
1148 struct net_device *p = dsa_port_to_master(dsa_to_port(ds, port));
1156 ret = bcm_sf2_cfp_rule_set(ds, port, &nfc->fs);
1160 ret = bcm_sf2_cfp_rule_del(priv, port, nfc->fs.location);
1179 bcm_sf2_cfp_rule_del(priv, port, nfc->fs.location);
1221 bcm_sf2_cfp_rule_del(priv, rule->port, rule->fs.location);
1243 ret = bcm_sf2_cfp_rule_remove(priv, rule->port,
1250 ret = bcm_sf2_cfp_rule_insert(ds, rule->port, &rule->fs);
1282 void bcm_sf2_cfp_get_strings(struct dsa_switch *ds, int port,
1305 void bcm_sf2_cfp_get_ethtool_stats(struct dsa_switch *ds, int port,
1317 rule = bcm_sf2_cfp_rule_find(priv, port, i);
1337 int bcm_sf2_cfp_get_sset_count(struct dsa_switch *ds, int port, int sset)