Lines Matching refs:port

427 	/* free if only remaining port is host port */
481 int cpsw_ale_add_ucast(struct cpsw_ale *ale, const u8 *addr, int port,
493 cpsw_ale_set_port_num(ale_entry, port, ale->port_num_bits);
507 int cpsw_ale_del_ucast(struct cpsw_ale *ale, const u8 *addr, int port,
724 * if yes it means same VLAN was added to >1 port in multi port mode, so
725 * remove port_mask ports from VLAN ALE entry excluding Host port.
731 /* last port or force remove - remove VLAN */
777 dev_dbg(ale->params.dev, "port mask 0x%x untag 0x%x\n", vlan_members,
846 void cpsw_ale_set_allmulti(struct cpsw_ale *ale, int allmulti, int port)
862 if (port != -1 && !(vlan_members & BIT(port)))
1101 int cpsw_ale_control_set(struct cpsw_ale *ale, int port, int control,
1113 port = 0; /* global, port is a dont care */
1115 if (port < 0 || port >= ale->params.ale_ports)
1122 offset = info->offset + (port * info->port_offset);
1123 shift = info->shift + (port * info->port_shift);
1132 int cpsw_ale_control_get(struct cpsw_ale *ale, int port, int control)
1143 port = 0; /* global, port is a dont care */
1145 if (port < 0 || port >= ale->params.ale_ports)
1148 offset = info->offset + (port * info->port_offset);
1149 shift = info->shift + (port * info->port_shift);
1155 int cpsw_ale_rx_ratelimit_mc(struct cpsw_ale *ale, int port, unsigned int ratelimit_pps)
1162 dev_err(ale->params.dev, "ALE MC port:%d ratelimit min value 1000pps\n", port);
1167 dev_info(ale->params.dev, "ALE port:%d MC ratelimit set to %dpps (requested %d)\n",
1168 port, ratelimit_pps - remainder, ratelimit_pps);
1170 cpsw_ale_control_set(ale, port, ALE_PORT_MCAST_LIMIT, val);
1172 dev_dbg(ale->params.dev, "ALE port:%d MC ratelimit set %d\n",
1173 port, val * ALE_RATE_LIMIT_MIN_PPS);
1177 int cpsw_ale_rx_ratelimit_bc(struct cpsw_ale *ale, int port, unsigned int ratelimit_pps)
1184 dev_err(ale->params.dev, "ALE port:%d BC ratelimit min value 1000pps\n", port);
1189 dev_info(ale->params.dev, "ALE port:%d BC ratelimit set to %dpps (requested %d)\n",
1190 port, ratelimit_pps - remainder, ratelimit_pps);
1192 cpsw_ale_control_set(ale, port, ALE_PORT_BCAST_LIMIT, val);
1194 dev_dbg(ale->params.dev, "ALE port:%d BC ratelimit set %d\n",
1195 port, val * ALE_RATE_LIMIT_MIN_PPS);
1265 * number_of_packets = (Fclk / ALE_PRESCALE) * port.BCAST/MCAST_LIMIT
1267 * port.BCAST/MCAST_LIMIT is 8bit
1269 * For multi port configuration support the ALE_PRESCALE is configured to 1ms interval,
1270 * which allows to configure port.BCAST/MCAST_LIMIT per port and achieve:
1271 * min number_of_packets = 1000 when port.BCAST/MCAST_LIMIT = 1
1272 * max number_of_packets = 1000 * 255 = 255000 when port.BCAST/MCAST_LIMIT = 0xFF
1278 * The actual Rate Limit cfg enabled per-port by port.BCAST/MCAST_LIMIT