On Wed, Aug 14, 2019 at 01:49:54PM +0000, Vlad Buslov wrote: > > 1447 > > 1448 if (mlx5e_is_offloaded_flow(flow)) { > > 1449 counter = mlx5e_tc_get_counter(flow); > > 1450 lastuse = mlx5_fc_query_lastuse(counter); > > 1451 if (time_after((unsigned long)lastuse, nhe->reported_lastuse)) { > > 1452 mlx5e_flow_put(netdev_priv(e->out_dev), flow); > > 1453 neigh_used = true; > > 1454 break; > > > > I think we need to call mlx5e_encap_put(netdev_priv(e->out_dev), e); > > before this break; > > We are breaking from the inner loop (not returning from the function, > just breaking the innermost loop) here after releasing the reference to > flow which was obtained at the beginning of the loop. > Oh... Duh. I am embarrassed. I misread it to think we were breaking from the outer loop. regards, dan carpenter