[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1472137118.4769.38.camel@redhat.com>
Date: Thu, 25 Aug 2016 16:58:38 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
Tom Herbert <tom@...bertland.com>,
Hannes Frederic Sowa <hannes@...essinduktion.org>
Subject: Re: [PATCH net-next] net: flush the softnet backlog in process
context
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
Powered by blists - more mailing lists