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,
913 ret = bcm_sf2_cfp_ipv4_rule_set(priv, port, port_num,
918 ret = bcm_sf2_cfp_ipv6_rule_set(priv, port, port_num,
929 static int bcm_sf2_cfp_rule_set(struct dsa_switch *ds, int port,
953 ret = bcm_sf2_cfp_rule_cmp(priv, port, fs);
961 ret = bcm_sf2_cfp_rule_insert(ds, port, fs);
967 rule->port = port;
974 static int bcm_sf2_cfp_rule_del_one(struct bcm_sf2_priv *priv, int port,
1011 static int bcm_sf2_cfp_rule_remove(struct bcm_sf2_priv *priv, int port,
1017 ret = bcm_sf2_cfp_rule_del_one(priv, port, loc, &next_loc);
1023 ret = bcm_sf2_cfp_rule_del_one(priv, port, next_loc, NULL);
1028 static int bcm_sf2_cfp_rule_del(struct bcm_sf2_priv *priv, int port, u32 loc)
1043 rule = bcm_sf2_cfp_rule_find(priv, port, loc);
1047 ret = bcm_sf2_cfp_rule_remove(priv, port, loc);
1068 static int bcm_sf2_cfp_rule_get(struct bcm_sf2_priv *priv, int port,
1073 rule = bcm_sf2_cfp_rule_find(priv, port, nfc->fs.location);
1089 int port, struct ethtool_rxnfc *nfc,
1106 int bcm_sf2_get_rxnfc(struct dsa_switch *ds, int port,
1109 struct net_device *p = dsa_to_port(ds, port)->cpu_dp->master;
1124 ret = bcm_sf2_cfp_rule_get(priv, port, nfc);
1127 ret = bcm_sf2_cfp_rule_get_all(priv, port, nfc, rule_locs);
1149 int bcm_sf2_set_rxnfc(struct dsa_switch *ds, int port,
1152 struct net_device *p = dsa_to_port(ds, port)->cpu_dp->master;
1160 ret = bcm_sf2_cfp_rule_set(ds, port, &nfc->fs);
1164 ret = bcm_sf2_cfp_rule_del(priv, port, nfc->fs.location);
1183 bcm_sf2_cfp_rule_del(priv, port, nfc->fs.location);
1225 bcm_sf2_cfp_rule_del(priv, rule->port, rule->fs.location);
1247 ret = bcm_sf2_cfp_rule_remove(priv, rule->port,
1254 ret = bcm_sf2_cfp_rule_insert(ds, rule->port, &rule->fs);
1286 void bcm_sf2_cfp_get_strings(struct dsa_switch *ds, int port,
1309 void bcm_sf2_cfp_get_ethtool_stats(struct dsa_switch *ds, int port,
1321 rule = bcm_sf2_cfp_rule_find(priv, port, i);
1341 int bcm_sf2_cfp_get_sset_count(struct dsa_switch *ds, int port, int sset)