[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160530081752.GA4956@gondor.apana.org.au>
Date: Mon, 30 May 2016 16:17:52 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Lennert Buytenhek <buytenh@...tstofly.org>
Cc: Patrick McHardy <kaber@...sh.net>, netdev@...r.kernel.org
Subject: [PATCH 0/2] macvlan: Avoid unnecessary multicast cloning
On Fri, May 27, 2016 at 02:44:33AM +0300, Lennert Buytenhek wrote:
> Commit 412ca1550cbecb2c ("macvlan: Move broadcasts into a work queue")
> moved processing of all macvlan multicasts into a work queue. This
> causes a noticable performance regression when there is heavy multicast
> traffic on the underlying interface for multicast groups that the
> macvlan subinterfaces are not members of, in which case we end up
> cloning all those packets and then freeing them again from a work queue
> without really doing any useful work with them in between.
OK so your motivation is to get rid of the unnecessary memory
allocation, right?
Here's my totally untested patch, it tries to resolve your problem
by maintaining a filter hash at the macvlan_port level so that we
can quickly determine whether a given packet is needed or not.
It is preceded by a patch that fixes a potential use-after-free
bug that I discovered while looking over this.
Thanks,
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists