Lines Matching refs:fdb_work

118 	lan966x->fdb_work = alloc_ordered_workqueue("lan966x_order", 0);  in lan966x_fdb_init()
119 if (!lan966x->fdb_work) in lan966x_fdb_init()
127 destroy_workqueue(lan966x->fdb_work); in lan966x_fdb_deinit()
133 flush_workqueue(lan966x->fdb_work); in lan966x_fdb_flush_workqueue()
136 static void lan966x_fdb_port_event_work(struct lan966x_fdb_event_work *fdb_work) in lan966x_fdb_port_event_work() argument
142 lan966x = fdb_work->lan966x; in lan966x_fdb_port_event_work()
143 port = netdev_priv(fdb_work->orig_dev); in lan966x_fdb_port_event_work()
144 fdb_info = &fdb_work->fdb_info; in lan966x_fdb_port_event_work()
146 switch (fdb_work->event) { in lan966x_fdb_port_event_work()
162 static void lan966x_fdb_bridge_event_work(struct lan966x_fdb_event_work *fdb_work) in lan966x_fdb_bridge_event_work() argument
168 lan966x = fdb_work->lan966x; in lan966x_fdb_bridge_event_work()
169 fdb_info = &fdb_work->fdb_info; in lan966x_fdb_bridge_event_work()
172 switch (fdb_work->event) { in lan966x_fdb_bridge_event_work()
202 static void lan966x_fdb_lag_event_work(struct lan966x_fdb_event_work *fdb_work) in lan966x_fdb_lag_event_work() argument
208 if (!lan966x_lag_first_port(fdb_work->orig_dev, fdb_work->dev)) in lan966x_fdb_lag_event_work()
211 lan966x = fdb_work->lan966x; in lan966x_fdb_lag_event_work()
212 port = netdev_priv(fdb_work->dev); in lan966x_fdb_lag_event_work()
213 fdb_info = &fdb_work->fdb_info; in lan966x_fdb_lag_event_work()
215 switch (fdb_work->event) { in lan966x_fdb_lag_event_work()
232 struct lan966x_fdb_event_work *fdb_work = in lan966x_fdb_event_work() local
235 if (lan966x_netdevice_check(fdb_work->orig_dev)) in lan966x_fdb_event_work()
236 lan966x_fdb_port_event_work(fdb_work); in lan966x_fdb_event_work()
237 else if (netif_is_bridge_master(fdb_work->orig_dev)) in lan966x_fdb_event_work()
238 lan966x_fdb_bridge_event_work(fdb_work); in lan966x_fdb_event_work()
239 else if (netif_is_lag_master(fdb_work->orig_dev)) in lan966x_fdb_event_work()
240 lan966x_fdb_lag_event_work(fdb_work); in lan966x_fdb_event_work()
242 kfree(fdb_work->fdb_info.addr); in lan966x_fdb_event_work()
243 kfree(fdb_work); in lan966x_fdb_event_work()
253 struct lan966x_fdb_event_work *fdb_work; in lan966x_handle_fdb() local
265 fdb_work = kzalloc(sizeof(*fdb_work), GFP_ATOMIC); in lan966x_handle_fdb()
266 if (!fdb_work) in lan966x_handle_fdb()
269 fdb_work->dev = dev; in lan966x_handle_fdb()
270 fdb_work->orig_dev = orig_dev; in lan966x_handle_fdb()
271 fdb_work->lan966x = lan966x; in lan966x_handle_fdb()
272 fdb_work->event = event; in lan966x_handle_fdb()
273 INIT_WORK(&fdb_work->work, lan966x_fdb_event_work); in lan966x_handle_fdb()
274 memcpy(&fdb_work->fdb_info, fdb_info, sizeof(fdb_work->fdb_info)); in lan966x_handle_fdb()
275 fdb_work->fdb_info.addr = kzalloc(ETH_ALEN, GFP_ATOMIC); in lan966x_handle_fdb()
276 if (!fdb_work->fdb_info.addr) in lan966x_handle_fdb()
279 ether_addr_copy((u8 *)fdb_work->fdb_info.addr, fdb_info->addr); in lan966x_handle_fdb()
281 queue_work(lan966x->fdb_work, &fdb_work->work); in lan966x_handle_fdb()
287 kfree(fdb_work); in lan966x_handle_fdb()