On Thu, 2016-08-25 at 07:47 -0700, Eric Dumazet wrote: > On Thu, 2016-08-25 at 07:32 -0700, Eric Dumazet wrote: > > > In a future patch, we could change this so that we kick > > flush_all_backlogs() once for all devices, instead of one device at a > > time. > > > > We would not pass @dev anymore as a parameter and simply look at > > skb->dev->reg_state to decide to remove packets from queues in > > flush_backlog() > > This would be something like :
This is actually a nice cleanup. I hope to test it later. > diff --git a/net/core/dev.c b/net/core/dev.c > index 7feae74ca928..793ace2c600f 100644 > --- a/net/core/dev.c > +++ b/net/core/dev.c > @@ -4293,7 +4293,6 @@ int netif_receive_skb(struct sk_buff *skb) > EXPORT_SYMBOL(netif_receive_skb); > > struct flush_work { > - struct net_device *dev; > struct work_struct work; > }; With 'dev' removal, I think we can use directly 'work_struct' and avoid 'container_of' usage in flush_backlog(). Paolo