netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 802.1q HW filter spammage in 3.7.2+ kernels.
@ 2013-01-16  1:36 Ben Greear
  2013-01-16  6:01 ` Eric Dumazet
  0 siblings, 1 reply; 6+ messages in thread
From: Ben Greear @ 2013-01-16  1:36 UTC (permalink / raw)
  To: netdev

My kernel logs are full of this (I have 2000 macvlans).

Is this really worth logging?

8021q: adding VLAN 0 to HW filter on device eth3#364
8021q: adding VLAN 0 to HW filter on device eth3#384
8021q: adding VLAN 0 to HW filter on device eth3#434
8021q: adding VLAN 0 to HW filter on device eth3#304
8021q: adding VLAN 0 to HW filter on device eth3#242
8021q: adding VLAN 0 to HW filter on device eth3#312
8021q: adding VLAN 0 to HW filter on device eth3#512
8021q: adding VLAN 0 to HW filter on device eth2#481
8021q: adding VLAN 0 to HW filter on device eth3#262
8021q: adding VLAN 0 to HW filter on device eth3#282

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 802.1q HW filter spammage in 3.7.2+ kernels.
  2013-01-16  1:36 802.1q HW filter spammage in 3.7.2+ kernels Ben Greear
@ 2013-01-16  6:01 ` Eric Dumazet
  2013-01-16  6:11   ` David Miller
  2013-01-16 14:03   ` 802.1q HW filter spammage in 3.7.2+ kernels Ben Greear
  0 siblings, 2 replies; 6+ messages in thread
From: Eric Dumazet @ 2013-01-16  6:01 UTC (permalink / raw)
  To: Ben Greear, David Miller; +Cc: netdev

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(-)

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,

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: 802.1q HW filter spammage in 3.7.2+ kernels.
  2013-01-16  6:01 ` Eric Dumazet
@ 2013-01-16  6:11   ` David Miller
  2013-01-17 21:30     ` [PATCH] macvlan: fix macvlan_get_size() Eric Dumazet
  2013-01-16 14:03   ` 802.1q HW filter spammage in 3.7.2+ kernels Ben Greear
  1 sibling, 1 reply; 6+ messages in thread
From: David Miller @ 2013-01-16  6:11 UTC (permalink / raw)
  To: eric.dumazet; +Cc: greearb, netdev

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);

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 802.1q HW filter spammage in 3.7.2+ kernels.
  2013-01-16  6:01 ` Eric Dumazet
  2013-01-16  6:11   ` David Miller
@ 2013-01-16 14:03   ` Ben Greear
  1 sibling, 0 replies; 6+ messages in thread
From: Ben Greear @ 2013-01-16 14:03 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: David Miller, netdev

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

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] macvlan: fix macvlan_get_size()
  2013-01-16  6:11   ` David Miller
@ 2013-01-17 21:30     ` Eric Dumazet
  2013-01-17 21:41       ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Dumazet @ 2013-01-17 21:30 UTC (permalink / raw)
  To: David Miller; +Cc: greearb, netdev, John Fastabend

From: Eric Dumazet <edumazet@google.com>

commit df8ef8f3aaa (macvlan: add FDB bridge ops and macvlan flags)
forgot to update macvlan_get_size() after the addition of
IFLA_MACVLAN_FLAGS

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: John Fastabend <john.r.fastabend@intel.com>
---
 drivers/net/macvlan.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index 1047e58..7b44ebd 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -828,7 +828,10 @@ 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 (0
+		+ nla_total_size(4) /* IFLA_MACVLAN_MODE */
+		+ nla_total_size(2) /* IFLA_MACVLAN_FLAGS */
+		);
 }
 
 static int macvlan_fill_info(struct sk_buff *skb,

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] macvlan: fix macvlan_get_size()
  2013-01-17 21:30     ` [PATCH] macvlan: fix macvlan_get_size() Eric Dumazet
@ 2013-01-17 21:41       ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2013-01-17 21:41 UTC (permalink / raw)
  To: eric.dumazet; +Cc: greearb, netdev, john.r.fastabend

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 17 Jan 2013 13:30:49 -0800

> From: Eric Dumazet <edumazet@google.com>
> 
> commit df8ef8f3aaa (macvlan: add FDB bridge ops and macvlan flags)
> forgot to update macvlan_get_size() after the addition of
> IFLA_MACVLAN_FLAGS
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: John Fastabend <john.r.fastabend@intel.com>

Applied, thanks Eric.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-01-17 21:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-16  1:36 802.1q HW filter spammage in 3.7.2+ kernels Ben Greear
2013-01-16  6:01 ` Eric Dumazet
2013-01-16  6:11   ` David Miller
2013-01-17 21:30     ` [PATCH] macvlan: fix macvlan_get_size() Eric Dumazet
2013-01-17 21:41       ` David Miller
2013-01-16 14:03   ` 802.1q HW filter spammage in 3.7.2+ kernels Ben Greear

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).