2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-05-12 21:21:05 +02:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-08 04:11:17 +00:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
2013-02-05 20:22:50 +00:00
|
|
|
|
2014-04-17 13:45:59 +08:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2009-11-26 06:07:10 +00:00
|
|
|
|
2014-05-30 16:00:56 +08:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2014-09-25 16:31:08 +02:00
|
|
|
|
|
|
|
|
|
2014-09-17 10:08:08 +02:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2017-06-21 07:59:18 -04:00
|
|
|
|
2017-06-21 07:59:19 -04:00
|
|
|
|
2017-06-21 07:59:18 -04:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-17 13:45:59 +08:00
|
|
|
|
|
|
|
|
|
2017-06-21 07:59:18 -04:00
|
|
|
|
2014-08-14 14:32:49 -07:00
|
|
|
|
2014-09-25 16:31:08 +02:00
|
|
|
|
2016-06-01 11:45:44 +08:00
|
|
|
|
2017-06-21 07:59:19 -04:00
|
|
|
|
2014-09-25 16:31:08 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
2014-04-17 13:45:59 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-21 18:22:22 -07:00
|
|
|
|
|
|
|
|
|
2017-06-21 07:59:18 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-21 07:59:19 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-25 16:31:08 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-30 10:08:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-15 03:27:57 +00:00
|
|
|
|
|
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-25 16:31:08 +02:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2014-09-25 16:31:08 +02:00
|
|
|
|
net, drivers/net: Convert compare_ether_addr_64bits to ether_addr_equal_64bits
Use the new bool function ether_addr_equal_64bits to add
some clarity and reduce the likelihood for misuse of
compare_ether_addr_64bits for sorting.
Done via cocci script:
$ cat compare_ether_addr_64bits.cocci
@@
expression a,b;
@@
- !compare_ether_addr_64bits(a, b)
+ ether_addr_equal_64bits(a, b)
@@
expression a,b;
@@
- compare_ether_addr_64bits(a, b)
+ !ether_addr_equal_64bits(a, b)
@@
expression a,b;
@@
- !ether_addr_equal_64bits(a, b) == 0
+ ether_addr_equal_64bits(a, b)
@@
expression a,b;
@@
- !ether_addr_equal_64bits(a, b) != 0
+ !ether_addr_equal_64bits(a, b)
@@
expression a,b;
@@
- ether_addr_equal_64bits(a, b) == 0
+ !ether_addr_equal_64bits(a, b)
@@
expression a,b;
@@
- ether_addr_equal_64bits(a, b) != 0
+ ether_addr_equal_64bits(a, b)
@@
expression a,b;
@@
- !!ether_addr_equal_64bits(a, b)
+ ether_addr_equal_64bits(a, b)
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-09 17:04:04 +00:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-25 16:31:08 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-03-13 13:16:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-25 16:31:08 +02:00
|
|
|
|
2009-03-13 13:16:13 -07:00
|
|
|
|
2014-09-25 16:31:08 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-03-13 13:16:13 -07:00
|
|
|
|
|
|
|
|
|
2011-05-19 12:24:16 +00:00
|
|
|
|
2009-03-13 13:16:13 -07:00
|
|
|
|
|
|
|
|
|
2011-05-19 12:24:16 +00:00
|
|
|
|
|
|
|
|
|
2009-03-13 13:16:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-05-19 12:24:16 +00:00
|
|
|
|
2009-03-13 13:16:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-14 08:24:19 +08:00
|
|
|
|
|
|
|
|
|
2009-03-13 13:16:13 -07:00
|
|
|
|
2017-06-21 07:59:19 -04:00
|
|
|
|
2009-03-13 13:16:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-21 07:59:19 -04:00
|
|
|
|
2017-06-21 07:59:17 -04:00
|
|
|
|
2016-11-14 08:24:19 +08:00
|
|
|
|
2009-03-13 13:16:13 -07:00
|
|
|
|
|
|
|
|
|
2016-11-14 08:24:19 +08:00
|
|
|
|
2009-03-13 13:16:13 -07:00
|
|
|
|
2016-11-14 08:24:19 +08:00
|
|
|
|
2009-03-13 13:16:13 -07:00
|
|
|
|
|
|
|
|
|
2009-11-26 06:07:09 +00:00
|
|
|
|
2010-01-30 12:23:40 +00:00
|
|
|
|
|
|
|
|
|
2009-11-26 06:07:10 +00:00
|
|
|
|
2009-11-26 06:07:09 +00:00
|
|
|
|
2010-01-30 12:23:40 +00:00
|
|
|
|
2009-11-26 06:07:09 +00:00
|
|
|
|
2009-11-26 06:07:10 +00:00
|
|
|
|
2014-04-17 13:45:59 +08:00
|
|
|
|
2009-11-26 06:07:10 +00:00
|
|
|
|
2009-11-26 06:07:09 +00:00
|
|
|
|
net, drivers/net: Convert compare_ether_addr_64bits to ether_addr_equal_64bits
Use the new bool function ether_addr_equal_64bits to add
some clarity and reduce the likelihood for misuse of
compare_ether_addr_64bits for sorting.
Done via cocci script:
$ cat compare_ether_addr_64bits.cocci
@@
expression a,b;
@@
- !compare_ether_addr_64bits(a, b)
+ ether_addr_equal_64bits(a, b)
@@
expression a,b;
@@
- compare_ether_addr_64bits(a, b)
+ !ether_addr_equal_64bits(a, b)
@@
expression a,b;
@@
- !ether_addr_equal_64bits(a, b) == 0
+ ether_addr_equal_64bits(a, b)
@@
expression a,b;
@@
- !ether_addr_equal_64bits(a, b) != 0
+ !ether_addr_equal_64bits(a, b)
@@
expression a,b;
@@
- ether_addr_equal_64bits(a, b) == 0
+ !ether_addr_equal_64bits(a, b)
@@
expression a,b;
@@
- ether_addr_equal_64bits(a, b) != 0
+ ether_addr_equal_64bits(a, b)
@@
expression a,b;
@@
- !!ether_addr_equal_64bits(a, b)
+ ether_addr_equal_64bits(a, b)
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-09 17:04:04 +00:00
|
|
|
|
2009-11-26 06:07:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-17 13:45:59 +08:00
|
|
|
|
2009-11-26 06:07:09 +00:00
|
|
|
|
|
|
|
|
|
2013-02-07 16:41:02 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-05 20:22:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-07 16:41:02 +00:00
|
|
|
|
2013-02-05 20:22:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2009-11-26 06:07:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-26 06:07:09 +00:00
|
|
|
|
2013-02-07 16:41:02 +00:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2008-11-26 15:30:48 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
hlist: drop the node parameter from iterators
I'm not sure why, but the hlist for each entry iterators were conceived
list_for_each_entry(pos, head, member)
The hlist ones were greedy and wanted an extra parameter:
hlist_for_each_entry(tpos, pos, head, member)
Why did they need an extra pos parameter? I'm not quite sure. Not only
they don't really need it, it also prevents the iterator from looking
exactly like the list iterator, which is unfortunate.
Besides the semantic patch, there was some manual work required:
- Fix up the actual hlist iterators in linux/list.h
- Fix up the declaration of other iterators based on the hlist ones.
- A very small amount of places were using the 'node' parameter, this
was modified to use 'obj->member' instead.
- Coccinelle didn't handle the hlist_for_each_entry_safe iterator
properly, so those had to be fixed up manually.
The semantic patch which is mostly the work of Peter Senna Tschudin is here:
@@
iterator name hlist_for_each_entry, hlist_for_each_entry_continue, hlist_for_each_entry_from, hlist_for_each_entry_rcu, hlist_for_each_entry_rcu_bh, hlist_for_each_entry_continue_rcu_bh, for_each_busy_worker, ax25_uid_for_each, ax25_for_each, inet_bind_bucket_for_each, sctp_for_each_hentry, sk_for_each, sk_for_each_rcu, sk_for_each_from, sk_for_each_safe, sk_for_each_bound, hlist_for_each_entry_safe, hlist_for_each_entry_continue_rcu, nr_neigh_for_each, nr_neigh_for_each_safe, nr_node_for_each, nr_node_for_each_safe, for_each_gfn_indirect_valid_sp, for_each_gfn_sp, for_each_host;
type T;
expression a,c,d,e;
identifier b;
statement S;
@@
-T b;
<+... when != b
(
hlist_for_each_entry(a,
- b,
c, d) S
|
hlist_for_each_entry_continue(a,
- b,
c) S
|
hlist_for_each_entry_from(a,
- b,
c) S
|
hlist_for_each_entry_rcu(a,
- b,
c, d) S
|
hlist_for_each_entry_rcu_bh(a,
- b,
c, d) S
|
hlist_for_each_entry_continue_rcu_bh(a,
- b,
c) S
|
for_each_busy_worker(a, c,
- b,
d) S
|
ax25_uid_for_each(a,
- b,
c) S
|
ax25_for_each(a,
- b,
c) S
|
inet_bind_bucket_for_each(a,
- b,
c) S
|
sctp_for_each_hentry(a,
- b,
c) S
|
sk_for_each(a,
- b,
c) S
|
sk_for_each_rcu(a,
- b,
c) S
|
sk_for_each_from
-(a, b)
+(a)
S
+ sk_for_each_from(a) S
|
sk_for_each_safe(a,
- b,
c, d) S
|
sk_for_each_bound(a,
- b,
c) S
|
hlist_for_each_entry_safe(a,
- b,
c, d, e) S
|
hlist_for_each_entry_continue_rcu(a,
- b,
c) S
|
nr_neigh_for_each(a,
- b,
c) S
|
nr_neigh_for_each_safe(a,
- b,
c, d) S
|
nr_node_for_each(a,
- b,
c) S
|
nr_node_for_each_safe(a,
- b,
c, d) S
|
- for_each_gfn_sp(a, c, d, b) S
+ for_each_gfn_sp(a, c, d) S
|
- for_each_gfn_indirect_valid_sp(a, c, d, b) S
+ for_each_gfn_indirect_valid_sp(a, c, d) S
|
for_each_host(a,
- b,
c) S
|
for_each_host_safe(a,
- b,
c, d) S
|
for_each_mesh_entry(a,
- b,
c, d) S
)
...+>
[akpm@linux-foundation.org: drop bogus change from net/ipv4/raw.c]
[akpm@linux-foundation.org: drop bogus hunk from net/ipv6/raw.c]
[akpm@linux-foundation.org: checkpatch fixes]
[akpm@linux-foundation.org: fix warnings]
[akpm@linux-foudnation.org: redo intrusive kvm changes]
Tested-by: Peter Senna Tschudin <peter.senna@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-27 17:06:00 -08:00
|
|
|
|
2009-11-26 06:07:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-07 16:41:02 +00:00
|
|
|
|
2013-02-05 20:22:50 +00:00
|
|
|
|
|
|
|
|
|
2013-09-07 12:27:11 +10:00
|
|
|
|
|
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2013-09-07 12:27:11 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-17 13:45:59 +08:00
|
|
|
|
|
|
|
|
|
2009-11-26 06:07:09 +00:00
|
|
|
|
2014-10-10 03:13:27 +00:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-17 13:45:59 +08:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2014-04-17 13:45:59 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-10-22 19:43:46 -07:00
|
|
|
|
2014-04-17 13:45:59 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2009-11-26 06:07:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-10-28 13:10:50 +00:00
|
|
|
|
2009-11-26 06:07:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-17 13:45:59 +08:00
|
|
|
|
2009-11-26 06:07:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-17 13:45:59 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-01 11:43:00 +08:00
|
|
|
|
|
|
|
|
|
2014-04-17 13:45:59 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-01 11:43:00 +08:00
|
|
|
|
2014-04-17 13:45:59 +08:00
|
|
|
|
|
|
|
|
|
2014-04-22 17:15:34 +08:00
|
|
|
|
2014-04-17 13:45:59 +08:00
|
|
|
|
|
|
|
|
|
2014-04-22 17:15:34 +08:00
|
|
|
|
|
|
|
|
|
2014-04-17 13:45:59 +08:00
|
|
|
|
|
|
|
|
|
2016-06-01 11:43:00 +08:00
|
|
|
|
|
|
|
|
|
2014-04-17 13:45:59 +08:00
|
|
|
|
2014-09-17 10:08:08 +02:00
|
|
|
|
2016-06-01 11:43:00 +08:00
|
|
|
|
|
|
|
|
|
2014-04-22 17:15:34 +08:00
|
|
|
|
2014-04-17 13:45:59 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-22 17:15:34 +08:00
|
|
|
|
2014-04-17 13:45:59 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-22 17:15:34 +08:00
|
|
|
|
|
|
|
|
|
2014-04-17 13:45:59 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-25 16:31:08 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-10-13 13:40:31 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-25 16:31:08 +02:00
|
|
|
|
|
|
|
|
|
2014-10-10 03:13:27 +00:00
|
|
|
|
2014-09-25 16:31:08 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-21 08:26:38 +08:00
|
|
|
|
2014-09-25 16:31:08 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-17 13:45:59 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
macvlan: optimize the receive path
The netif_rx() call on the fast path of macvlan_handle_frame() appears to
be there to ensure that we properly throttle incoming packets. However, it
would appear as though the proper throttling is already in place for all
possible ingress paths, and that the call is redundant. If packets are arriving
from the physical NIC, we've already throttled them by this point. Otherwise,
if they are coming via macvlan_queue_xmit(), it calls either
'dev_forward_skb()', which ends up calling netif_rx_internal(), or else in
the broadcast case, we are throttling via macvlan_broadcast_enqueue().
The test results below are from off the box to an lxc instance running macvlan.
Once the tranactions/sec stop increasing, the cpu idle time has gone to 0.
Results are from a quad core Intel E3-1270 V2@3.50GHz box with bnx2x 10G card.
for i in {10,100,200,300,400,500};
do super_netperf $i -H $ip -t TCP_RR; done
Average of 5 runs.
trans/sec trans/sec
(3.17-rc7-net-next) (3.17-rc7-net-next + this patch)
---------- ----------
208101 211534 (+1.6%)
839493 850162 (+1.3%)
845071 844053 (-.12%)
816330 819623 (+.4%)
778700 789938 (+1.4%)
735984 754408 (+2.5%)
Signed-off-by: Jason Baron <jbaron@akamai.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-10-10 03:13:31 +00:00
|
|
|
|
|
|
|
|
|
2014-04-17 13:45:59 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-01 11:45:44 +08:00
|
|
|
|
|
|
|
|
|
2015-10-09 13:44:54 -05:00
|
|
|
|
2014-04-17 13:45:59 +08:00
|
|
|
|
|
|
|
|
|
2015-11-16 22:54:20 +01:00
|
|
|
|
2014-04-17 13:45:59 +08:00
|
|
|
|
2014-09-25 16:31:08 +02:00
|
|
|
|
2014-04-17 13:45:59 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-11-02 12:11:53 +00:00
|
|
|
|
|
|
|
|
|
2014-04-17 13:45:59 +08:00
|
|
|
|
|
|
|
|
|
macvlan: optimize the receive path
The netif_rx() call on the fast path of macvlan_handle_frame() appears to
be there to ensure that we properly throttle incoming packets. However, it
would appear as though the proper throttling is already in place for all
possible ingress paths, and that the call is redundant. If packets are arriving
from the physical NIC, we've already throttled them by this point. Otherwise,
if they are coming via macvlan_queue_xmit(), it calls either
'dev_forward_skb()', which ends up calling netif_rx_internal(), or else in
the broadcast case, we are throttling via macvlan_broadcast_enqueue().
The test results below are from off the box to an lxc instance running macvlan.
Once the tranactions/sec stop increasing, the cpu idle time has gone to 0.
Results are from a quad core Intel E3-1270 V2@3.50GHz box with bnx2x 10G card.
for i in {10,100,200,300,400,500};
do super_netperf $i -H $ip -t TCP_RR; done
Average of 5 runs.
trans/sec trans/sec
(3.17-rc7-net-next) (3.17-rc7-net-next + this patch)
---------- ----------
208101 211534 (+1.6%)
839493 850162 (+1.3%)
845071 844053 (-.12%)
816330 819623 (+.4%)
778700 789938 (+1.4%)
735984 754408 (+2.5%)
Signed-off-by: Jason Baron <jbaron@akamai.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-10-10 03:13:31 +00:00
|
|
|
|
2011-11-02 12:11:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-01 11:45:44 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-17 13:45:59 +08:00
|
|
|
|
2011-03-12 03:14:39 +00:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
2014-09-25 16:31:08 +02:00
|
|
|
|
2017-06-21 07:59:18 -04:00
|
|
|
|
2013-05-09 04:23:40 +00:00
|
|
|
|
|
|
|
|
|
2010-10-28 13:10:50 +00:00
|
|
|
|
|
|
|
|
|
2017-10-13 13:40:24 -07:00
|
|
|
|
2011-03-12 03:14:39 +00:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-12 03:14:39 +00:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2009-11-26 06:07:09 +00:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
macvlan: optimize the receive path
The netif_rx() call on the fast path of macvlan_handle_frame() appears to
be there to ensure that we properly throttle incoming packets. However, it
would appear as though the proper throttling is already in place for all
possible ingress paths, and that the call is redundant. If packets are arriving
from the physical NIC, we've already throttled them by this point. Otherwise,
if they are coming via macvlan_queue_xmit(), it calls either
'dev_forward_skb()', which ends up calling netif_rx_internal(), or else in
the broadcast case, we are throttling via macvlan_broadcast_enqueue().
The test results below are from off the box to an lxc instance running macvlan.
Once the tranactions/sec stop increasing, the cpu idle time has gone to 0.
Results are from a quad core Intel E3-1270 V2@3.50GHz box with bnx2x 10G card.
for i in {10,100,200,300,400,500};
do super_netperf $i -H $ip -t TCP_RR; done
Average of 5 runs.
trans/sec trans/sec
(3.17-rc7-net-next) (3.17-rc7-net-next + this patch)
---------- ----------
208101 211534 (+1.6%)
839493 850162 (+1.3%)
845071 844053 (-.12%)
816330 819623 (+.4%)
778700 789938 (+1.4%)
735984 754408 (+2.5%)
Signed-off-by: Jason Baron <jbaron@akamai.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-10-10 03:13:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-07-27 09:10:07 +00:00
|
|
|
|
macvlan: optimize the receive path
The netif_rx() call on the fast path of macvlan_handle_frame() appears to
be there to ensure that we properly throttle incoming packets. However, it
would appear as though the proper throttling is already in place for all
possible ingress paths, and that the call is redundant. If packets are arriving
from the physical NIC, we've already throttled them by this point. Otherwise,
if they are coming via macvlan_queue_xmit(), it calls either
'dev_forward_skb()', which ends up calling netif_rx_internal(), or else in
the broadcast case, we are throttling via macvlan_broadcast_enqueue().
The test results below are from off the box to an lxc instance running macvlan.
Once the tranactions/sec stop increasing, the cpu idle time has gone to 0.
Results are from a quad core Intel E3-1270 V2@3.50GHz box with bnx2x 10G card.
for i in {10,100,200,300,400,500};
do super_netperf $i -H $ip -t TCP_RR; done
Average of 5 runs.
trans/sec trans/sec
(3.17-rc7-net-next) (3.17-rc7-net-next + this patch)
---------- ----------
208101 211534 (+1.6%)
839493 850162 (+1.3%)
845071 844053 (-.12%)
816330 819623 (+.4%)
778700 789938 (+1.4%)
735984 754408 (+2.5%)
Signed-off-by: Jason Baron <jbaron@akamai.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-10-10 03:13:31 +00:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2015-11-16 22:54:20 +01:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
macvlan: optimize the receive path
The netif_rx() call on the fast path of macvlan_handle_frame() appears to
be there to ensure that we properly throttle incoming packets. However, it
would appear as though the proper throttling is already in place for all
possible ingress paths, and that the call is redundant. If packets are arriving
from the physical NIC, we've already throttled them by this point. Otherwise,
if they are coming via macvlan_queue_xmit(), it calls either
'dev_forward_skb()', which ends up calling netif_rx_internal(), or else in
the broadcast case, we are throttling via macvlan_broadcast_enqueue().
The test results below are from off the box to an lxc instance running macvlan.
Once the tranactions/sec stop increasing, the cpu idle time has gone to 0.
Results are from a quad core Intel E3-1270 V2@3.50GHz box with bnx2x 10G card.
for i in {10,100,200,300,400,500};
do super_netperf $i -H $ip -t TCP_RR; done
Average of 5 runs.
trans/sec trans/sec
(3.17-rc7-net-next) (3.17-rc7-net-next + this patch)
---------- ----------
208101 211534 (+1.6%)
839493 850162 (+1.3%)
845071 844053 (-.12%)
816330 819623 (+.4%)
778700 789938 (+1.4%)
735984 754408 (+2.5%)
Signed-off-by: Jason Baron <jbaron@akamai.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-10-10 03:13:31 +00:00
|
|
|
|
|
|
|
|
|
2010-07-27 09:10:07 +00:00
|
|
|
|
2014-10-10 03:13:27 +00:00
|
|
|
|
macvlan: optimize the receive path
The netif_rx() call on the fast path of macvlan_handle_frame() appears to
be there to ensure that we properly throttle incoming packets. However, it
would appear as though the proper throttling is already in place for all
possible ingress paths, and that the call is redundant. If packets are arriving
from the physical NIC, we've already throttled them by this point. Otherwise,
if they are coming via macvlan_queue_xmit(), it calls either
'dev_forward_skb()', which ends up calling netif_rx_internal(), or else in
the broadcast case, we are throttling via macvlan_broadcast_enqueue().
The test results below are from off the box to an lxc instance running macvlan.
Once the tranactions/sec stop increasing, the cpu idle time has gone to 0.
Results are from a quad core Intel E3-1270 V2@3.50GHz box with bnx2x 10G card.
for i in {10,100,200,300,400,500};
do super_netperf $i -H $ip -t TCP_RR; done
Average of 5 runs.
trans/sec trans/sec
(3.17-rc7-net-next) (3.17-rc7-net-next + this patch)
---------- ----------
208101 211534 (+1.6%)
839493 850162 (+1.3%)
845071 844053 (-.12%)
816330 819623 (+.4%)
778700 789938 (+1.4%)
735984 754408 (+2.5%)
Signed-off-by: Jason Baron <jbaron@akamai.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-10-10 03:13:31 +00:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
2009-11-26 06:07:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-05-19 02:53:20 +00:00
|
|
|
|
2011-09-18 12:53:20 +00:00
|
|
|
|
2009-11-26 06:07:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-10 23:03:34 -04:00
|
|
|
|
2009-11-26 06:07:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-05-30 16:00:56 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-27 12:06:46 -08:00
|
|
|
|
|
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-05-30 16:00:56 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2013-11-06 09:54:46 -08:00
|
|
|
|
|
|
|
|
|
2014-01-10 16:18:26 +08:00
|
|
|
|
2013-11-06 09:54:46 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-05-10 04:51:02 +00:00
|
|
|
|
2014-01-04 14:22:34 +08:00
|
|
|
|
2009-09-03 00:11:45 +00:00
|
|
|
|
2010-11-10 21:14:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-10 06:14:24 +00:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-10-09 01:40:57 -07:00
|
|
|
|
|
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-10-09 01:36:32 -07:00
|
|
|
|
|
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
2007-10-09 01:40:57 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-21 07:59:18 -04:00
|
|
|
|
2013-08-01 13:50:10 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-10-28 13:10:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-10-16 22:44:44 -04:00
|
|
|
|
2013-11-06 09:54:46 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-01-10 16:18:26 +08:00
|
|
|
|
2013-11-06 09:54:46 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-03-13 13:16:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-04-01 21:22:09 +00:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2008-07-14 20:57:07 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-10-28 13:10:50 +00:00
|
|
|
|
2015-05-01 17:36:37 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-10-28 13:10:50 +00:00
|
|
|
|
2009-03-13 13:16:13 -07:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2008-07-14 20:57:07 -07:00
|
|
|
|
2015-05-01 17:36:37 -04:00
|
|
|
|
2016-11-22 09:54:36 +08:00
|
|
|
|
|
|
|
|
|
2008-07-14 20:57:07 -07:00
|
|
|
|
2010-04-01 21:22:09 +00:00
|
|
|
|
2008-07-14 20:57:07 -07:00
|
|
|
|
2013-11-06 09:54:46 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-14 20:57:07 -07:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-11-06 09:54:46 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-15 06:44:37 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-21 07:59:18 -04:00
|
|
|
|
2012-04-15 06:44:37 +00:00
|
|
|
|
|
|
|
|
|
2010-10-28 13:10:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-01 17:36:37 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-04-01 21:22:09 +00:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2010-10-28 13:10:50 +00:00
|
|
|
|
2011-05-19 12:24:16 +00:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-05-30 14:32:49 +08:00
|
|
|
|
2007-11-19 22:00:42 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-21 07:59:19 -04:00
|
|
|
|
2007-11-19 22:00:42 -08:00
|
|
|
|
|
|
|
|
|
2009-03-13 13:16:13 -07:00
|
|
|
|
|
|
|
|
|
2014-05-30 14:32:49 +08:00
|
|
|
|
2009-03-13 13:16:13 -07:00
|
|
|
|
|
|
|
|
|
2014-05-30 14:32:49 +08:00
|
|
|
|
2009-03-13 13:16:13 -07:00
|
|
|
|
2007-11-19 22:00:42 -08:00
|
|
|
|
2017-06-21 07:59:19 -04:00
|
|
|
|
2014-05-30 14:32:49 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-11-19 22:00:42 -08:00
|
|
|
|
2014-05-30 14:32:49 +08:00
|
|
|
|
|
|
|
|
|
2009-03-13 13:16:13 -07:00
|
|
|
|
2014-05-30 14:32:49 +08:00
|
|
|
|
2009-03-13 13:16:13 -07:00
|
|
|
|
2017-06-21 07:59:19 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-11-19 22:00:42 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-05-30 14:32:49 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-21 07:59:16 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-05-30 14:32:49 +08:00
|
|
|
|
2017-06-21 07:59:19 -04:00
|
|
|
|
2017-06-13 22:45:11 +08:00
|
|
|
|
2014-05-30 14:32:49 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-05-08 11:15:37 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-01 17:36:37 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-05-08 11:15:37 +02:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
2016-06-01 11:45:44 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2013-02-05 20:22:50 +00:00
|
|
|
|
2016-06-01 11:45:44 +08:00
|
|
|
|
2013-02-05 20:22:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-07 16:41:02 +00:00
|
|
|
|
2013-02-05 20:22:50 +00:00
|
|
|
|
2013-02-07 16:02:57 +00:00
|
|
|
|
2013-02-07 16:41:02 +00:00
|
|
|
|
2013-02-07 16:02:57 +00:00
|
|
|
|
2016-06-01 11:45:44 +08:00
|
|
|
|
2013-02-05 20:22:50 +00:00
|
|
|
|
2016-06-01 11:45:44 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-15 06:44:37 +00:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2016-06-01 11:45:44 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
net: use core MTU range checking in core net infra
geneve:
- Merge __geneve_change_mtu back into geneve_change_mtu, set max_mtu
- This one isn't quite as straight-forward as others, could use some
closer inspection and testing
macvlan:
- set min/max_mtu
tun:
- set min/max_mtu, remove tun_net_change_mtu
vxlan:
- Merge __vxlan_change_mtu back into vxlan_change_mtu
- Set max_mtu to IP_MAX_MTU and retain dynamic MTU range checks in
change_mtu function
- This one is also not as straight-forward and could use closer inspection
and testing from vxlan folks
bridge:
- set max_mtu of IP_MAX_MTU and retain dynamic MTU range checks in
change_mtu function
openvswitch:
- set min/max_mtu, remove internal_dev_change_mtu
- note: max_mtu wasn't checked previously, it's been set to 65535, which
is the largest possible size supported
sch_teql:
- set min/max_mtu (note: max_mtu previously unchecked, used max of 65535)
macsec:
- min_mtu = 0, max_mtu = 65535
macvlan:
- min_mtu = 0, max_mtu = 65535
ntb_netdev:
- min_mtu = 0, max_mtu = 65535
veth:
- min_mtu = 68, max_mtu = 65535
8021q:
- min_mtu = 0, max_mtu = 65535
CC: netdev@vger.kernel.org
CC: Nicolas Dichtel <nicolas.dichtel@6wind.com>
CC: Hannes Frederic Sowa <hannes@stressinduktion.org>
CC: Tom Herbert <tom@herbertland.com>
CC: Daniel Borkmann <daniel@iogearbox.net>
CC: Alexander Duyck <alexander.h.duyck@intel.com>
CC: Paolo Abeni <pabeni@redhat.com>
CC: Jiri Benc <jbenc@redhat.com>
CC: WANG Cong <xiyou.wangcong@gmail.com>
CC: Roopa Prabhu <roopa@cumulusnetworks.com>
CC: Pravin B Shelar <pshelar@ovn.org>
CC: Sabrina Dubroca <sd@queasysnail.net>
CC: Patrick McHardy <kaber@trash.net>
CC: Stephen Hemminger <stephen@networkplumber.org>
CC: Pravin Shelar <pshelar@nicira.com>
CC: Maxim Krasnyansky <maxk@qti.qualcomm.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-10-20 13:55:20 -04:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-22 14:16:42 -07:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2017-05-11 11:09:52 -04:00
|
|
|
|
|
|
|
|
|
2017-08-16 14:34:46 -07:00
|
|
|
|
2014-03-03 15:33:53 -05:00
|
|
|
|
2017-05-11 11:09:52 -04:00
|
|
|
|
|
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2015-12-14 11:19:43 -08:00
|
|
|
|
2017-07-03 06:33:08 -07:00
|
|
|
|
2011-06-06 04:27:16 +00:00
|
|
|
|
2013-04-19 02:04:32 +00:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-05-16 17:04:56 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-08 23:13:53 -07:00
|
|
|
|
|
|
|
|
|
2016-06-09 07:45:14 -07:00
|
|
|
|
2014-05-16 17:04:56 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-08 23:13:53 -07:00
|
|
|
|
|
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-23 15:03:32 -07:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-03-03 15:33:53 -05:00
|
|
|
|
2014-12-05 17:05:49 +01:00
|
|
|
|
2014-07-31 10:30:25 -04:00
|
|
|
|
2017-05-11 11:09:52 -04:00
|
|
|
|
2017-08-16 14:34:46 -07:00
|
|
|
|
2009-11-23 14:18:53 -08:00
|
|
|
|
2016-03-16 21:59:49 -07:00
|
|
|
|
2009-06-10 09:55:02 +00:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2008-07-08 23:13:53 -07:00
|
|
|
|
|
|
|
|
|
2014-02-13 11:46:28 -08:00
|
|
|
|
2010-11-10 21:14:04 +00:00
|
|
|
|
2009-11-17 08:53:49 +00:00
|
|
|
|
|
|
|
|
|
2016-04-23 15:03:32 -07:00
|
|
|
|
|
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-17 08:53:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-21 18:22:22 -07:00
|
|
|
|
2009-11-17 08:53:49 +00:00
|
|
|
|
2010-11-10 21:14:04 +00:00
|
|
|
|
2011-03-21 18:22:22 -07:00
|
|
|
|
2014-09-25 16:31:08 +02:00
|
|
|
|
2014-08-14 14:32:49 -07:00
|
|
|
|
|
|
|
|
|
2011-03-21 18:22:22 -07:00
|
|
|
|
2009-11-17 08:53:49 +00:00
|
|
|
|
|
|
|
|
|
2017-01-06 19:12:52 -08:00
|
|
|
|
|
|
|
|
|
2009-11-17 08:53:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-11-10 21:14:04 +00:00
|
|
|
|
2014-01-04 14:22:34 +08:00
|
|
|
|
2010-11-10 21:14:04 +00:00
|
|
|
|
|
|
|
|
|
2010-06-24 00:54:21 +00:00
|
|
|
|
2009-11-17 08:53:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-11-10 21:14:04 +00:00
|
|
|
|
2010-06-24 00:54:21 +00:00
|
|
|
|
2014-03-13 21:26:42 -07:00
|
|
|
|
2010-06-24 00:54:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-11-10 21:14:04 +00:00
|
|
|
|
|
|
|
|
|
2014-03-13 21:26:42 -07:00
|
|
|
|
2010-11-10 21:14:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-17 08:53:49 +00:00
|
|
|
|
2010-11-10 21:14:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-17 08:53:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-08 19:52:37 -05:00
|
|
|
|
2013-04-19 02:04:28 +00:00
|
|
|
|
2011-06-06 04:27:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-19 02:04:28 +00:00
|
|
|
|
2011-06-06 04:27:16 +00:00
|
|
|
|
|
|
|
|
|
2011-12-08 19:52:37 -05:00
|
|
|
|
2013-04-19 02:04:28 +00:00
|
|
|
|
2011-06-06 04:27:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-19 02:04:28 +00:00
|
|
|
|
2011-12-08 19:52:37 -05:00
|
|
|
|
2011-06-06 04:27:16 +00:00
|
|
|
|
|
|
|
|
|
2012-10-01 12:32:33 +00:00
|
|
|
|
2012-04-15 06:44:37 +00:00
|
|
|
|
2014-11-28 14:34:15 +01:00
|
|
|
|
2012-04-15 06:44:37 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-08-15 13:04:59 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-21 07:59:18 -04:00
|
|
|
|
2012-04-15 06:44:37 +00:00
|
|
|
|
|
|
|
|
|
2013-07-19 17:20:08 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-15 06:44:37 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-13 12:00:18 +00:00
|
|
|
|
2012-04-15 06:44:37 +00:00
|
|
|
|
2014-11-28 14:34:15 +01:00
|
|
|
|
2012-04-15 06:44:37 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-08-15 13:04:59 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-21 07:59:18 -04:00
|
|
|
|
2012-04-15 06:44:37 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-06 00:44:26 +00:00
|
|
|
|
|
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
2016-02-24 10:58:04 -08:00
|
|
|
|
|
|
|
|
|
2008-10-29 15:31:53 -07:00
|
|
|
|
|
|
|
|
|
2011-09-03 03:34:30 +00:00
|
|
|
|
2016-02-24 10:58:04 -08:00
|
|
|
|
2008-10-29 15:31:53 -07:00
|
|
|
|
|
|
|
|
|
2013-06-25 16:04:21 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-05 17:05:49 +01:00
|
|
|
|
2013-12-26 12:17:00 +01:00
|
|
|
|
2013-06-25 16:04:21 -04:00
|
|
|
|
2013-12-26 12:17:00 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-05 17:05:49 +01:00
|
|
|
|
|
|
|
|
|
2014-03-03 15:33:53 -05:00
|
|
|
|
2014-09-17 10:40:44 -07:00
|
|
|
|
2013-12-26 12:17:00 +01:00
|
|
|
|
|
|
|
|
|
2013-06-25 16:04:21 -04:00
|
|
|
|
|
|
|
|
|
2014-05-30 16:00:56 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-02 17:07:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
2016-02-24 10:58:04 -08:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-11-19 21:51:06 -08:00
|
|
|
|
|
|
|
|
|
2009-11-17 08:53:49 +00:00
|
|
|
|
2008-11-19 21:51:06 -08:00
|
|
|
|
|
|
|
|
|
2008-11-20 20:14:53 -08:00
|
|
|
|
2008-11-19 21:51:06 -08:00
|
|
|
|
2013-06-25 16:04:21 -04:00
|
|
|
|
2008-11-19 21:51:06 -08:00
|
|
|
|
|
|
|
|
|
2012-04-15 06:44:37 +00:00
|
|
|
|
2010-06-24 00:54:21 +00:00
|
|
|
|
2008-11-19 21:51:06 -08:00
|
|
|
|
2011-06-06 04:27:16 +00:00
|
|
|
|
|
|
|
|
|
2012-04-15 06:44:37 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-05-16 17:04:56 -04:00
|
|
|
|
2014-05-30 16:00:56 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-02 17:07:05 +02:00
|
|
|
|
2015-07-31 15:03:24 +09:00
|
|
|
|
2008-11-19 21:51:06 -08:00
|
|
|
|
|
|
|
|
|
2010-07-21 21:44:31 +00:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
net: use core MTU range checking in core net infra
geneve:
- Merge __geneve_change_mtu back into geneve_change_mtu, set max_mtu
- This one isn't quite as straight-forward as others, could use some
closer inspection and testing
macvlan:
- set min/max_mtu
tun:
- set min/max_mtu, remove tun_net_change_mtu
vxlan:
- Merge __vxlan_change_mtu back into vxlan_change_mtu
- Set max_mtu to IP_MAX_MTU and retain dynamic MTU range checks in
change_mtu function
- This one is also not as straight-forward and could use closer inspection
and testing from vxlan folks
bridge:
- set max_mtu of IP_MAX_MTU and retain dynamic MTU range checks in
change_mtu function
openvswitch:
- set min/max_mtu, remove internal_dev_change_mtu
- note: max_mtu wasn't checked previously, it's been set to 65535, which
is the largest possible size supported
sch_teql:
- set min/max_mtu (note: max_mtu previously unchecked, used max of 65535)
macsec:
- min_mtu = 0, max_mtu = 65535
macvlan:
- min_mtu = 0, max_mtu = 65535
ntb_netdev:
- min_mtu = 0, max_mtu = 65535
veth:
- min_mtu = 68, max_mtu = 65535
8021q:
- min_mtu = 0, max_mtu = 65535
CC: netdev@vger.kernel.org
CC: Nicolas Dichtel <nicolas.dichtel@6wind.com>
CC: Hannes Frederic Sowa <hannes@stressinduktion.org>
CC: Tom Herbert <tom@herbertland.com>
CC: Daniel Borkmann <daniel@iogearbox.net>
CC: Alexander Duyck <alexander.h.duyck@intel.com>
CC: Paolo Abeni <pabeni@redhat.com>
CC: Jiri Benc <jbenc@redhat.com>
CC: WANG Cong <xiyou.wangcong@gmail.com>
CC: Roopa Prabhu <roopa@cumulusnetworks.com>
CC: Pravin B Shelar <pshelar@ovn.org>
CC: Sabrina Dubroca <sd@queasysnail.net>
CC: Patrick McHardy <kaber@trash.net>
CC: Stephen Hemminger <stephen@networkplumber.org>
CC: Pravin Shelar <pshelar@nicira.com>
CC: Maxim Krasnyansky <maxk@qti.qualcomm.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-10-20 13:55:20 -04:00
|
|
|
|
|
|
|
|
|
2014-10-05 18:38:35 -07:00
|
|
|
|
|
|
|
|
|
2013-03-07 10:21:48 +00:00
|
|
|
|
2008-11-19 21:51:06 -08:00
|
|
|
|
net: Fix inconsistent teardown and release of private netdev state.
Network devices can allocate reasources and private memory using
netdev_ops->ndo_init(). However, the release of these resources
can occur in one of two different places.
Either netdev_ops->ndo_uninit() or netdev->destructor().
The decision of which operation frees the resources depends upon
whether it is necessary for all netdev refs to be released before it
is safe to perform the freeing.
netdev_ops->ndo_uninit() presumably can occur right after the
NETDEV_UNREGISTER notifier completes and the unicast and multicast
address lists are flushed.
netdev->destructor(), on the other hand, does not run until the
netdev references all go away.
Further complicating the situation is that netdev->destructor()
almost universally does also a free_netdev().
This creates a problem for the logic in register_netdevice().
Because all callers of register_netdevice() manage the freeing
of the netdev, and invoke free_netdev(dev) if register_netdevice()
fails.
If netdev_ops->ndo_init() succeeds, but something else fails inside
of register_netdevice(), it does call ndo_ops->ndo_uninit(). But
it is not able to invoke netdev->destructor().
This is because netdev->destructor() will do a free_netdev() and
then the caller of register_netdevice() will do the same.
However, this means that the resources that would normally be released
by netdev->destructor() will not be.
Over the years drivers have added local hacks to deal with this, by
invoking their destructor parts by hand when register_netdevice()
fails.
Many drivers do not try to deal with this, and instead we have leaks.
Let's close this hole by formalizing the distinction between what
private things need to be freed up by netdev->destructor() and whether
the driver needs unregister_netdevice() to perform the free_netdev().
netdev->priv_destructor() performs all actions to free up the private
resources that used to be freed by netdev->destructor(), except for
free_netdev().
netdev->needs_free_netdev is a boolean that indicates whether
free_netdev() should be done at the end of unregister_netdevice().
Now, register_netdevice() can sanely release all resources after
ndo_ops->ndo_init() succeeds, by invoking both ndo_ops->ndo_uninit()
and netdev->priv_destructor().
And at the end of unregister_netdevice(), we invoke
netdev->priv_destructor() and optionally call free_netdev().
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-05-08 12:52:56 -04:00
|
|
|
|
2013-08-28 13:34:31 +02:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2010-07-21 21:44:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-14 14:10:39 +00:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-01 21:52:08 +00:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-01-18 15:02:55 -08:00
|
|
|
|
2014-12-06 15:53:46 -08:00
|
|
|
|
|
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-21 07:59:19 -04:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-25 16:31:08 +02:00
|
|
|
|
|
|
|
|
|
2010-06-01 21:52:08 +00:00
|
|
|
|
2014-04-17 13:45:59 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-15 03:27:57 +00:00
|
|
|
|
|
|
|
|
|
2010-06-01 21:52:08 +00:00
|
|
|
|
2011-05-20 14:59:23 -04:00
|
|
|
|
|
|
|
|
|
2010-06-01 21:52:08 +00:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-30 10:08:44 +00:00
|
|
|
|
2017-04-20 20:55:12 +08:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2010-06-15 03:27:57 +00:00
|
|
|
|
2010-06-01 21:52:08 +00:00
|
|
|
|
2014-10-22 19:43:46 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-04-20 20:55:12 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-10-22 19:43:46 -07:00
|
|
|
|
2017-06-21 07:59:19 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-12-07 12:23:18 +08:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
2017-06-25 23:56:01 +02:00
|
|
|
|
|
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-26 06:07:11 +00:00
|
|
|
|
2017-09-20 08:12:23 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-05 18:25:54 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-09-20 08:12:23 +08:00
|
|
|
|
2009-11-26 06:07:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-10-28 13:10:50 +00:00
|
|
|
|
2014-09-25 16:31:08 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-09-20 08:12:23 +08:00
|
|
|
|
2014-09-25 16:31:08 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-26 06:07:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-25 16:31:08 +02:00
|
|
|
|
2017-09-20 08:12:23 +08:00
|
|
|
|
2014-09-25 16:31:08 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-09-20 08:12:23 +08:00
|
|
|
|
2014-09-25 16:31:08 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-30 12:23:40 +00:00
|
|
|
|
2017-10-04 17:48:47 -07:00
|
|
|
|
|
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-25 16:31:08 +02:00
|
|
|
|
2016-11-04 10:28:49 +08:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-08 00:53:51 -08:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-03 02:55:22 -08:00
|
|
|
|
2009-03-13 13:15:37 -07:00
|
|
|
|
2008-01-10 22:39:28 -08:00
|
|
|
|
2013-12-03 02:55:22 -08:00
|
|
|
|
|
|
|
|
|
2008-01-10 22:39:28 -08:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
net: use core MTU range checking in core net infra
geneve:
- Merge __geneve_change_mtu back into geneve_change_mtu, set max_mtu
- This one isn't quite as straight-forward as others, could use some
closer inspection and testing
macvlan:
- set min/max_mtu
tun:
- set min/max_mtu, remove tun_net_change_mtu
vxlan:
- Merge __vxlan_change_mtu back into vxlan_change_mtu
- Set max_mtu to IP_MAX_MTU and retain dynamic MTU range checks in
change_mtu function
- This one is also not as straight-forward and could use closer inspection
and testing from vxlan folks
bridge:
- set max_mtu of IP_MAX_MTU and retain dynamic MTU range checks in
change_mtu function
openvswitch:
- set min/max_mtu, remove internal_dev_change_mtu
- note: max_mtu wasn't checked previously, it's been set to 65535, which
is the largest possible size supported
sch_teql:
- set min/max_mtu (note: max_mtu previously unchecked, used max of 65535)
macsec:
- min_mtu = 0, max_mtu = 65535
macvlan:
- min_mtu = 0, max_mtu = 65535
ntb_netdev:
- min_mtu = 0, max_mtu = 65535
veth:
- min_mtu = 68, max_mtu = 65535
8021q:
- min_mtu = 0, max_mtu = 65535
CC: netdev@vger.kernel.org
CC: Nicolas Dichtel <nicolas.dichtel@6wind.com>
CC: Hannes Frederic Sowa <hannes@stressinduktion.org>
CC: Tom Herbert <tom@herbertland.com>
CC: Daniel Borkmann <daniel@iogearbox.net>
CC: Alexander Duyck <alexander.h.duyck@intel.com>
CC: Paolo Abeni <pabeni@redhat.com>
CC: Jiri Benc <jbenc@redhat.com>
CC: WANG Cong <xiyou.wangcong@gmail.com>
CC: Roopa Prabhu <roopa@cumulusnetworks.com>
CC: Pravin B Shelar <pshelar@ovn.org>
CC: Sabrina Dubroca <sd@queasysnail.net>
CC: Patrick McHardy <kaber@trash.net>
CC: Stephen Hemminger <stephen@networkplumber.org>
CC: Pravin Shelar <pshelar@nicira.com>
CC: Maxim Krasnyansky <maxk@qti.qualcomm.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-10-20 13:55:20 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2012-02-15 06:45:40 +00:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2010-06-15 03:27:57 +00:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-04 10:28:49 +08:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2013-03-30 10:08:44 +00:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2010-10-28 13:10:50 +00:00
|
|
|
|
2017-06-21 07:59:18 -04:00
|
|
|
|
2016-11-04 10:28:49 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-10-28 13:10:50 +00:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-25 16:04:21 -04:00
|
|
|
|
net: remove type_check from dev_get_nest_level()
The idea for type_check in dev_get_nest_level() was to count the number
of nested devices of the same type (currently, only macvlan or vlan
devices).
This prevented the false positive lockdep warning on configurations such
as:
eth0 <--- macvlan0 <--- vlan0 <--- macvlan1
However, this doesn't prevent a warning on a configuration such as:
eth0 <--- macvlan0 <--- vlan0
eth1 <--- vlan1 <--- macvlan1
In this case, all the locks end up with a nesting subclass of 1, so
lockdep thinks that there is still a deadlock:
- in the first case we have (macvlan_netdev_addr_lock_key, 1) and then
take (vlan_netdev_xmit_lock_key, 1)
- in the second case, we have (vlan_netdev_xmit_lock_key, 1) and then
take (macvlan_netdev_addr_lock_key, 1)
By removing the linktype check in dev_get_nest_level() and always
incrementing the nesting depth, lockdep considers this configuration
valid.
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-12 16:10:33 +02:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2009-11-26 06:07:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-15 06:44:37 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-10-28 13:10:50 +00:00
|
|
|
|
2016-11-04 10:28:49 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-21 07:59:18 -04:00
|
|
|
|
2013-08-30 18:08:47 +02:00
|
|
|
|
2010-10-28 13:10:50 +00:00
|
|
|
|
|
|
|
|
|
2014-09-25 16:31:08 +02:00
|
|
|
|
2016-11-04 10:28:49 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-25 16:31:08 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-04 10:28:49 +08:00
|
|
|
|
2014-09-25 16:31:08 +02:00
|
|
|
|
|
|
|
|
|
2013-10-21 14:28:02 -07:00
|
|
|
|
|
|
|
|
|
2016-11-04 10:28:49 +08:00
|
|
|
|
2013-10-21 14:28:02 -07:00
|
|
|
|
2013-11-06 09:54:46 -08:00
|
|
|
|
2017-10-04 17:48:47 -07:00
|
|
|
|
2013-01-03 22:48:50 +00:00
|
|
|
|
2014-02-11 15:51:29 -08:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2013-05-09 04:23:40 +00:00
|
|
|
|
2009-12-03 15:59:22 -08:00
|
|
|
|
macvlan: make operstate and carrier more accurate
Currently when a macvlan is being initialized and the lower device is
netif_carrier_ok(), the macvlan device doesn't run through
rfc2863_policy() and is left with UNKNOWN operstate. Fix it by adding an
unconditional linkwatch event for the new macvlan device. Similar fix is
already used by the 8021q device (see register_vlan_dev()). Also fix the
inconsistent state when the lower device has been down and its carrier
was changed (when a device is down NETDEV_CHANGE doesn't get generated).
The second issue can be seen f.e. when we have a macvlan on top of a 8021q
device which has been down and its real device has been changing carrier
states, after setting the 8021q device up, the macvlan device will have
the same carrier state as it was before even though the 8021q can now
have a different state.
Example for case 1:
4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP mode DEFAULT group default qlen 1000
$ ip l add l eth2 macvl0 type macvlan
$ ip l set macvl0 up
$ ip l sh macvl0
72: macvl0@eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc
noqueue state UNKNOWN mode DEFAULT group default
link/ether f6:0b:54:0a:9d:a3 brd ff:ff:ff:ff:ff:ff
Example for case 2 (order is important):
Prestate: eth2 UP/CARRIER, vlan1 down, vlan1-macvlan down
$ ip l set vlan1-macvlan up
$ ip l sh vlan1-macvlan
71: vlan1-macvlan@vlan1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500
qdisc noqueue state UNKNOWN mode DEFAULT group default
link/ether 4a:b8:44:56:b9:b9 brd ff:ff:ff:ff:ff:ff
[ eth2 loses CARRIER before vlan1 has been UP-ed ]
$ ip l sh eth2
4: eth2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast
state DOWN mode DEFAULT group default qlen 1000
link/ether 52:54:00:bf:57:16 brd ff:ff:ff:ff:ff:ff
$ ip l sh vlan1-macvlan
71: vlan1-macvlan@vlan1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500
qdisc noqueue state UNKNOWN mode DEFAULT group default
link/ether 4a:b8:44:56:b9:b9 brd ff:ff:ff:ff:ff:ff
$ ip l set vlan1 up
$ ip l sh vlan1
70: vlan1@eth2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc
noqueue state LOWERLAYERDOWN mode DEFAULT group default qlen 1000
link/ether 52:54:00:bf:57:16 brd ff:ff:ff:ff:ff:ff
$ ip l sh vlan1-macvlan
71: vlan1-macvlan@vlan1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500
qdisc noqueue state UNKNOWN mode DEFAULT group default
link/ether 4a:b8:44:56:b9:b9 brd ff:ff:ff:ff:ff:ff
vlan1-macvlan is still UP, still has carrier and is still in the same
operstate as before. After the patch in case 1 macvl0 has state UP as it
should and in case 2 vlan1-macvlan has state LOWERLAYERDOWN again as it
should. Note that while the lower macvlan device is down their carrier
and thus operstate can go out of sync but that will be fixed once the
lower device goes up again.
This behaviour seems to have been present since beginning of git history.
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-01-27 17:50:43 +01:00
|
|
|
|
2010-05-24 07:02:25 +00:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2010-05-24 07:02:25 +00:00
|
|
|
|
2014-02-11 15:51:29 -08:00
|
|
|
|
2017-12-26 21:44:32 +08:00
|
|
|
|
2014-02-11 15:51:29 -08:00
|
|
|
|
2017-12-26 21:44:32 +08:00
|
|
|
|
2016-11-04 10:28:49 +08:00
|
|
|
|
2017-12-26 21:44:32 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-04 10:28:49 +08:00
|
|
|
|
2010-05-24 07:02:25 +00:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2010-01-30 12:23:40 +00:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2010-01-30 12:23:40 +00:00
|
|
|
|
2017-06-25 23:55:59 +02:00
|
|
|
|
|
|
|
|
|
2010-01-30 12:23:40 +00:00
|
|
|
|
2017-10-04 17:48:47 -07:00
|
|
|
|
2010-01-30 12:23:40 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-25 16:31:08 +02:00
|
|
|
|
|
|
|
|
|
2013-05-09 04:23:40 +00:00
|
|
|
|
2009-10-27 07:06:36 +00:00
|
|
|
|
2013-01-03 22:48:50 +00:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2010-01-30 12:23:40 +00:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2009-11-26 06:07:11 +00:00
|
|
|
|
2017-06-25 23:56:00 +02:00
|
|
|
|
|
|
|
|
|
2009-11-26 06:07:11 +00:00
|
|
|
|
|
|
|
|
|
2013-08-01 13:43:19 +03:00
|
|
|
|
|
|
|
|
|
2014-09-25 16:31:08 +02:00
|
|
|
|
|
|
|
|
|
2013-08-01 13:43:19 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-25 16:31:08 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-01 13:43:19 +03:00
|
|
|
|
2013-06-13 10:07:29 +03:00
|
|
|
|
2012-04-15 06:44:37 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-21 07:59:18 -04:00
|
|
|
|
2013-06-13 10:07:29 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-15 06:44:37 +00:00
|
|
|
|
|
|
|
|
|
2013-08-01 13:43:19 +03:00
|
|
|
|
|
|
|
|
|
2014-09-25 16:31:08 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-26 06:07:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-25 16:31:08 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-26 06:07:11 +00:00
|
|
|
|
|
|
|
|
|
2014-09-25 16:31:08 +02:00
|
|
|
|
|
|
|
|
|
2013-01-17 13:30:49 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-25 16:31:08 +02:00
|
|
|
|
|
|
|
|
|
2013-01-17 13:30:49 -08:00
|
|
|
|
2009-11-26 06:07:11 +00:00
|
|
|
|
|
|
|
|
|
2014-09-25 16:31:08 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-26 06:07:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-25 16:31:08 +02:00
|
|
|
|
|
|
|
|
|
2009-11-26 06:07:11 +00:00
|
|
|
|
2012-04-01 20:23:06 -04:00
|
|
|
|
|
|
|
|
|
2012-04-15 06:44:37 +00:00
|
|
|
|
|
|
|
|
|
2014-09-25 16:31:08 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-26 06:07:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-15 06:44:37 +00:00
|
|
|
|
|
|
|
|
|
2014-09-25 16:31:08 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-26 06:07:11 +00:00
|
|
|
|
|
|
|
|
|
2010-01-30 12:23:40 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-20 15:15:45 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-30 12:23:40 +00:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2010-07-21 21:44:31 +00:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
2015-01-20 15:15:45 +01:00
|
|
|
|
2017-02-10 16:03:49 -08:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-28 01:30:21 +00:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
2011-05-08 23:17:57 +00:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2010-06-15 03:27:57 +00:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
2013-03-30 10:08:44 +00:00
|
|
|
|
2010-06-15 03:27:57 +00:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
macvlan: make operstate and carrier more accurate
Currently when a macvlan is being initialized and the lower device is
netif_carrier_ok(), the macvlan device doesn't run through
rfc2863_policy() and is left with UNKNOWN operstate. Fix it by adding an
unconditional linkwatch event for the new macvlan device. Similar fix is
already used by the 8021q device (see register_vlan_dev()). Also fix the
inconsistent state when the lower device has been down and its carrier
was changed (when a device is down NETDEV_CHANGE doesn't get generated).
The second issue can be seen f.e. when we have a macvlan on top of a 8021q
device which has been down and its real device has been changing carrier
states, after setting the 8021q device up, the macvlan device will have
the same carrier state as it was before even though the 8021q can now
have a different state.
Example for case 1:
4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP mode DEFAULT group default qlen 1000
$ ip l add l eth2 macvl0 type macvlan
$ ip l set macvl0 up
$ ip l sh macvl0
72: macvl0@eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc
noqueue state UNKNOWN mode DEFAULT group default
link/ether f6:0b:54:0a:9d:a3 brd ff:ff:ff:ff:ff:ff
Example for case 2 (order is important):
Prestate: eth2 UP/CARRIER, vlan1 down, vlan1-macvlan down
$ ip l set vlan1-macvlan up
$ ip l sh vlan1-macvlan
71: vlan1-macvlan@vlan1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500
qdisc noqueue state UNKNOWN mode DEFAULT group default
link/ether 4a:b8:44:56:b9:b9 brd ff:ff:ff:ff:ff:ff
[ eth2 loses CARRIER before vlan1 has been UP-ed ]
$ ip l sh eth2
4: eth2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast
state DOWN mode DEFAULT group default qlen 1000
link/ether 52:54:00:bf:57:16 brd ff:ff:ff:ff:ff:ff
$ ip l sh vlan1-macvlan
71: vlan1-macvlan@vlan1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500
qdisc noqueue state UNKNOWN mode DEFAULT group default
link/ether 4a:b8:44:56:b9:b9 brd ff:ff:ff:ff:ff:ff
$ ip l set vlan1 up
$ ip l sh vlan1
70: vlan1@eth2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc
noqueue state LOWERLAYERDOWN mode DEFAULT group default qlen 1000
link/ether 52:54:00:bf:57:16 brd ff:ff:ff:ff:ff:ff
$ ip l sh vlan1-macvlan
71: vlan1-macvlan@vlan1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500
qdisc noqueue state UNKNOWN mode DEFAULT group default
link/ether 4a:b8:44:56:b9:b9 brd ff:ff:ff:ff:ff:ff
vlan1-macvlan is still UP, still has carrier and is still in the same
operstate as before. After the patch in case 1 macvl0 has state UP as it
should and in case 2 vlan1-macvlan has state LOWERLAYERDOWN again as it
should. Note that while the lower macvlan device is down their carrier
and thus operstate can go out of sync but that will be fixed once the
lower device goes up again.
This behaviour seems to have been present since beginning of git history.
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-01-27 17:50:43 +01:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
2009-12-03 15:59:22 -08:00
|
|
|
|
|
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-23 14:18:53 -08:00
|
|
|
|
2016-03-16 21:59:49 -07:00
|
|
|
|
2013-12-26 12:17:00 +01:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
2014-05-13 14:39:27 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-05-30 14:32:49 +08:00
|
|
|
|
|
|
|
|
|
2017-06-21 07:59:18 -04:00
|
|
|
|
2014-05-30 14:32:49 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-05-13 14:39:27 +08:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2010-09-17 03:22:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2011-05-08 23:17:57 +00:00
|
|
|
|
|
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
2010-03-10 10:30:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-06-04 16:23:37 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-30 12:23:40 +00:00
|
|
|
|
2007-07-14 18:55:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|