Lines Matching refs:br_port
48 return repr->br_port; in ice_eswitch_br_netdev_to_port()
63 return pf->br_port; in ice_eswitch_br_netdev_to_port()
389 struct ice_esw_br_port *br_port, in ice_eswitch_br_fdb_entry_create() argument
393 struct ice_esw_br *bridge = br_port->bridge; in ice_eswitch_br_fdb_entry_create()
408 vlan = ice_esw_br_port_vlan_lookup(bridge, br_port->vsi_idx, in ice_eswitch_br_fdb_entry_create()
427 flow = ice_eswitch_br_flow_create(dev, hw, br_port->vsi_idx, in ice_eswitch_br_fdb_entry_create()
428 br_port->type, mac, vid); in ice_eswitch_br_fdb_entry_create()
436 fdb_entry->br_port = br_port; in ice_eswitch_br_fdb_entry_create()
481 struct ice_esw_br_port *br_port; in ice_eswitch_br_fdb_event_work() local
485 br_port = ice_eswitch_br_netdev_to_port(fdb_work->dev); in ice_eswitch_br_fdb_event_work()
486 if (!br_port) in ice_eswitch_br_fdb_event_work()
491 ice_eswitch_br_fdb_entry_create(fdb_work->dev, br_port, in ice_eswitch_br_fdb_event_work()
495 ice_eswitch_br_fdb_entry_find_and_delete(br_port->bridge, in ice_eswitch_br_fdb_event_work()
793 struct ice_esw_br_port *br_port = ice_eswitch_br_netdev_to_port(netdev); in ice_eswitch_br_port_obj_add() local
797 if (!br_port) in ice_eswitch_br_port_obj_add()
803 err = ice_eswitch_br_port_vlan_add(br_port->bridge, in ice_eswitch_br_port_obj_add()
804 br_port->vsi_idx, vlan->vid, in ice_eswitch_br_port_obj_add()
816 struct ice_esw_br_port *br_port = ice_eswitch_br_netdev_to_port(netdev); in ice_eswitch_br_port_obj_del() local
819 if (!br_port) in ice_eswitch_br_port_obj_del()
825 ice_eswitch_br_port_vlan_del(br_port->bridge, br_port->vsi_idx, in ice_eswitch_br_port_obj_del()
838 struct ice_esw_br_port *br_port = ice_eswitch_br_netdev_to_port(netdev); in ice_eswitch_br_port_obj_attr_set() local
840 if (!br_port) in ice_eswitch_br_port_obj_attr_set()
845 ice_eswitch_br_vlan_filtering_set(br_port->bridge, in ice_eswitch_br_port_obj_attr_set()
849 br_port->bridge->ageing_time = in ice_eswitch_br_port_obj_attr_set()
889 struct ice_esw_br_port *br_port) in ice_eswitch_br_port_deinit() argument
892 struct ice_vsi *vsi = br_port->vsi; in ice_eswitch_br_port_deinit()
895 if (br_port == fdb_entry->br_port) in ice_eswitch_br_port_deinit()
899 if (br_port->type == ICE_ESWITCH_BR_UPLINK_PORT && vsi->back) { in ice_eswitch_br_port_deinit()
900 vsi->back->br_port = NULL; in ice_eswitch_br_port_deinit()
903 ice_repr_get(vsi->back, br_port->repr_id); in ice_eswitch_br_port_deinit()
906 repr->br_port = NULL; in ice_eswitch_br_port_deinit()
909 xa_erase(&bridge->ports, br_port->vsi_idx); in ice_eswitch_br_port_deinit()
910 ice_eswitch_br_port_vlans_flush(br_port); in ice_eswitch_br_port_deinit()
911 kfree(br_port); in ice_eswitch_br_port_deinit()
917 struct ice_esw_br_port *br_port; in ice_eswitch_br_port_init() local
919 br_port = kzalloc(sizeof(*br_port), GFP_KERNEL); in ice_eswitch_br_port_init()
920 if (!br_port) in ice_eswitch_br_port_init()
923 xa_init(&br_port->vlans); in ice_eswitch_br_port_init()
925 br_port->bridge = bridge; in ice_eswitch_br_port_init()
927 return br_port; in ice_eswitch_br_port_init()
934 struct ice_esw_br_port *br_port; in ice_eswitch_br_vf_repr_port_init() local
937 br_port = ice_eswitch_br_port_init(bridge); in ice_eswitch_br_vf_repr_port_init()
938 if (IS_ERR(br_port)) in ice_eswitch_br_vf_repr_port_init()
939 return PTR_ERR(br_port); in ice_eswitch_br_vf_repr_port_init()
941 br_port->vsi = repr->src_vsi; in ice_eswitch_br_vf_repr_port_init()
942 br_port->vsi_idx = br_port->vsi->idx; in ice_eswitch_br_vf_repr_port_init()
943 br_port->type = ICE_ESWITCH_BR_VF_REPR_PORT; in ice_eswitch_br_vf_repr_port_init()
944 br_port->repr_id = repr->id; in ice_eswitch_br_vf_repr_port_init()
945 repr->br_port = br_port; in ice_eswitch_br_vf_repr_port_init()
947 err = xa_insert(&bridge->ports, br_port->vsi_idx, br_port, GFP_KERNEL); in ice_eswitch_br_vf_repr_port_init()
949 ice_eswitch_br_port_deinit(bridge, br_port); in ice_eswitch_br_vf_repr_port_init()
960 struct ice_esw_br_port *br_port; in ice_eswitch_br_uplink_port_init() local
963 br_port = ice_eswitch_br_port_init(bridge); in ice_eswitch_br_uplink_port_init()
964 if (IS_ERR(br_port)) in ice_eswitch_br_uplink_port_init()
965 return PTR_ERR(br_port); in ice_eswitch_br_uplink_port_init()
967 br_port->vsi = vsi; in ice_eswitch_br_uplink_port_init()
968 br_port->vsi_idx = br_port->vsi->idx; in ice_eswitch_br_uplink_port_init()
969 br_port->type = ICE_ESWITCH_BR_UPLINK_PORT; in ice_eswitch_br_uplink_port_init()
970 pf->br_port = br_port; in ice_eswitch_br_uplink_port_init()
972 err = xa_insert(&bridge->ports, br_port->vsi_idx, br_port, GFP_KERNEL); in ice_eswitch_br_uplink_port_init()
974 ice_eswitch_br_port_deinit(bridge, br_port); in ice_eswitch_br_uplink_port_init()
1075 struct ice_esw_br_port *br_port = ice_eswitch_br_netdev_to_port(dev); in ice_eswitch_br_port_unlink() local
1078 if (!br_port) { in ice_eswitch_br_port_unlink()
1084 if (br_port->bridge->ifindex != ifindex) { in ice_eswitch_br_port_unlink()
1090 bridge = br_port->bridge; in ice_eswitch_br_port_unlink()
1092 trace_ice_eswitch_br_port_unlink(br_port); in ice_eswitch_br_port_unlink()
1093 ice_eswitch_br_port_deinit(br_port->bridge, br_port); in ice_eswitch_br_port_unlink()
1121 trace_ice_eswitch_br_port_link(repr->br_port); in ice_eswitch_br_port_link()
1137 trace_ice_eswitch_br_port_link(pf->br_port); in ice_eswitch_br_port_link()