Lines Matching refs:br_offloads

307 	struct ice_pf *pf = bridge->br_offloads->pf;  in ice_esw_br_port_vlan_lookup()
332 struct ice_pf *pf = bridge->br_offloads->pf; in ice_eswitch_br_fdb_entry_delete()
372 struct ice_pf *pf = bridge->br_offloads->pf; in ice_eswitch_br_fdb_entry_find_and_delete()
394 struct ice_pf *pf = bridge->br_offloads->pf; in ice_eswitch_br_fdb_entry_create()
544 struct ice_esw_br_offloads *br_offloads; in ice_eswitch_br_switchdev_event() local
549 br_offloads = ice_nb_to_br_offloads(nb, switchdev_nb); in ice_eswitch_br_switchdev_event()
577 queue_work(br_offloads->wq, &work->work); in ice_eswitch_br_switchdev_event()
992 ice_eswitch_br_deinit(struct ice_esw_br_offloads *br_offloads, in ice_eswitch_br_deinit() argument
1006 br_offloads->bridge = NULL; in ice_eswitch_br_deinit()
1011 ice_eswitch_br_init(struct ice_esw_br_offloads *br_offloads, int ifindex) in ice_eswitch_br_init() argument
1027 bridge->br_offloads = br_offloads; in ice_eswitch_br_init()
1031 br_offloads->bridge = bridge; in ice_eswitch_br_init()
1037 ice_eswitch_br_get(struct ice_esw_br_offloads *br_offloads, int ifindex, in ice_eswitch_br_get() argument
1040 struct ice_esw_br *bridge = br_offloads->bridge; in ice_eswitch_br_get()
1052 bridge = ice_eswitch_br_init(br_offloads, ifindex); in ice_eswitch_br_get()
1060 ice_eswitch_br_verify_deinit(struct ice_esw_br_offloads *br_offloads, in ice_eswitch_br_verify_deinit() argument
1067 ice_eswitch_br_deinit(br_offloads, bridge); in ice_eswitch_br_verify_deinit()
1071 ice_eswitch_br_port_unlink(struct ice_esw_br_offloads *br_offloads, in ice_eswitch_br_port_unlink() argument
1094 ice_eswitch_br_verify_deinit(br_offloads, bridge); in ice_eswitch_br_port_unlink()
1100 ice_eswitch_br_port_link(struct ice_esw_br_offloads *br_offloads, in ice_eswitch_br_port_link() argument
1113 bridge = ice_eswitch_br_get(br_offloads, ifindex, extack); in ice_eswitch_br_port_link()
1147 ice_eswitch_br_verify_deinit(br_offloads, bridge); in ice_eswitch_br_port_link()
1156 struct ice_esw_br_offloads *br_offloads; in ice_eswitch_br_port_changeupper() local
1160 br_offloads = ice_nb_to_br_offloads(nb, netdev_nb); in ice_eswitch_br_port_changeupper()
1172 return ice_eswitch_br_port_link(br_offloads, dev, in ice_eswitch_br_port_changeupper()
1175 return ice_eswitch_br_port_unlink(br_offloads, dev, in ice_eswitch_br_port_changeupper()
1197 struct ice_esw_br_offloads *br_offloads = pf->eswitch.br_offloads; in ice_eswitch_br_offloads_dealloc() local
1201 if (!br_offloads) in ice_eswitch_br_offloads_dealloc()
1204 ice_eswitch_br_deinit(br_offloads, br_offloads->bridge); in ice_eswitch_br_offloads_dealloc()
1206 pf->eswitch.br_offloads = NULL; in ice_eswitch_br_offloads_dealloc()
1207 kfree(br_offloads); in ice_eswitch_br_offloads_dealloc()
1213 struct ice_esw_br_offloads *br_offloads; in ice_eswitch_br_offloads_alloc() local
1217 if (pf->eswitch.br_offloads) in ice_eswitch_br_offloads_alloc()
1220 br_offloads = kzalloc(sizeof(*br_offloads), GFP_KERNEL); in ice_eswitch_br_offloads_alloc()
1221 if (!br_offloads) in ice_eswitch_br_offloads_alloc()
1224 pf->eswitch.br_offloads = br_offloads; in ice_eswitch_br_offloads_alloc()
1225 br_offloads->pf = pf; in ice_eswitch_br_offloads_alloc()
1227 return br_offloads; in ice_eswitch_br_offloads_alloc()
1233 struct ice_esw_br_offloads *br_offloads; in ice_eswitch_br_offloads_deinit() local
1235 br_offloads = pf->eswitch.br_offloads; in ice_eswitch_br_offloads_deinit()
1236 if (!br_offloads) in ice_eswitch_br_offloads_deinit()
1239 cancel_delayed_work_sync(&br_offloads->update_work); in ice_eswitch_br_offloads_deinit()
1240 unregister_netdevice_notifier(&br_offloads->netdev_nb); in ice_eswitch_br_offloads_deinit()
1241 unregister_switchdev_blocking_notifier(&br_offloads->switchdev_blk); in ice_eswitch_br_offloads_deinit()
1242 unregister_switchdev_notifier(&br_offloads->switchdev_nb); in ice_eswitch_br_offloads_deinit()
1243 destroy_workqueue(br_offloads->wq); in ice_eswitch_br_offloads_deinit()
1254 static void ice_eswitch_br_update(struct ice_esw_br_offloads *br_offloads) in ice_eswitch_br_update() argument
1256 struct ice_esw_br *bridge = br_offloads->bridge; in ice_eswitch_br_update()
1278 struct ice_esw_br_offloads *br_offloads; in ice_eswitch_br_update_work() local
1280 br_offloads = ice_work_to_br_offloads(work); in ice_eswitch_br_update_work()
1282 ice_eswitch_br_update(br_offloads); in ice_eswitch_br_update_work()
1284 queue_delayed_work(br_offloads->wq, &br_offloads->update_work, in ice_eswitch_br_update_work()
1291 struct ice_esw_br_offloads *br_offloads; in ice_eswitch_br_offloads_init() local
1296 br_offloads = ice_eswitch_br_offloads_alloc(pf); in ice_eswitch_br_offloads_init()
1298 if (IS_ERR(br_offloads)) { in ice_eswitch_br_offloads_init()
1300 return PTR_ERR(br_offloads); in ice_eswitch_br_offloads_init()
1303 br_offloads->wq = alloc_ordered_workqueue("ice_bridge_wq", 0); in ice_eswitch_br_offloads_init()
1304 if (!br_offloads->wq) { in ice_eswitch_br_offloads_init()
1310 br_offloads->switchdev_nb.notifier_call = in ice_eswitch_br_offloads_init()
1312 err = register_switchdev_notifier(&br_offloads->switchdev_nb); in ice_eswitch_br_offloads_init()
1319 br_offloads->switchdev_blk.notifier_call = in ice_eswitch_br_offloads_init()
1321 err = register_switchdev_blocking_notifier(&br_offloads->switchdev_blk); in ice_eswitch_br_offloads_init()
1328 br_offloads->netdev_nb.notifier_call = ice_eswitch_br_port_event; in ice_eswitch_br_offloads_init()
1329 err = register_netdevice_notifier(&br_offloads->netdev_nb); in ice_eswitch_br_offloads_init()
1336 INIT_DELAYED_WORK(&br_offloads->update_work, in ice_eswitch_br_offloads_init()
1338 queue_delayed_work(br_offloads->wq, &br_offloads->update_work, in ice_eswitch_br_offloads_init()
1344 unregister_switchdev_blocking_notifier(&br_offloads->switchdev_blk); in ice_eswitch_br_offloads_init()
1346 unregister_switchdev_notifier(&br_offloads->switchdev_nb); in ice_eswitch_br_offloads_init()
1348 destroy_workqueue(br_offloads->wq); in ice_eswitch_br_offloads_init()