macvlan: Handle broadcasts inline if we have only a few macvlans.
Subsystems (2)
RFC PATCH 1/1 macvlan: Handle broadcasts inline if we have only a few macvlans.
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.
The commit message for commit 412ca1550cbecb2c says:
| Fundamentally, we need to ensure that the amount of work handled | in each netif_rx backlog run is constrained. As broadcasts are | anything but constrained, it either needs to be limited per run | or moved to process context.
This patch moves multicast handling back into macvlan_handle_frame() context if there are 100 or fewer macvlan subinterfaces, while keeping the work queue for if there are more macvlan subinterfaces than that.
I played around with keeping track of the number of macvlan subinterfaces that have each multicast filter bit set, but that ended up being more complicated than I liked. Conditionalising the work queue deferring on the total number of macvlan subinterfaces seems like a fair compromise.
On a quickly whipped together test program that creates an ethertap interface with a single macvlan subinterface and then blasts 16 Mi multicast packets through the ethertap interface for a multicast group that the macvlan subinterface is not a member of, run time goes from (vanilla kernel):
# time ./stress
real 0m41.864s
user 0m0.622s
sys 0m20.754sto (with this patch):
# time ./stress
real 0m16.539s
user 0m0.519s
sys 0m15.949s--- drivers/net/macvlan.c | 71 ++++++++++++++++++++++++++++++++------------------- 1 file changed, 45 insertions(+), 26 deletions(-)
drivers/net/macvlan.c +45 -26
@@ -231,7 +231,8 @@ static unsigned int mc_hash(const struct macvlan_dev *vlan,static void macvlan_broadcast (struct sk_buff *skb,const struct macvlan_port *port,struct net_device *src, -enum macvlan_mode mode) +enum macvlan_mode mode, +bool do_rx_softirq) {const struct ethhdr *eth =eth_hdr (skb);const struct macvlan_dev *vlan;
@@ -254,17 +255,49 @@ static void macvlan_broadcast(struct sk_buff *skb, err =NET_RX_DROP ; nskb =skb_clone (skb,GFP_ATOMIC ); -if (likely (nskb)) +if (likely (nskb)) { err =macvlan_broadcast_one ( nskb, vlan, eth, - mode ==MACVLAN_MODE_BRIDGE ) ?: -netif_rx_ni (nskb); + mode ==MACVLAN_MODE_BRIDGE ); +if (err ==0 ) { +if (do_rx_softirq) + err =netif_rx_ni (nskb); +else + err =netif_rx (nskb); + } + }macvlan_count_rx (vlan, skb->len +ETH_HLEN , err ==NET_RX_SUCCESS , true); } } } +static void macvlan_process_one (struct sk_buff *skb, +struct macvlan_port *port, +const struct macvlan_dev *src, +bool do_rx_softirq) +{ +if (!src) +/* frame comes from an external address */ +macvlan_broadcast (skb, port,NULL , +MACVLAN_MODE_PRIVATE | +MACVLAN_MODE_VEPA | +MACVLAN_MODE_PASSTHRU | +MACVLAN_MODE_BRIDGE , do_rx_softirq); +else if (src->mode ==MACVLAN_MODE_VEPA ) +/* flood to everyone except source */ +macvlan_broadcast (skb, port, src->dev, +MACVLAN_MODE_VEPA | +MACVLAN_MODE_BRIDGE , do_rx_softirq); +else +/* +* flood only to VEPA ports, bridge ports +* already saw the frame on the way out. +*/ +macvlan_broadcast (skb, port, src->dev, +MACVLAN_MODE_VEPA , do_rx_softirq); +} +static void macvlan_process_broadcast (struct work_struct *w) { struct macvlan_port *port = container_of(w, struct macvlan_port,
@@ -282,27 +315,7 @@ static void macvlan_process_broadcast(struct work_struct *w)const struct macvlan_dev *src =MACVLAN_SKB_CB (skb)->src;rcu_read_lock (); - -if (!src) -/* frame comes from an external address */ -macvlan_broadcast (skb, port,NULL , -MACVLAN_MODE_PRIVATE | -MACVLAN_MODE_VEPA | -MACVLAN_MODE_PASSTHRU | -MACVLAN_MODE_BRIDGE ); -else if (src->mode ==MACVLAN_MODE_VEPA ) -/* flood to everyone except source */ -macvlan_broadcast (skb, port, src->dev, -MACVLAN_MODE_VEPA | -MACVLAN_MODE_BRIDGE ); -else -/* -* flood only to VEPA ports, bridge ports -* already saw the frame on the way out. -*/ -macvlan_broadcast (skb, port, src->dev, -MACVLAN_MODE_VEPA ); - +macvlan_process_one (skb, port, src, true);rcu_read_unlock ();kfree_skb (skb);
@@ -429,6 +442,11 @@ static rx_handler_result_t macvlan_handle_frame(struct sk_buff **pskb) goto out; } +if (port->count <=100 ) { +macvlan_process_one (skb, port, src, false); +return RX_HANDLER_PASS ; + } +MACVLAN_SKB_CB (skb)->src = src;macvlan_broadcast_enqueue (port, skb);
@@ -479,7 +497,8 @@ static int macvlan_queue_xmit(struct sk_buff *skb, struct net_device *dev)/* send to other bridge ports directly */ if (is_multicast_ether_addr (eth->h_dest)) { -macvlan_broadcast (skb, port, dev,MACVLAN_MODE_BRIDGE ); +macvlan_broadcast (skb, port, dev, +MACVLAN_MODE_BRIDGE , true); goto xmit_world; }
Signature · 1 line
2.5.5
Quoted 7 lines · Lennert Buytenhek
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.
But we only queue up to 1000 packets in our backlog.
How about adding a quick check before cloning it?
drivers/net/macvlan.c +0 -0
@@ -315,6 +315,9 @@ static void macvlan_broadcast_enqueue(struct
macvlan_port *port,
struct sk_buff *nskb;
int err = -ENOMEM;+ if (skb_queue_len(&port->bc_queue) >= MACVLAN_BC_QUEUE_LEN)
+ return;
+
nskb = skb_clone(skb, GFP_ATOMIC);
if (!nskb)
goto err;Quoted 26 lines · Cong Wang
Quoted 7 lines
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.But we only queue up to 1000 packets in our backlog.
How about adding a quick check before cloning it?
drivers/net/macvlan.c +3
-0@@ -315,6 +315,9 @@ static void macvlan_broadcast_enqueue(structmacvlan_port *port, struct sk_buff *nskb;int err = -ENOMEM ; +if (skb_queue_len (&port->bc_queue) >=MACVLAN_BC_QUEUE_LEN ) +return ; + nskb =skb_clone (skb,GFP_ATOMIC );if (!nskb)
Quoted 1 line
goto err;
We're not hitting the bc_queue skb limit in our environment, as the machine can keep up with the traffic -- it's just that taking an extra clone of the skb and queueing and running the work queue item to free it again is eating up a lot of cycles.
But doing the queue length check before the clone might not be a bad idea? (You'd probably want to atomic_long_inc(&skb->dev->rx_dropped) before returning, though?)
cover macvlan: Avoid unnecessary multicast cloning
In reply to Lennert BuytenhekQuoted 7 lines · Lennert Buytenhek
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,
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
PATCH 1/2 macvlan: Fix potential use-after free for broadcasts
When we postpone a broadcast packet we save the source port in the skb if it is local. However, the source port can disappear before we get a chance to process the packet.
This patch fixes this by holding a ref count on the netdev.
It also delays the skb->cb modification until after we allocate the new skb as you should not modify shared skbs.
drivers/net/macvlan.c +8 -2
@@ -305,11 +305,14 @@ static void macvlan_process_broadcast(struct work_struct *w)rcu_read_unlock (); +if (src) +dev_put (src->dev);kfree_skb (skb); } }static void macvlan_broadcast_enqueue (struct macvlan_port *port, +const struct macvlan_dev *src,struct sk_buff *skb) {struct sk_buff *nskb;
@@ -319,8 +322,12 @@ static void macvlan_broadcast_enqueue(struct macvlan_port *port,if (!nskb) goto err; +MACVLAN_SKB_CB (nskb)->src = src; +spin_lock (&port->bc_queue.lock);if (skb_queue_len (&port->bc_queue) <MACVLAN_BC_QUEUE_LEN ) { +if (src) +dev_hold (src->dev);__skb_queue_tail (&port->bc_queue, nskb); err =0 ; }
@@ -429,8 +436,7 @@ static rx_handler_result_t macvlan_handle_frame(struct sk_buff **pskb) goto out; } -MACVLAN_SKB_CB (skb)->src = src; -macvlan_broadcast_enqueue (port, skb); +macvlan_broadcast_enqueue (port, src, skb);return RX_HANDLER_PASS ; }
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
PATCH 2/2 macvlan: Avoid unnecessary multicast cloning
In reply to Herbert XuCurrently we always queue a multicast packet for further processing, even if none of the macvlan devices are subscribed to the address.
This patch optimises this by adding a global multicast filter for a macvlan_port.
Note that this patch doesn't handle the broadcast addresses of the individual macvlan devices correctly, if they are not all identical. However, this is already broken because there is no mechanism in place to update the individual multicast filters when you change the broadcast address.
If someone cares enough they should fix this by collecting all broadcast addresses for a macvlan as we do for multicast and unicast.
drivers/net/macvlan.c +32 -3
@@ -49,6 +49,7 @@ struct macvlan_port {bool passthru;int count;struct hlist_head vlan_source_hash[MACVLAN_HASH_SIZE ]; +DECLARE_BITMAP (mc_filter,MACVLAN_MC_FILTER_SZ ); };struct macvlan_source_entry {
@@ -418,6 +419,8 @@ static rx_handler_result_t macvlan_handle_frame(struct sk_buff **pskb) port =macvlan_port_get_rcu (skb->dev);if (is_multicast_ether_addr (eth->h_dest)) { +unsigned int hash; + skb =ip_check_defrag (dev_net (skb->dev), skb,IP_DEFRAG_MACVLAN );if (!skb)return RX_HANDLER_CONSUMED ;
@@ -435,7 +438,9 @@ static rx_handler_result_t macvlan_handle_frame(struct sk_buff **pskb) goto out; } -macvlan_broadcast_enqueue (port, src, skb); + hash =mc_hash (NULL , eth->h_dest); +if (test_bit (hash, port->mc_filter)) +macvlan_broadcast_enqueue (port, src, skb);return RX_HANDLER_PASS ; }
@@ -725,6 +730,8 @@ static void macvlan_set_mac_lists(struct net_device *dev) {struct macvlan_dev *vlan =netdev_priv (dev); +dev_uc_sync (vlan->lowerdev, dev); +dev_mc_sync (vlan->lowerdev, dev);if (dev->flags & (IFF_PROMISC |IFF_ALLMULTI )) {bitmap_fill (vlan->mc_filter,MACVLAN_MC_FILTER_SZ ); }else {
@@ -739,9 +746,31 @@ static void macvlan_set_mac_lists(struct net_device *dev)__set_bit (mc_hash (vlan, dev->broadcast), filter);bitmap_copy (vlan->mc_filter, filter,MACVLAN_MC_FILTER_SZ ); + +/* This is slightly inaccurate as we're including +* the subscription list of vlan->lowerdev too. +*/ +bitmap_zero (filter,MACVLAN_MC_FILTER_SZ ); +netdev_for_each_mc_addr (ha, vlan->lowerdev) { +__set_bit (mc_hash (NULL , ha->addr), filter); + } + +/* Bug alert: This only works if everyone has the +* same broadcast address. As soon as someone +* changes theirs this will break. +* +* However, this is already broken as when you +* change your broadcast address we don't get +* called. +* +* The solution is to maintain a list of broadcast +* addresses like we do for uc/mc, if you care. +*/ +__set_bit (mc_hash (NULL , dev->broadcast), filter); + +bitmap_copy (vlan->port->mc_filter, filter, +MACVLAN_MC_FILTER_SZ ); } -dev_uc_sync (vlan->lowerdev, dev); -dev_mc_sync (vlan->lowerdev, dev); }static int macvlan_change_mtu (struct net_device *dev,int new_mtu)
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
David Miller
maintainerRe: [PATCH 2/2] macvlan: Avoid unnecessary multicast cloning
From: Herbert Xu <[email protected]>
Date: Mon, 30 May 2016 16:28:28 +0800
drivers/net/macvlan.c static void macvlan_set_mac_lists(struct net_device *dev) · line 737
Quoted 9 lines
drivers/net/macvlan.c +2
-0@@ -725,6 +730,8 @@ static void macvlan_set_mac_lists(struct net_device *dev) {struct macvlan_dev *vlan =netdev_priv (dev); +dev_uc_sync (vlan->lowerdev, dev); +dev_mc_sync (vlan->lowerdev, dev);if (dev->flags & (IFF_PROMISC |IFF_ALLMULTI )) {bitmap_fill (vlan->mc_filter,MACVLAN_MC_FILTER_SZ ); }else {
I think you need to set the vlan->port->mc_filter to all 1's in the PROMISC/ALLMUTI branch here.
Otherwise packets won't properly pass your new hash test.
v2 cover macvlan: Avoid unnecessary multicast cloning
Quoted 5 lines · David Miller
I think you need to set the
vlan->port->mc_filterto all 1's in the PROMISC/ALLMUTI branch here.Otherwise packets won't properly pass your new hash test.
Good point. Here's v2.
This patch tries to improve macvlan multicast performance 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.
v2 fixed a bug where promiscuous/allmulti settings weren't handled correctly.
Thanks,
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
PATCH v2 1/2 macvlan: Fix potential use-after free for broadcasts
When we postpone a broadcast packet we save the source port in the skb if it is local. However, the source port can disappear before we get a chance to process the packet.
This patch fixes this by holding a ref count on the netdev.
It also delays the skb->cb modification until after we allocate the new skb as you should not modify shared skbs.
drivers/net/macvlan.c +8 -2
@@ -305,11 +305,14 @@ static void macvlan_process_broadcast(struct work_struct *w)rcu_read_unlock (); +if (src) +dev_put (src->dev);kfree_skb (skb); } }static void macvlan_broadcast_enqueue (struct macvlan_port *port, +const struct macvlan_dev *src,struct sk_buff *skb) {struct sk_buff *nskb;
@@ -319,8 +322,12 @@ static void macvlan_broadcast_enqueue(struct macvlan_port *port,if (!nskb) goto err; +MACVLAN_SKB_CB (nskb)->src = src; +spin_lock (&port->bc_queue.lock);if (skb_queue_len (&port->bc_queue) <MACVLAN_BC_QUEUE_LEN ) { +if (src) +dev_hold (src->dev);__skb_queue_tail (&port->bc_queue, nskb); err =0 ; }
@@ -429,8 +436,7 @@ static rx_handler_result_t macvlan_handle_frame(struct sk_buff **pskb) goto out; } -MACVLAN_SKB_CB (skb)->src = src; -macvlan_broadcast_enqueue (port, skb); +macvlan_broadcast_enqueue (port, src, skb);return RX_HANDLER_PASS ; }
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Re: [v2 PATCH 1/2] macvlan: Fix potential use-after free for broadcasts
Quoted 4 lines · Herbert Xu
When we postpone a broadcast packet we save the source port in the skb if it is local. However, the source port can disappear before we get a chance to process the packet.
Hmm, why could this happen? The upper device should be linked with the lower device, where a refcount is already held. Also, the work is cancelled in ->uninit().
Re: [v2 PATCH 1/2] macvlan: Fix potential use-after free for broadcasts
Quoted 4 lines · Cong Wang
Hmm, why could this happen? The upper device should be linked with the lower device, where a refcount is already held. Also, the work is cancelled in ->uninit().
Of course it can happen. We are talking about the source macvlan device that we just looked up using the Ethernet address. That device has nothing to do with the packet now so it may be deleted at any time.
We do flush the work but only when the all macvlan devices on a port have been deleted. Perhaps you're confusing the source device with vlan->lowerdev which is confusingly the actual hardware device?
Cheers,
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Re: [v2 PATCH 1/2] macvlan: Fix potential use-after free for broadcasts
Quoted 11 lines · Herbert Xu
Quoted 4 lines · Cong Wang
Hmm, why could this happen? The upper device should be linked with the lower device, where a refcount is already held. Also, the work is cancelled in ->uninit().
Of course it can happen. We are talking about the source macvlan device that we just looked up using the Ethernet address. That device has nothing to do with the packet now so it may be deleted at any time.
Quoted 4 lines
We do flush the work but only when the all macvlan devices on a port have been deleted. Perhaps you're confusing the source device with
vlan->lowerdevwhich is confusingly the actual hardware device?
I thought all the on-flying packets are waited by synchronize_net() during the removal of any of these devices. But since you moved them to a workqueue, aka process context, so I think it won't work any more.
Your patch makes sense to me now. :)
Thanks!
PATCH v2 2/2 macvlan: Avoid unnecessary multicast cloning
In reply to Herbert XuCurrently we always queue a multicast packet for further processing, even if none of the macvlan devices are subscribed to the address.
This patch optimises this by adding a global multicast filter for a macvlan_port.
Note that this patch doesn't handle the broadcast addresses of the individual macvlan devices correctly, if they are not all identical to vlan->lowerdev. However, this is already broken because there is no mechanism in place to update the individual multicast filters when you change the broadcast address.
If someone cares enough they should fix this by collecting all broadcast addresses for a macvlan as we do for multicast and unicast.
drivers/net/macvlan.c +34 -6
@@ -49,6 +49,7 @@ struct macvlan_port {bool passthru;int count;struct hlist_head vlan_source_hash[MACVLAN_HASH_SIZE ]; +DECLARE_BITMAP (mc_filter,MACVLAN_MC_FILTER_SZ ); };struct macvlan_source_entry {
@@ -419,6 +420,8 @@ static rx_handler_result_t macvlan_handle_frame(struct sk_buff **pskb) port =macvlan_port_get_rcu (skb->dev);if (is_multicast_ether_addr (eth->h_dest)) { +unsigned int hash; + skb =ip_check_defrag (dev_net (skb->dev), skb,IP_DEFRAG_MACVLAN );if (!skb)return RX_HANDLER_CONSUMED ;
@@ -436,7 +439,9 @@ static rx_handler_result_t macvlan_handle_frame(struct sk_buff **pskb) goto out; } -macvlan_broadcast_enqueue (port, src, skb); + hash =mc_hash (NULL , eth->h_dest); +if (test_bit (hash, port->mc_filter)) +macvlan_broadcast_enqueue (port, src, skb);return RX_HANDLER_PASS ; }
@@ -722,12 +727,12 @@ static void macvlan_change_rx_flags(struct net_device *dev, int change) } } -static void macvlan_set_mac_lists (struct net_device *dev) +static void macvlan_compute_filter (unsigned long *mc_filter, +struct net_device *dev, +struct macvlan_dev *vlan) { -struct macvlan_dev *vlan =netdev_priv (dev); -if (dev->flags & (IFF_PROMISC |IFF_ALLMULTI )) { -bitmap_fill (vlan->mc_filter,MACVLAN_MC_FILTER_SZ ); +bitmap_fill (mc_filter,MACVLAN_MC_FILTER_SZ ); }else {struct netdev_hw_addr *ha;DECLARE_BITMAP (filter,MACVLAN_MC_FILTER_SZ );
@@ -739,10 +744,33 @@ static void macvlan_set_mac_lists(struct net_device *dev)__set_bit (mc_hash (vlan, dev->broadcast), filter); -bitmap_copy (vlan->mc_filter, filter,MACVLAN_MC_FILTER_SZ ); +bitmap_copy (mc_filter, filter,MACVLAN_MC_FILTER_SZ ); } +} + +static void macvlan_set_mac_lists (struct net_device *dev) +{ +struct macvlan_dev *vlan =netdev_priv (dev); + +macvlan_compute_filter (vlan->mc_filter, dev, vlan); +dev_uc_sync (vlan->lowerdev, dev);dev_mc_sync (vlan->lowerdev, dev); + +/* This is slightly inaccurate as we're including the subscription +* list of vlan->lowerdev too. +* +* Bug alert: This only works if everyone has the same broadcast +* address as lowerdev. As soon as someone changes theirs this +* will break. +* +* However, this is already broken as when you change your broadcast +* address we don't get called. +* +* The solution is to maintain a list of broadcast addresses like +* we do for uc/mc, if you care. +*/ +macvlan_compute_filter (vlan->port->mc_filter, vlan->lowerdev,NULL ); }static int macvlan_change_mtu (struct net_device *dev,int new_mtu)
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
David Miller
maintainerRe: [v2 PATCH 0/2] macvlan: Avoid unnecessary multicast cloning
In reply to Herbert XuFrom: Herbert Xu <[email protected]>
Date: Wed, 1 Jun 2016 11:42:18 +0800
Quoted 9 lines
This patch tries to improve macvlan multicast performance by maintaining a filter hash at the
macvlan_portlevel 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.
v2 fixed a bug where promiscuous/allmulti settings weren't handled correctly.
Series applied to net-next, thanks Herbert.
Re: [PATCH 0/2] macvlan: Avoid unnecessary multicast cloning
In reply to Herbert XuQuoted 10 lines · Herbert Xu
Quoted 7 lines
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?
That and stack switches to kworker threads and serialisation on the bc_queue queue lock.
Re: [PATCH 0/2] macvlan: Avoid unnecessary multicast cloning
Quoted 3 lines · Lennert Buytenhek
That and stack switches to kworker threads and serialisation on the
bc_queuequeue lock.
My patch should resolve these problems too since the packet is discarded if nobody is interested in it.
Cheers,
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
David Miller
maintainerRe: [PATCH 0/2] macvlan: Avoid unnecessary multicast cloning
From: Herbert Xu <[email protected]>
Date: Tue, 31 May 2016 08:49:45 +0800
Quoted 7 lines · Lennert Buytenhek
Quoted 3 lines
That and stack switches to kworker threads and serialisation on the
bc_queuequeue lock.My patch should resolve these problems too since the packet is discarded if nobody is interested in it.
+1