Lines Matching refs:vid
64 u16 vid; member
72 u16 vid; member
93 static int prestera_port_vid_stp_set(struct prestera_port *port, u16 vid,
179 prestera_bridge_vlan_create(struct prestera_bridge_port *br_port, u16 vid) in prestera_bridge_vlan_create() argument
188 br_vlan->vid = vid; in prestera_bridge_vlan_create()
202 prestera_bridge_vlan_by_vid(struct prestera_bridge_port *br_port, u16 vid) in prestera_bridge_vlan_by_vid() argument
207 if (br_vlan->vid == vid) in prestera_bridge_vlan_by_vid()
215 u16 vid) in prestera_bridge_vlan_port_count() argument
223 if (br_vlan->vid == vid) { in prestera_bridge_vlan_port_count()
240 prestera_port_vlan_by_vid(struct prestera_port *port, u16 vid) in prestera_port_vlan_by_vid() argument
245 if (port_vlan->vid == vid) in prestera_port_vlan_by_vid()
253 prestera_port_vlan_create(struct prestera_port *port, u16 vid, bool untagged) in prestera_port_vlan_create() argument
258 port_vlan = prestera_port_vlan_by_vid(port, vid); in prestera_port_vlan_create()
262 err = prestera_hw_vlan_port_set(port, vid, true, untagged); in prestera_port_vlan_create()
273 port_vlan->vid = vid; in prestera_port_vlan_create()
280 prestera_hw_vlan_port_set(port, vid, false, false); in prestera_port_vlan_create()
285 const unsigned char *mac, u16 vid, bool dynamic) in prestera_fdb_add() argument
289 mac, vid, dynamic); in prestera_fdb_add()
291 return prestera_hw_fdb_add(port, mac, vid, dynamic); in prestera_fdb_add()
295 const unsigned char *mac, u16 vid) in prestera_fdb_del() argument
299 mac, vid); in prestera_fdb_del()
301 return prestera_hw_fdb_del(port, mac, vid); in prestera_fdb_del()
304 static int prestera_fdb_flush_port_vlan(struct prestera_port *port, u16 vid, in prestera_fdb_flush_port_vlan() argument
309 vid, mode); in prestera_fdb_flush_port_vlan()
311 return prestera_hw_fdb_flush_port_vlan(port, vid, mode); in prestera_fdb_flush_port_vlan()
332 mdb->vid); in prestera_mdb_port_del()
395 u16 vid = port_vlan->vid; in prestera_port_vlan_bridge_leave() local
399 port_count = prestera_bridge_vlan_port_count(br_port->bridge, vid); in prestera_port_vlan_bridge_leave()
400 br_vlan = prestera_bridge_vlan_by_vid(br_port, vid); in prestera_port_vlan_bridge_leave()
408 prestera_hw_fdb_flush_vlan(port->sw, vid, fdb_flush_mode); in prestera_port_vlan_bridge_leave()
410 prestera_fdb_flush_port_vlan(port, vid, fdb_flush_mode); in prestera_port_vlan_bridge_leave()
423 u16 vid = port_vlan->vid; in prestera_port_vlan_destroy() local
428 prestera_hw_vlan_port_set(port, vid, false, false); in prestera_port_vlan_destroy()
707 static int prestera_port_vid_stp_set(struct prestera_port *port, u16 vid, in prestera_port_vid_stp_set() argument
734 return prestera_hw_vlan_port_stp_set(port, vid, hw_state); in prestera_port_vid_stp_set()
826 return prestera_port_vid_stp_set(port, br_vlan->vid, state); in prestera_port_bridge_vlan_stp_set()
839 u16 vid; in prestera_port_attr_stp_state_set() local
846 vid = br_port->bridge->bridge_id; in prestera_port_attr_stp_state_set()
847 err = prestera_port_vid_stp_set(port, vid, state); in prestera_port_attr_stp_state_set()
869 prestera_port_vid_stp_set(port, vid, br_port->stp_state); in prestera_port_attr_stp_state_set()
958 const unsigned char addr[ETH_ALEN], u16 vid) in prestera_mdb_port_add() argument
964 orig_dev, vid)) { in prestera_mdb_port_add()
966 vid); in prestera_mdb_port_add()
1003 mdb->vid)) in prestera_br_mdb_sync()
1014 mdb->vid); in prestera_br_mdb_sync()
1034 mdb->vid)) in prestera_br_mdb_sync()
1040 mdb->vid); in prestera_br_mdb_sync()
1209 send_info.vid = info->vid; in prestera_fdb_offload_notify()
1224 u16 vid; in prestera_port_fdb_set() local
1233 vid = fdb_info->vid; in prestera_port_fdb_set()
1235 vid = bridge->bridge_id; in prestera_port_fdb_set()
1238 err = prestera_fdb_add(port, fdb_info->addr, vid, false); in prestera_port_fdb_set()
1240 err = prestera_fdb_del(port, fdb_info->addr, vid); in prestera_port_fdb_set()
1362 u16 vid = port_vlan->vid; in prestera_port_vlan_bridge_join() local
1372 err = prestera_port_vid_stp_set(port, vid, br_port->stp_state); in prestera_port_vlan_bridge_join()
1376 br_vlan = prestera_bridge_vlan_by_vid(br_port, vid); in prestera_port_vlan_bridge_join()
1378 br_vlan = prestera_bridge_vlan_create(br_port, vid); in prestera_port_vlan_bridge_join()
1393 prestera_port_vid_stp_set(port, vid, BR_STATE_FORWARDING); in prestera_port_vlan_bridge_join()
1403 u16 vid, bool is_untagged, bool is_pvid, in prestera_bridge_port_vlan_add() argument
1412 pvid = vid; in prestera_bridge_port_vlan_add()
1414 pvid = port->pvid == vid ? 0 : port->pvid; in prestera_bridge_port_vlan_add()
1416 port_vlan = prestera_port_vlan_by_vid(port, vid); in prestera_bridge_port_vlan_add()
1421 port_vlan = prestera_port_vlan_create(port, vid, is_untagged); in prestera_bridge_port_vlan_add()
1425 err = prestera_hw_vlan_port_set(port, vid, true, is_untagged); in prestera_bridge_port_vlan_add()
1443 prestera_hw_vlan_port_set(port, vid, false, false); in prestera_bridge_port_vlan_add()
1452 struct prestera_bridge_port *br_port, u16 vid) in prestera_bridge_port_vlan_del() argument
1454 u16 pvid = port->pvid == vid ? 0 : port->pvid; in prestera_bridge_port_vlan_del()
1457 port_vlan = prestera_port_vlan_by_vid(port, vid); in prestera_bridge_port_vlan_del()
1489 vlan->vid, flag_untagged, in prestera_port_vlans_add()
1496 const unsigned char *addr, u16 vid) in prestera_br_mdb_entry_create() argument
1505 mdb_entry = prestera_mdb_entry_create(sw, addr, vid); in prestera_br_mdb_entry_create()
1546 const unsigned char *addr, u16 vid) in prestera_br_mdb_entry_find() argument
1553 vid == br_mdb->mdb->vid) in prestera_br_mdb_entry_find()
1562 const unsigned char *addr, u16 vid) in prestera_br_mdb_entry_get() argument
1566 br_mdb = prestera_br_mdb_entry_find(br_dev, addr, vid); in prestera_br_mdb_entry_get()
1570 return prestera_br_mdb_entry_create(sw, br_dev, addr, vid); in prestera_br_mdb_entry_get()
1592 if (mdb->vid && !prestera_port_vlan_by_vid(port, mdb->vid)) in prestera_mdb_port_addr_obj_add()
1595 if (mdb->vid) in prestera_mdb_port_addr_obj_add()
1597 mdb->vid); in prestera_mdb_port_addr_obj_add()
1668 prestera_bridge_port_vlan_del(port, br_port, vlan->vid); in prestera_port_vlans_del()
1688 if (mdb->vid && !prestera_port_vlan_by_vid(port, mdb->vid)) in prestera_mdb_port_addr_obj_del()
1695 mdb->vid); in prestera_mdb_port_addr_obj_del()
1796 info.vid = evt->fdb_evt.vid; in prestera_fdb_event()