diff mbox

802.1q HW filter spammage in 3.7.2+ kernels.

Message ID 1358316108.19956.82.camel@edumazet-glaptop
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Eric Dumazet Jan. 16, 2013, 6:01 a.m. UTC
From: Eric Dumazet <edumazet@google.com>

On Tue, 2013-01-15 at 17:36 -0800, Ben Greear wrote:
> My kernel logs are full of this (I have 2000 macvlans).

Are you using 2000 macvlans on the same device ? Interesting...

I am wondering how multicast/broadcast messages don't generate a huge
load and packet drops, since we clone packets for every macvlan, and
queue then to netif_rx()

I guess you dont use IPv6 on these macvlans ?


While reviewing the code, I found this small bug.

[PATCH] macvlan: fix macvlan_get_size()

Signed-off-by: Eric Dumazet <edumazet@google.com>
---
 drivers/net/macvlan.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)





--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

David Miller Jan. 16, 2013, 6:11 a.m. UTC | #1
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 15 Jan 2013 22:01:48 -0800

> @@ -828,7 +828,12 @@ static int macvlan_changelink(struct net_device *dev,
>  
>  static size_t macvlan_get_size(const struct net_device *dev)
>  {
> -	return nla_total_size(4);
> +	return
> +		/* IFLA_MACVLAN_MODE, */
> +		nla_total_size(4) +
> +		/* IFLA_MACVLAN_FLAGS */
> +		nla_total_size(2) +
> +		0;


Maybe:

	return (nla_total_size(4) + /* IFLA_MACVLAN_MODE, */
		nla_total_size(2) + /* IFLA_MACVLAN_FLAGS */
		0);
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Ben Greear Jan. 16, 2013, 2:03 p.m. UTC | #2
On 01/15/2013 10:01 PM, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@google.com>
>
> On Tue, 2013-01-15 at 17:36 -0800, Ben Greear wrote:
>> My kernel logs are full of this (I have 2000 macvlans).
>
> Are you using 2000 macvlans on the same device ? Interesting...

Well, in this case, we have 1000 mac-vlans on each of 2 1G
Ethernet ports, but 2000 on a single device has been used
as well.

>
> I am wondering how multicast/broadcast messages don't generate a huge
> load and packet drops, since we clone packets for every macvlan, and
> queue then to netif_rx()
>

I have added ARP patches to do a random retry timer to help spread
out the ARP requests a bit, at least.  The system is still sluggish
at times, but it does function.  With a fixed-interval ARP timer, things
can get into very bad patterns.

http://patchwork.ozlabs.org/patch/9301/

My test cases often require SO_BINDTODEVICE to function with full features,
with one traffic-application per interface, so mac-vlans seems the easiest
way to scale.

> I guess you dont use IPv6 on these macvlans ?

I have...but many use cases use far fewer (virtual) interfaces.

Thanks,
Ben
diff mbox

Patch

diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index 1047e58..f4f2790 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -828,7 +828,12 @@  static int macvlan_changelink(struct net_device *dev,
 
 static size_t macvlan_get_size(const struct net_device *dev)
 {
-	return nla_total_size(4);
+	return
+		/* IFLA_MACVLAN_MODE, */
+		nla_total_size(4) +
+		/* IFLA_MACVLAN_FLAGS */
+		nla_total_size(2) +
+		0;
 }
 
 static int macvlan_fill_info(struct sk_buff *skb,