2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-02-09 23:24:49 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-08-23 17:23:25 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2012-05-15 14:11:53 +00:00
|
|
|
|
|
|
|
|
|
2006-01-11 12:17:47 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2011-07-15 11:47:34 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-04-03 09:22:53 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-03-03 23:28:58 -08:00
|
|
|
|
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.
percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.
http://userweb.kernel.org/~tj/misc/slabh-sweep.py
The script does the followings.
* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.
* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.
* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.
The conversion was done in the following steps.
1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.
2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.
3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.
4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.
5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.
6. percpu.h was updated not to include slab.h.
7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).
* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig
8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.
Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.
Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-24 17:04:11 +09:00
|
|
|
|
2007-09-12 12:01:34 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-08-20 13:56:31 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-07-30 20:43:36 -07:00
|
|
|
|
2006-08-15 00:35:24 -07:00
|
|
|
|
2012-10-22 03:42:09 +00:00
|
|
|
|
2015-07-21 10:43:48 +02:00
|
|
|
|
2015-08-20 13:56:31 +02:00
|
|
|
|
2015-10-12 11:47:10 -07:00
|
|
|
|
2015-11-19 12:24:22 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2016-12-24 11:46:01 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-11 12:43:42 +02:00
|
|
|
|
2013-12-11 13:48:20 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-11 12:43:42 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-22 20:56:05 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2010-12-13 12:52:14 -08:00
|
|
|
|
2011-11-23 02:12:51 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-18 03:56:57 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2015-10-07 16:48:47 -05:00
|
|
|
|
2013-12-02 19:55:21 +05:30
|
|
|
|
2015-10-07 16:48:47 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2012-07-17 03:29:28 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ipv6: Stop rt6_info from using inet_peer's metrics
inet_peer is indexed by the dst address alone. However, the fib6 tree
could have multiple routing entries (rt6_info) for the same dst. For
example,
1. A /128 dst via multiple gateways.
2. A RTF_CACHE route cloned from a /128 route.
In the above cases, all of them will share the same metrics and
step on each other.
This patch will steer away from inet_peer's metrics and use
dst_cow_metrics_generic() for everything.
Change Highlights:
1. Remove rt6_cow_metrics() which currently acquires metrics from
inet_peer for DST_HOST route (i.e. /128 route).
2. Add rt6i_pmtu to take care of the pmtu update to avoid creating a
full size metrics just to override the RTAX_MTU.
3. After (2), the RTF_CACHE route can also share the metrics with its
dst.from route, by:
dst_init_metrics(&cache_rt->dst, dst_metrics_ptr(cache_rt->dst.from), true);
4. Stop creating RTF_CACHE route by cloning another RTF_CACHE route. Instead,
directly clone from rt->dst.
[ Currently, cloning from another RTF_CACHE is only possible during
rt6_do_redirect(). Also, the old clone is removed from the tree
immediately after the new clone is added. ]
In case of cloning from an older redirect RTF_CACHE, it should work as
before.
In case of cloning from an older pmtu RTF_CACHE, this patch will forget
the pmtu and re-learn it (if there is any) from the redirected route.
The _rt6i_peer and DST_METRICS_FORCE_OVERWRITE will be removed
in the next cleanup patch.
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Reviewed-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-28 13:03:06 -07:00
|
|
|
|
2013-06-28 17:35:48 +02:00
|
|
|
|
2017-02-02 12:37:11 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-03-20 17:06:24 -08:00
|
|
|
|
2008-03-04 13:46:48 -08:00
|
|
|
|
2011-04-22 04:53:02 +00:00
|
|
|
|
2016-10-24 10:52:35 -07:00
|
|
|
|
|
|
|
|
|
2012-04-15 05:58:06 +00:00
|
|
|
|
2008-03-04 13:46:48 -08:00
|
|
|
|
2011-04-22 04:53:02 +00:00
|
|
|
|
2016-10-24 10:52:35 -07:00
|
|
|
|
|
|
|
|
|
2006-03-20 17:06:24 -08:00
|
|
|
|
|
|
|
|
|
2015-05-22 20:56:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-12 11:02:08 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-22 20:56:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-12 11:02:08 -05:00
|
|
|
|
2015-05-22 20:56:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-12 11:02:08 -05:00
|
|
|
|
2015-05-22 20:56:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-22 20:56:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-01-27 14:58:42 -08:00
|
|
|
|
|
|
|
|
|
ipv6: Stop rt6_info from using inet_peer's metrics
inet_peer is indexed by the dst address alone. However, the fib6 tree
could have multiple routing entries (rt6_info) for the same dst. For
example,
1. A /128 dst via multiple gateways.
2. A RTF_CACHE route cloned from a /128 route.
In the above cases, all of them will share the same metrics and
step on each other.
This patch will steer away from inet_peer's metrics and use
dst_cow_metrics_generic() for everything.
Change Highlights:
1. Remove rt6_cow_metrics() which currently acquires metrics from
inet_peer for DST_HOST route (i.e. /128 route).
2. Add rt6i_pmtu to take care of the pmtu update to avoid creating a
full size metrics just to override the RTAX_MTU.
3. After (2), the RTF_CACHE route can also share the metrics with its
dst.from route, by:
dst_init_metrics(&cache_rt->dst, dst_metrics_ptr(cache_rt->dst.from), true);
4. Stop creating RTF_CACHE route by cloning another RTF_CACHE route. Instead,
directly clone from rt->dst.
[ Currently, cloning from another RTF_CACHE is only possible during
rt6_do_redirect(). Also, the old clone is removed from the tree
immediately after the new clone is added. ]
In case of cloning from an older redirect RTF_CACHE, it should work as
before.
In case of cloning from an older pmtu RTF_CACHE, this patch will forget
the pmtu and re-learn it (if there is any) from the redirected route.
The _rt6i_peer and DST_METRICS_FORCE_OVERWRITE will be removed
in the next cleanup patch.
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Reviewed-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-28 13:03:06 -07:00
|
|
|
|
2011-01-27 14:58:42 -08:00
|
|
|
|
2015-05-22 20:56:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ipv6: Stop rt6_info from using inet_peer's metrics
inet_peer is indexed by the dst address alone. However, the fib6 tree
could have multiple routing entries (rt6_info) for the same dst. For
example,
1. A /128 dst via multiple gateways.
2. A RTF_CACHE route cloned from a /128 route.
In the above cases, all of them will share the same metrics and
step on each other.
This patch will steer away from inet_peer's metrics and use
dst_cow_metrics_generic() for everything.
Change Highlights:
1. Remove rt6_cow_metrics() which currently acquires metrics from
inet_peer for DST_HOST route (i.e. /128 route).
2. Add rt6i_pmtu to take care of the pmtu update to avoid creating a
full size metrics just to override the RTAX_MTU.
3. After (2), the RTF_CACHE route can also share the metrics with its
dst.from route, by:
dst_init_metrics(&cache_rt->dst, dst_metrics_ptr(cache_rt->dst.from), true);
4. Stop creating RTF_CACHE route by cloning another RTF_CACHE route. Instead,
directly clone from rt->dst.
[ Currently, cloning from another RTF_CACHE is only possible during
rt6_do_redirect(). Also, the old clone is removed from the tree
immediately after the new clone is added. ]
In case of cloning from an older redirect RTF_CACHE, it should work as
before.
In case of cloning from an older pmtu RTF_CACHE, this patch will forget
the pmtu and re-learn it (if there is any) from the redirected route.
The _rt6i_peer and DST_METRICS_FORCE_OVERWRITE will be removed
in the next cleanup patch.
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Reviewed-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-28 13:03:06 -07:00
|
|
|
|
|
|
|
|
|
2015-02-12 16:14:08 -08:00
|
|
|
|
2011-01-27 14:58:42 -08:00
|
|
|
|
|
|
|
|
|
2012-07-02 21:52:24 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-01-26 15:22:32 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-01-26 16:29:16 -05:00
|
|
|
|
2012-01-26 15:22:32 -05:00
|
|
|
|
2012-07-02 21:52:24 -07:00
|
|
|
|
|
|
|
|
|
2012-01-26 15:22:32 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-02 21:52:24 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-07-18 00:40:17 -07:00
|
|
|
|
2012-01-26 15:22:32 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-02 21:52:24 -07:00
|
|
|
|
2013-01-17 12:53:09 +00:00
|
|
|
|
2011-12-28 15:41:23 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-06 23:14:15 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-03-04 13:48:53 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-12-13 12:52:14 -08:00
|
|
|
|
2011-11-23 02:12:51 +00:00
|
|
|
|
2011-01-27 14:58:42 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-12 00:05:02 -07:00
|
|
|
|
2015-10-07 16:48:39 -05:00
|
|
|
|
2011-07-18 00:40:17 -07:00
|
|
|
|
2017-02-06 23:14:15 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2011-11-23 02:12:51 +00:00
|
|
|
|
2011-01-31 13:16:00 -08:00
|
|
|
|
2011-11-23 02:13:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-01-31 13:16:00 -08:00
|
|
|
|
|
|
|
|
|
2012-07-17 03:29:28 -07:00
|
|
|
|
|
|
|
|
|
2007-05-24 18:17:54 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-17 03:29:28 -07:00
|
|
|
|
|
|
|
|
|
2012-07-12 00:39:24 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-05-24 18:17:54 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-11-23 02:12:51 +00:00
|
|
|
|
2011-02-18 11:39:01 -08:00
|
|
|
|
2007-05-24 18:17:54 -07:00
|
|
|
|
2012-07-12 00:39:24 -07:00
|
|
|
|
2015-10-15 16:39:58 -07:00
|
|
|
|
2011-07-18 00:40:17 -07:00
|
|
|
|
2007-05-24 18:17:54 -07:00
|
|
|
|
|
|
|
|
|
net: Implement read-only protection and COW'ing of metrics.
Routing metrics are now copy-on-write.
Initially a route entry points it's metrics at a read-only location.
If a routing table entry exists, it will point there. Else it will
point at the all zero metric place-holder called 'dst_default_metrics'.
The writeability state of the metrics is stored in the low bits of the
metrics pointer, we have two bits left to spare if we want to store
more states.
For the initial implementation, COW is implemented simply via kmalloc.
However future enhancements will change this to place the writable
metrics somewhere else, in order to increase sharing. Very likely
this "somewhere else" will be the inetpeer cache.
Note also that this means that metrics updates may transiently fail
if we cannot COW the metrics successfully.
But even by itself, this patch should decrease memory usage and
increase cache locality especially for routing workloads. In those
cases the read-only metric copies stay in place and never get written
to.
TCP workloads where metrics get updated, and those rare cases where
PMTU triggers occur, will take a very slight performance hit. But
that hit will be alleviated when the long-term writable metrics
move to a more sharable location.
Since the metrics storage went from a u32 array of RTAX_MAX entries to
what is essentially a pointer, some retooling of the dst_entry layout
was necessary.
Most importantly, we need to preserve the alignment of the reference
count so that it doesn't share cache lines with the read-mostly state,
as per Eric Dumazet's alignment assertion checks.
The only non-trivial bit here is the move of the 'flags' member into
the writeable cacheline. This is OK since we are always accessing the
flags around the same moment when we made a modification to the
reference count.
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-26 20:51:05 -08:00
|
|
|
|
2012-10-24 14:01:18 +08:00
|
|
|
|
net: Implement read-only protection and COW'ing of metrics.
Routing metrics are now copy-on-write.
Initially a route entry points it's metrics at a read-only location.
If a routing table entry exists, it will point there. Else it will
point at the all zero metric place-holder called 'dst_default_metrics'.
The writeability state of the metrics is stored in the low bits of the
metrics pointer, we have two bits left to spare if we want to store
more states.
For the initial implementation, COW is implemented simply via kmalloc.
However future enhancements will change this to place the writable
metrics somewhere else, in order to increase sharing. Very likely
this "somewhere else" will be the inetpeer cache.
Note also that this means that metrics updates may transiently fail
if we cannot COW the metrics successfully.
But even by itself, this patch should decrease memory usage and
increase cache locality especially for routing workloads. In those
cases the read-only metric copies stay in place and never get written
to.
TCP workloads where metrics get updated, and those rare cases where
PMTU triggers occur, will take a very slight performance hit. But
that hit will be alleviated when the long-term writable metrics
move to a more sharable location.
Since the metrics storage went from a u32 array of RTAX_MAX entries to
what is essentially a pointer, some retooling of the dst_entry layout
was necessary.
Most importantly, we need to preserve the alignment of the reference
count so that it doesn't share cache lines with the read-mostly state,
as per Eric Dumazet's alignment assertion checks.
The only non-trivial bit here is the move of the 'flags' member into
the writeable cacheline. This is OK since we are always accessing the
flags around the same moment when we made a modification to the
reference count.
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-26 20:51:05 -08:00
|
|
|
|
|
|
|
|
|
2012-09-11 21:47:51 +00:00
|
|
|
|
2010-06-10 23:31:35 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-09-10 22:09:47 +00:00
|
|
|
|
2010-06-10 23:31:35 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2009-05-20 17:38:59 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-08-04 03:39:02 -07:00
|
|
|
|
|
|
|
|
|
2012-09-11 21:47:51 +00:00
|
|
|
|
2010-06-10 23:31:35 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-09-10 22:09:47 +00:00
|
|
|
|
2010-06-10 23:31:35 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-08-04 03:39:02 -07:00
|
|
|
|
|
|
|
|
|
2009-05-20 17:38:59 -07:00
|
|
|
|
2006-08-04 03:39:02 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-09-11 21:47:51 +00:00
|
|
|
|
2010-06-10 23:31:35 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-09-10 22:09:47 +00:00
|
|
|
|
2010-06-10 23:31:35 -07:00
|
|
|
|
|
|
|
|
|
2015-10-07 16:48:47 -05:00
|
|
|
|
2006-08-04 03:39:02 -07:00
|
|
|
|
|
|
|
|
|
2009-05-20 17:38:59 -07:00
|
|
|
|
2006-08-04 03:39:02 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-15 16:39:57 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2015-05-22 20:56:06 -07:00
|
|
|
|
|
|
|
|
|
2015-08-14 11:05:52 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2012-06-09 22:36:36 -07:00
|
|
|
|
2017-06-17 10:42:41 -07:00
|
|
|
|
2011-04-28 14:31:47 -07:00
|
|
|
|
2015-10-15 16:39:57 -07:00
|
|
|
|
|
|
|
|
|
2012-07-05 23:37:09 +00:00
|
|
|
|
2011-04-28 14:31:47 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2016-04-07 11:10:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-22 20:56:06 -07:00
|
|
|
|
2015-08-14 11:05:52 -07:00
|
|
|
|
2015-05-22 20:56:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-17 10:42:36 -07:00
|
|
|
|
2015-05-22 20:56:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-07 11:10:06 -07:00
|
|
|
|
2015-05-22 20:56:06 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ipv6: fix race condition regarding dst->expires and dst->from.
Eric Dumazet wrote:
| Some strange crashes happen in rt6_check_expired(), with access
| to random addresses.
|
| At first glance, it looks like the RTF_EXPIRES and
| stuff added in commit 1716a96101c49186b
| (ipv6: fix problem with expired dst cache)
| are racy : same dst could be manipulated at the same time
| on different cpus.
|
| At some point, our stack believes rt->dst.from contains a dst pointer,
| while its really a jiffie value (as rt->dst.expires shares the same area
| of memory)
|
| rt6_update_expires() should be fixed, or am I missing something ?
|
| CC Neil because of https://bugzilla.redhat.com/show_bug.cgi?id=892060
Because we do not have any locks for dst_entry, we cannot change
essential structure in the entry; e.g., we cannot change reference
to other entity.
To fix this issue, split 'from' and 'expires' field in dst_entry
out of union. Once it is 'from' is assigned in the constructor,
keep the reference until the very last stage of the life time of
the object.
Of course, it is unsafe to change 'from', so make rt6_set_from simple
just for fresh entries.
Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Reported-by: Neil Horman <nhorman@tuxdriver.com>
CC: Gao Feng <gaofeng@cn.fujitsu.com>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reported-by: Steinar H. Gunderson <sesse@google.com>
Reviewed-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-20 00:29:08 +00:00
|
|
|
|
2015-05-22 20:56:04 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
ipv6: Stop rt6_info from using inet_peer's metrics
inet_peer is indexed by the dst address alone. However, the fib6 tree
could have multiple routing entries (rt6_info) for the same dst. For
example,
1. A /128 dst via multiple gateways.
2. A RTF_CACHE route cloned from a /128 route.
In the above cases, all of them will share the same metrics and
step on each other.
This patch will steer away from inet_peer's metrics and use
dst_cow_metrics_generic() for everything.
Change Highlights:
1. Remove rt6_cow_metrics() which currently acquires metrics from
inet_peer for DST_HOST route (i.e. /128 route).
2. Add rt6i_pmtu to take care of the pmtu update to avoid creating a
full size metrics just to override the RTAX_MTU.
3. After (2), the RTF_CACHE route can also share the metrics with its
dst.from route, by:
dst_init_metrics(&cache_rt->dst, dst_metrics_ptr(cache_rt->dst.from), true);
4. Stop creating RTF_CACHE route by cloning another RTF_CACHE route. Instead,
directly clone from rt->dst.
[ Currently, cloning from another RTF_CACHE is only possible during
rt6_do_redirect(). Also, the old clone is removed from the tree
immediately after the new clone is added. ]
In case of cloning from an older redirect RTF_CACHE, it should work as
before.
In case of cloning from an older pmtu RTF_CACHE, this patch will forget
the pmtu and re-learn it (if there is any) from the redirected route.
The _rt6i_peer and DST_METRICS_FORCE_OVERWRITE will be removed
in the next cleanup patch.
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Reviewed-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-28 13:03:06 -07:00
|
|
|
|
2015-07-02 16:30:24 +02:00
|
|
|
|
2015-05-22 20:56:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-03 18:02:47 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2007-02-09 23:24:49 +09:00
|
|
|
|
2012-04-06 00:13:10 +00:00
|
|
|
|
ipv6: fix race condition regarding dst->expires and dst->from.
Eric Dumazet wrote:
| Some strange crashes happen in rt6_check_expired(), with access
| to random addresses.
|
| At first glance, it looks like the RTF_EXPIRES and
| stuff added in commit 1716a96101c49186b
| (ipv6: fix problem with expired dst cache)
| are racy : same dst could be manipulated at the same time
| on different cpus.
|
| At some point, our stack believes rt->dst.from contains a dst pointer,
| while its really a jiffie value (as rt->dst.expires shares the same area
| of memory)
|
| rt6_update_expires() should be fixed, or am I missing something ?
|
| CC Neil because of https://bugzilla.redhat.com/show_bug.cgi?id=892060
Because we do not have any locks for dst_entry, we cannot change
essential structure in the entry; e.g., we cannot change reference
to other entity.
To fix this issue, split 'from' and 'expires' field in dst_entry
out of union. Once it is 'from' is assigned in the constructor,
keep the reference until the very last stage of the life time of
the object.
Of course, it is unsafe to change 'from', so make rt6_set_from simple
just for fresh entries.
Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Reported-by: Neil Horman <nhorman@tuxdriver.com>
CC: Gao Feng <gaofeng@cn.fujitsu.com>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reported-by: Steinar H. Gunderson <sesse@google.com>
Reviewed-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-20 00:29:08 +00:00
|
|
|
|
|
|
|
|
|
2010-11-30 12:27:11 -08:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-12-07 00:38:10 -08:00
|
|
|
|
2008-03-25 21:47:49 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2017-08-14 10:44:59 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-02 22:43:47 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-11-11 11:51:07 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-18 18:57:34 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2012-04-06 00:13:10 +00:00
|
|
|
|
|
|
|
|
|
2012-05-18 18:57:34 +00:00
|
|
|
|
2012-04-06 00:13:10 +00:00
|
|
|
|
2017-08-26 20:10:10 +08:00
|
|
|
|
|
|
|
|
|
2012-04-06 00:13:10 +00:00
|
|
|
|
2012-05-18 18:57:34 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2012-10-22 03:42:09 +00:00
|
|
|
|
2013-06-28 17:35:48 +02:00
|
|
|
|
|
|
|
|
|
2012-10-22 03:42:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-08-23 09:58:31 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-22 03:42:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-28 17:35:48 +02:00
|
|
|
|
|
|
|
|
|
2012-10-22 03:42:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2008-03-04 13:48:30 -08:00
|
|
|
|
|
|
|
|
|
2011-04-22 04:53:02 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-06-27 20:14:54 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-02 18:30:18 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-10 23:31:35 -07:00
|
|
|
|
2011-12-28 20:19:20 -05:00
|
|
|
|
2008-07-02 18:30:18 +09:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-03 18:02:47 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2015-09-25 15:22:54 -06:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2015-09-25 15:22:54 -06:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-02 18:30:18 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-07-02 18:30:18 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-07-02 18:30:18 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-06-27 20:14:54 -07:00
|
|
|
|
2008-03-04 13:48:30 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-07-02 18:30:18 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-03-20 17:05:13 -08:00
|
|
|
|
2013-10-21 06:17:15 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-12-02 14:00:08 -08:00
|
|
|
|
2013-10-21 06:17:15 +02:00
|
|
|
|
2015-02-08 10:14:07 +01:00
|
|
|
|
2013-10-21 06:17:15 +02:00
|
|
|
|
|
|
|
|
|
2006-03-20 17:05:13 -08:00
|
|
|
|
|
|
|
|
|
2015-07-24 09:57:42 -07:00
|
|
|
|
2011-07-29 19:00:53 +00:00
|
|
|
|
2006-03-20 17:05:13 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-17 12:53:43 +00:00
|
|
|
|
2013-01-17 12:53:02 +00:00
|
|
|
|
2013-01-17 12:53:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-07-24 09:57:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-07-24 09:57:42 -07:00
|
|
|
|
2013-01-17 12:53:43 +00:00
|
|
|
|
2015-07-24 09:57:42 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-10-21 06:17:15 +02:00
|
|
|
|
2013-01-17 12:53:43 +00:00
|
|
|
|
2015-07-24 09:57:42 -07:00
|
|
|
|
|
|
|
|
|
2011-07-29 19:00:53 +00:00
|
|
|
|
2015-07-24 09:57:42 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-07-24 09:57:43 -07:00
|
|
|
|
2013-01-17 12:53:43 +00:00
|
|
|
|
2006-03-20 17:05:13 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-03-20 17:00:26 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-03-22 12:27:49 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2011-12-28 20:19:20 -05:00
|
|
|
|
2007-04-06 11:42:27 -07:00
|
|
|
|
2006-03-20 17:00:26 -08:00
|
|
|
|
2007-04-06 11:42:27 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2013-07-11 12:43:42 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2011-07-29 19:00:53 +00:00
|
|
|
|
2013-07-11 12:43:42 +02:00
|
|
|
|
2011-07-29 19:00:53 +00:00
|
|
|
|
2006-05-26 13:23:41 -07:00
|
|
|
|
|
|
|
|
|
2013-07-11 12:43:42 +02:00
|
|
|
|
2013-01-17 12:53:38 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-03-20 17:00:26 -08:00
|
|
|
|
2013-07-11 12:43:42 +02:00
|
|
|
|
2008-01-19 00:35:16 -08:00
|
|
|
|
2012-12-03 10:26:54 +00:00
|
|
|
|
2013-07-11 12:43:42 +02:00
|
|
|
|
2013-12-11 13:48:20 +01:00
|
|
|
|
|
|
|
|
|
2008-01-19 00:35:16 -08:00
|
|
|
|
2013-01-17 12:53:38 +00:00
|
|
|
|
2013-07-11 12:43:42 +02:00
|
|
|
|
|
|
|
|
|
2013-12-11 13:48:20 +01:00
|
|
|
|
2012-12-03 10:26:54 +00:00
|
|
|
|
2013-01-17 12:53:38 +00:00
|
|
|
|
|
|
|
|
|
2012-12-03 10:26:54 +00:00
|
|
|
|
2006-03-20 17:00:26 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-03-20 17:00:26 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-12-03 10:26:54 +00:00
|
|
|
|
2007-02-09 23:24:49 +09:00
|
|
|
|
2006-05-26 13:23:41 -07:00
|
|
|
|
2006-08-23 17:25:05 -07:00
|
|
|
|
2013-07-11 12:43:42 +02:00
|
|
|
|
2006-03-20 17:04:53 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-11 12:43:42 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-03-20 17:00:26 -08:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
[IPV6]: Fix routing round-robin locking.
As per RFC2461, section 6.3.6, item #2, when no routers on the
matching list are known to be reachable or probably reachable we
do round robin on those available routes so that we make sure
to probe as many of them as possible to detect when one becomes
reachable faster.
Each routing table has a rwlock protecting the tree and the linked
list of routes at each leaf. The round robin code executes during
lookup and thus with the rwlock taken as a reader. A small local
spinlock tries to provide protection but this does not work at all
for two reasons:
1) The round-robin list manipulation, as coded, goes like this (with
read lock held):
walk routes finding head and tail
spin_lock();
rotate list using head and tail
spin_unlock();
While one thread is rotating the list, another thread can
end up with stale values of head and tail and then proceed
to corrupt the list when it gets the lock. This ends up causing
the OOPS in fib6_add() later onthat many people have been hitting.
2) All the other code paths that run with the rwlock held as
a reader do not expect the list to change on them, they
expect it to remain completely fixed while they hold the
lock in that way.
So, simply stated, it is impossible to implement this correctly using
a manipulation of the list without violating the rwlock locking
semantics.
Reimplement using a per-fib6_node round-robin pointer. This way we
don't need to manipulate the list at all, and since the round-robin
pointer can only ever point to real existing entries we don't need
to perform any locking on the changing of the round-robin pointer
itself. We only need to reset the round-robin pointer to NULL when
the entry it is pointing to is removed.
The idea is from Thomas Graf and it is very similar to how this
was implemented before the advanced router selection code when in.
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-24 20:36:25 -07:00
|
|
|
|
2013-07-11 12:43:42 +02:00
|
|
|
|
|
|
|
|
|
2006-03-20 17:00:26 -08:00
|
|
|
|
[IPV6]: Fix routing round-robin locking.
As per RFC2461, section 6.3.6, item #2, when no routers on the
matching list are known to be reachable or probably reachable we
do round robin on those available routes so that we make sure
to probe as many of them as possible to detect when one becomes
reachable faster.
Each routing table has a rwlock protecting the tree and the linked
list of routes at each leaf. The round robin code executes during
lookup and thus with the rwlock taken as a reader. A small local
spinlock tries to provide protection but this does not work at all
for two reasons:
1) The round-robin list manipulation, as coded, goes like this (with
read lock held):
walk routes finding head and tail
spin_lock();
rotate list using head and tail
spin_unlock();
While one thread is rotating the list, another thread can
end up with stale values of head and tail and then proceed
to corrupt the list when it gets the lock. This ends up causing
the OOPS in fib6_add() later onthat many people have been hitting.
2) All the other code paths that run with the rwlock held as
a reader do not expect the list to change on them, they
expect it to remain completely fixed while they hold the
lock in that way.
So, simply stated, it is impossible to implement this correctly using
a manipulation of the list without violating the rwlock locking
semantics.
Reimplement using a per-fib6_node round-robin pointer. This way we
don't need to manipulate the list at all, and since the round-robin
pointer can only ever point to real existing entries we don't need
to perform any locking on the changing of the round-robin pointer
itself. We only need to reset the round-robin pointer to NULL when
the entry it is pointing to is removed.
The idea is from Thomas Graf and it is very similar to how this
was implemented before the advanced router selection code when in.
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-24 20:36:25 -07:00
|
|
|
|
2013-07-11 12:43:42 +02:00
|
|
|
|
2015-08-13 10:39:01 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-10-24 12:27:23 -07:00
|
|
|
|
|
|
|
|
|
2015-08-13 10:39:01 -04:00
|
|
|
|
[IPV6]: Fix routing round-robin locking.
As per RFC2461, section 6.3.6, item #2, when no routers on the
matching list are known to be reachable or probably reachable we
do round robin on those available routes so that we make sure
to probe as many of them as possible to detect when one becomes
reachable faster.
Each routing table has a rwlock protecting the tree and the linked
list of routes at each leaf. The round robin code executes during
lookup and thus with the rwlock taken as a reader. A small local
spinlock tries to provide protection but this does not work at all
for two reasons:
1) The round-robin list manipulation, as coded, goes like this (with
read lock held):
walk routes finding head and tail
spin_lock();
rotate list using head and tail
spin_unlock();
While one thread is rotating the list, another thread can
end up with stale values of head and tail and then proceed
to corrupt the list when it gets the lock. This ends up causing
the OOPS in fib6_add() later onthat many people have been hitting.
2) All the other code paths that run with the rwlock held as
a reader do not expect the list to change on them, they
expect it to remain completely fixed while they hold the
lock in that way.
So, simply stated, it is impossible to implement this correctly using
a manipulation of the list without violating the rwlock locking
semantics.
Reimplement using a per-fib6_node round-robin pointer. This way we
don't need to manipulate the list at all, and since the round-robin
pointer can only ever point to real existing entries we don't need
to perform any locking on the changing of the round-robin pointer
itself. We only need to reset the round-robin pointer to NULL when
the entry it is pointing to is removed.
The idea is from Thomas Graf and it is very similar to how this
was implemented before the advanced router selection code when in.
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-24 20:36:25 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-11 13:48:20 +01:00
|
|
|
|
2013-07-11 12:43:42 +02:00
|
|
|
|
|
|
|
|
|
2013-12-11 13:48:20 +01:00
|
|
|
|
[IPV6]: Fix routing round-robin locking.
As per RFC2461, section 6.3.6, item #2, when no routers on the
matching list are known to be reachable or probably reachable we
do round robin on those available routes so that we make sure
to probe as many of them as possible to detect when one becomes
reachable faster.
Each routing table has a rwlock protecting the tree and the linked
list of routes at each leaf. The round robin code executes during
lookup and thus with the rwlock taken as a reader. A small local
spinlock tries to provide protection but this does not work at all
for two reasons:
1) The round-robin list manipulation, as coded, goes like this (with
read lock held):
walk routes finding head and tail
spin_lock();
rotate list using head and tail
spin_unlock();
While one thread is rotating the list, another thread can
end up with stale values of head and tail and then proceed
to corrupt the list when it gets the lock. This ends up causing
the OOPS in fib6_add() later onthat many people have been hitting.
2) All the other code paths that run with the rwlock held as
a reader do not expect the list to change on them, they
expect it to remain completely fixed while they hold the
lock in that way.
So, simply stated, it is impossible to implement this correctly using
a manipulation of the list without violating the rwlock locking
semantics.
Reimplement using a per-fib6_node round-robin pointer. This way we
don't need to manipulate the list at all, and since the round-robin
pointer can only ever point to real existing entries we don't need
to perform any locking on the changing of the round-robin pointer
itself. We only need to reset the round-robin pointer to NULL when
the entry it is pointing to is removed.
The idea is from Thomas Graf and it is very similar to how this
was implemented before the advanced router selection code when in.
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-24 20:36:25 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-11 12:43:42 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-11 13:48:20 +01:00
|
|
|
|
2013-07-11 12:43:42 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[IPV6]: Fix routing round-robin locking.
As per RFC2461, section 6.3.6, item #2, when no routers on the
matching list are known to be reachable or probably reachable we
do round robin on those available routes so that we make sure
to probe as many of them as possible to detect when one becomes
reachable faster.
Each routing table has a rwlock protecting the tree and the linked
list of routes at each leaf. The round robin code executes during
lookup and thus with the rwlock taken as a reader. A small local
spinlock tries to provide protection but this does not work at all
for two reasons:
1) The round-robin list manipulation, as coded, goes like this (with
read lock held):
walk routes finding head and tail
spin_lock();
rotate list using head and tail
spin_unlock();
While one thread is rotating the list, another thread can
end up with stale values of head and tail and then proceed
to corrupt the list when it gets the lock. This ends up causing
the OOPS in fib6_add() later onthat many people have been hitting.
2) All the other code paths that run with the rwlock held as
a reader do not expect the list to change on them, they
expect it to remain completely fixed while they hold the
lock in that way.
So, simply stated, it is impossible to implement this correctly using
a manipulation of the list without violating the rwlock locking
semantics.
Reimplement using a per-fib6_node round-robin pointer. This way we
don't need to manipulate the list at all, and since the round-robin
pointer can only ever point to real existing entries we don't need
to perform any locking on the changing of the round-robin pointer
itself. We only need to reset the round-robin pointer to NULL when
the entry it is pointing to is removed.
The idea is from Thomas Graf and it is very similar to how this
was implemented before the advanced router selection code when in.
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-24 20:36:25 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-11 12:43:42 +02:00
|
|
|
|
|
|
|
|
|
[IPV6]: Fix routing round-robin locking.
As per RFC2461, section 6.3.6, item #2, when no routers on the
matching list are known to be reachable or probably reachable we
do round robin on those available routes so that we make sure
to probe as many of them as possible to detect when one becomes
reachable faster.
Each routing table has a rwlock protecting the tree and the linked
list of routes at each leaf. The round robin code executes during
lookup and thus with the rwlock taken as a reader. A small local
spinlock tries to provide protection but this does not work at all
for two reasons:
1) The round-robin list manipulation, as coded, goes like this (with
read lock held):
walk routes finding head and tail
spin_lock();
rotate list using head and tail
spin_unlock();
While one thread is rotating the list, another thread can
end up with stale values of head and tail and then proceed
to corrupt the list when it gets the lock. This ends up causing
the OOPS in fib6_add() later onthat many people have been hitting.
2) All the other code paths that run with the rwlock held as
a reader do not expect the list to change on them, they
expect it to remain completely fixed while they hold the
lock in that way.
So, simply stated, it is impossible to implement this correctly using
a manipulation of the list without violating the rwlock locking
semantics.
Reimplement using a per-fib6_node round-robin pointer. This way we
don't need to manipulate the list at all, and since the round-robin
pointer can only ever point to real existing entries we don't need
to perform any locking on the changing of the round-robin pointer
itself. We only need to reset the round-robin pointer to NULL when
the entry it is pointing to is removed.
The idea is from Thomas Graf and it is very similar to how this
was implemented before the advanced router selection code when in.
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-24 20:36:25 -07:00
|
|
|
|
2015-04-28 13:03:04 -07:00
|
|
|
|
2006-03-20 17:00:26 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
[IPV6]: Fix routing round-robin locking.
As per RFC2461, section 6.3.6, item #2, when no routers on the
matching list are known to be reachable or probably reachable we
do round robin on those available routes so that we make sure
to probe as many of them as possible to detect when one becomes
reachable faster.
Each routing table has a rwlock protecting the tree and the linked
list of routes at each leaf. The round robin code executes during
lookup and thus with the rwlock taken as a reader. A small local
spinlock tries to provide protection but this does not work at all
for two reasons:
1) The round-robin list manipulation, as coded, goes like this (with
read lock held):
walk routes finding head and tail
spin_lock();
rotate list using head and tail
spin_unlock();
While one thread is rotating the list, another thread can
end up with stale values of head and tail and then proceed
to corrupt the list when it gets the lock. This ends up causing
the OOPS in fib6_add() later onthat many people have been hitting.
2) All the other code paths that run with the rwlock held as
a reader do not expect the list to change on them, they
expect it to remain completely fixed while they hold the
lock in that way.
So, simply stated, it is impossible to implement this correctly using
a manipulation of the list without violating the rwlock locking
semantics.
Reimplement using a per-fib6_node round-robin pointer. This way we
don't need to manipulate the list at all, and since the round-robin
pointer can only ever point to real existing entries we don't need
to perform any locking on the changing of the round-robin pointer
itself. We only need to reset the round-robin pointer to NULL when
the entry it is pointing to is removed.
The idea is from Thomas Graf and it is very similar to how this
was implemented before the advanced router selection code when in.
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-24 20:36:25 -07:00
|
|
|
|
2015-04-28 13:03:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-11 12:43:42 +02:00
|
|
|
|
2015-04-28 13:03:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-11 12:43:42 +02:00
|
|
|
|
2006-03-20 17:00:26 -08:00
|
|
|
|
[IPV6]: Fix routing round-robin locking.
As per RFC2461, section 6.3.6, item #2, when no routers on the
matching list are known to be reachable or probably reachable we
do round robin on those available routes so that we make sure
to probe as many of them as possible to detect when one becomes
reachable faster.
Each routing table has a rwlock protecting the tree and the linked
list of routes at each leaf. The round robin code executes during
lookup and thus with the rwlock taken as a reader. A small local
spinlock tries to provide protection but this does not work at all
for two reasons:
1) The round-robin list manipulation, as coded, goes like this (with
read lock held):
walk routes finding head and tail
spin_lock();
rotate list using head and tail
spin_unlock();
While one thread is rotating the list, another thread can
end up with stale values of head and tail and then proceed
to corrupt the list when it gets the lock. This ends up causing
the OOPS in fib6_add() later onthat many people have been hitting.
2) All the other code paths that run with the rwlock held as
a reader do not expect the list to change on them, they
expect it to remain completely fixed while they hold the
lock in that way.
So, simply stated, it is impossible to implement this correctly using
a manipulation of the list without violating the rwlock locking
semantics.
Reimplement using a per-fib6_node round-robin pointer. This way we
don't need to manipulate the list at all, and since the round-robin
pointer can only ever point to real existing entries we don't need
to perform any locking on the changing of the round-robin pointer
itself. We only need to reset the round-robin pointer to NULL when
the entry it is pointing to is removed.
The idea is from Thomas Graf and it is very similar to how this
was implemented before the advanced router selection code when in.
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-24 20:36:25 -07:00
|
|
|
|
|
|
|
|
|
2006-03-20 17:00:26 -08:00
|
|
|
|
[IPV6]: Fix routing round-robin locking.
As per RFC2461, section 6.3.6, item #2, when no routers on the
matching list are known to be reachable or probably reachable we
do round robin on those available routes so that we make sure
to probe as many of them as possible to detect when one becomes
reachable faster.
Each routing table has a rwlock protecting the tree and the linked
list of routes at each leaf. The round robin code executes during
lookup and thus with the rwlock taken as a reader. A small local
spinlock tries to provide protection but this does not work at all
for two reasons:
1) The round-robin list manipulation, as coded, goes like this (with
read lock held):
walk routes finding head and tail
spin_lock();
rotate list using head and tail
spin_unlock();
While one thread is rotating the list, another thread can
end up with stale values of head and tail and then proceed
to corrupt the list when it gets the lock. This ends up causing
the OOPS in fib6_add() later onthat many people have been hitting.
2) All the other code paths that run with the rwlock held as
a reader do not expect the list to change on them, they
expect it to remain completely fixed while they hold the
lock in that way.
So, simply stated, it is impossible to implement this correctly using
a manipulation of the list without violating the rwlock locking
semantics.
Reimplement using a per-fib6_node round-robin pointer. This way we
don't need to manipulate the list at all, and since the round-robin
pointer can only ever point to real existing entries we don't need
to perform any locking on the changing of the round-robin pointer
itself. We only need to reset the round-robin pointer to NULL when
the entry it is pointing to is removed.
The idea is from Thomas Graf and it is very similar to how this
was implemented before the advanced router selection code when in.
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-24 20:36:25 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-03-04 13:48:30 -08:00
|
|
|
|
2013-07-11 12:43:42 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
[IPV6]: Fix routing round-robin locking.
As per RFC2461, section 6.3.6, item #2, when no routers on the
matching list are known to be reachable or probably reachable we
do round robin on those available routes so that we make sure
to probe as many of them as possible to detect when one becomes
reachable faster.
Each routing table has a rwlock protecting the tree and the linked
list of routes at each leaf. The round robin code executes during
lookup and thus with the rwlock taken as a reader. A small local
spinlock tries to provide protection but this does not work at all
for two reasons:
1) The round-robin list manipulation, as coded, goes like this (with
read lock held):
walk routes finding head and tail
spin_lock();
rotate list using head and tail
spin_unlock();
While one thread is rotating the list, another thread can
end up with stale values of head and tail and then proceed
to corrupt the list when it gets the lock. This ends up causing
the OOPS in fib6_add() later onthat many people have been hitting.
2) All the other code paths that run with the rwlock held as
a reader do not expect the list to change on them, they
expect it to remain completely fixed while they hold the
lock in that way.
So, simply stated, it is impossible to implement this correctly using
a manipulation of the list without violating the rwlock locking
semantics.
Reimplement using a per-fib6_node round-robin pointer. This way we
don't need to manipulate the list at all, and since the round-robin
pointer can only ever point to real existing entries we don't need
to perform any locking on the changing of the round-robin pointer
itself. We only need to reset the round-robin pointer to NULL when
the entry it is pointing to is removed.
The idea is from Thomas Graf and it is very similar to how this
was implemented before the advanced router selection code when in.
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-24 20:36:25 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-07-11 12:43:42 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-07-11 12:43:42 +02:00
|
|
|
|
2010-06-10 23:31:35 -07:00
|
|
|
|
[IPV6]: Fix routing round-robin locking.
As per RFC2461, section 6.3.6, item #2, when no routers on the
matching list are known to be reachable or probably reachable we
do round robin on those available routes so that we make sure
to probe as many of them as possible to detect when one becomes
reachable faster.
Each routing table has a rwlock protecting the tree and the linked
list of routes at each leaf. The round robin code executes during
lookup and thus with the rwlock taken as a reader. A small local
spinlock tries to provide protection but this does not work at all
for two reasons:
1) The round-robin list manipulation, as coded, goes like this (with
read lock held):
walk routes finding head and tail
spin_lock();
rotate list using head and tail
spin_unlock();
While one thread is rotating the list, another thread can
end up with stale values of head and tail and then proceed
to corrupt the list when it gets the lock. This ends up causing
the OOPS in fib6_add() later onthat many people have been hitting.
2) All the other code paths that run with the rwlock held as
a reader do not expect the list to change on them, they
expect it to remain completely fixed while they hold the
lock in that way.
So, simply stated, it is impossible to implement this correctly using
a manipulation of the list without violating the rwlock locking
semantics.
Reimplement using a per-fib6_node round-robin pointer. This way we
don't need to manipulate the list at all, and since the round-robin
pointer can only ever point to real existing entries we don't need
to perform any locking on the changing of the round-robin pointer
itself. We only need to reset the round-robin pointer to NULL when
the entry it is pointing to is removed.
The idea is from Thomas Graf and it is very similar to how this
was implemented before the advanced router selection code when in.
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-24 20:36:25 -07:00
|
|
|
|
2006-03-20 17:00:26 -08:00
|
|
|
|
[IPV6]: Fix routing round-robin locking.
As per RFC2461, section 6.3.6, item #2, when no routers on the
matching list are known to be reachable or probably reachable we
do round robin on those available routes so that we make sure
to probe as many of them as possible to detect when one becomes
reachable faster.
Each routing table has a rwlock protecting the tree and the linked
list of routes at each leaf. The round robin code executes during
lookup and thus with the rwlock taken as a reader. A small local
spinlock tries to provide protection but this does not work at all
for two reasons:
1) The round-robin list manipulation, as coded, goes like this (with
read lock held):
walk routes finding head and tail
spin_lock();
rotate list using head and tail
spin_unlock();
While one thread is rotating the list, another thread can
end up with stale values of head and tail and then proceed
to corrupt the list when it gets the lock. This ends up causing
the OOPS in fib6_add() later onthat many people have been hitting.
2) All the other code paths that run with the rwlock held as
a reader do not expect the list to change on them, they
expect it to remain completely fixed while they hold the
lock in that way.
So, simply stated, it is impossible to implement this correctly using
a manipulation of the list without violating the rwlock locking
semantics.
Reimplement using a per-fib6_node round-robin pointer. This way we
don't need to manipulate the list at all, and since the round-robin
pointer can only ever point to real existing entries we don't need
to perform any locking on the changing of the round-robin pointer
itself. We only need to reset the round-robin pointer to NULL when
the entry it is pointing to is removed.
The idea is from Thomas Graf and it is very similar to how this
was implemented before the advanced router selection code when in.
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-24 20:36:25 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2011-12-28 20:19:20 -05:00
|
|
|
|
2010-09-22 20:43:57 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2015-05-22 20:55:59 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-03-20 17:06:24 -08:00
|
|
|
|
|
|
|
|
|
2011-04-22 04:53:02 +00:00
|
|
|
|
2006-03-20 17:06:24 -08:00
|
|
|
|
2008-03-25 21:47:49 +09:00
|
|
|
|
2006-03-20 17:06:24 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-05-27 17:37:49 +09:00
|
|
|
|
2006-03-20 17:06:24 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-09-10 06:25:11 +00:00
|
|
|
|
2006-03-20 17:06:24 -08:00
|
|
|
|
2008-05-27 17:37:49 +09:00
|
|
|
|
2006-03-20 17:06:24 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-11-08 09:56:53 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-10-24 10:52:35 -07:00
|
|
|
|
2006-03-20 17:06:24 -08:00
|
|
|
|
|
|
|
|
|
2006-08-22 00:00:21 -07:00
|
|
|
|
2006-03-20 17:06:24 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-10-24 10:52:35 -07:00
|
|
|
|
|
|
|
|
|
2006-03-20 17:06:24 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-06 00:13:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-29 00:13:19 +00:00
|
|
|
|
2006-03-20 17:06:24 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-10-20 13:42:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
2008-03-04 13:48:30 -08:00
|
|
|
|
|
|
|
|
|
2011-03-12 16:22:43 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
2011-03-12 16:22:43 -05:00
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
|
|
|
|
|
2011-03-12 16:22:43 -05:00
|
|
|
|
2012-10-22 03:42:09 +00:00
|
|
|
|
2013-06-28 17:35:48 +02:00
|
|
|
|
2014-10-20 13:42:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-10 23:31:35 -07:00
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
2015-11-19 12:24:22 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-08-24 21:53:10 +01:00
|
|
|
|
2011-09-05 16:05:44 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[IPV6]: Make address arguments const.
- net/ipv6/addrconf.c:
ipv6_get_ifaddr(), ipv6_dev_get_saddr()
- net/ipv6/mcast.c:
ipv6_sock_mc_join(), ipv6_sock_mc_drop(),
inet6_mc_check(),
ipv6_dev_mc_inc(), __ipv6_dev_mc_dec(), ipv6_dev_mc_dec(),
ipv6_chk_mcast_addr()
- net/ipv6/route.c:
rt6_lookup(), icmp6_dst_alloc()
- net/ipv6/ip6_output.c:
ip6_nd_hdr()
- net/ipv6/ndisc.c:
ndisc_send_ns(), ndisc_send_rs(), ndisc_send_redirect(),
ndisc_get_neigh(), __ndisc_send()
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
2008-04-10 15:42:10 +09:00
|
|
|
|
|
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
2011-03-12 16:22:43 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
|
|
|
|
|
2006-08-23 17:25:05 -07:00
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
2006-10-13 15:01:03 -07:00
|
|
|
|
2011-03-12 16:22:43 -05:00
|
|
|
|
2006-10-13 15:01:03 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-12 16:22:43 -05:00
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2007-02-22 22:05:40 +09:00
|
|
|
|
|
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
2017-06-17 10:42:33 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2014-03-27 13:04:08 +01:00
|
|
|
|
2017-05-21 10:12:04 -06:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
|
|
|
|
|
2017-05-21 10:12:04 -06:00
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-08-22 00:00:45 -07:00
|
|
|
|
|
|
|
|
|
2015-01-05 23:57:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-17 10:42:33 -07:00
|
|
|
|
|
|
|
|
|
2017-05-21 10:12:04 -06:00
|
|
|
|
2006-08-22 00:00:45 -07:00
|
|
|
|
|
|
|
|
|
2017-08-17 12:17:20 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-11-21 07:08:57 -08:00
|
|
|
|
2017-08-17 12:17:20 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-22 20:55:59 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2017-08-17 12:17:20 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-22 20:56:06 -07:00
|
|
|
|
2015-05-22 20:56:05 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2017-08-17 12:17:20 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-22 20:56:05 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2015-05-22 20:56:05 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-22 20:55:59 -07:00
|
|
|
|
2015-05-22 20:56:05 -07:00
|
|
|
|
2006-03-20 16:55:51 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-03-20 16:55:51 -08:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2015-05-22 20:56:06 -07:00
|
|
|
|
|
|
|
|
|
2017-08-17 12:17:20 -07:00
|
|
|
|
2015-05-22 20:56:06 -07:00
|
|
|
|
|
|
|
|
|
2017-08-17 12:17:20 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-22 20:56:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-08-14 11:05:53 -07:00
|
|
|
|
2015-05-22 20:56:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-08-14 11:05:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-27 13:53:08 +01:00
|
|
|
|
2015-08-14 11:05:53 -07:00
|
|
|
|
2015-05-22 20:56:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-08-14 11:05:54 -07:00
|
|
|
|
|
|
|
|
|
2015-05-22 20:56:06 -07:00
|
|
|
|
|
|
|
|
|
2017-12-27 13:53:08 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-10-06 12:06:04 -07:00
|
|
|
|
2017-12-27 13:53:08 +01:00
|
|
|
|
2017-10-06 12:06:04 -07:00
|
|
|
|
2017-12-27 13:53:08 +01:00
|
|
|
|
2015-05-22 20:56:06 -07:00
|
|
|
|
2017-12-27 13:53:08 +01:00
|
|
|
|
2015-05-22 20:56:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-13 13:44:19 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2014-10-20 13:42:45 -07:00
|
|
|
|
2015-05-22 20:56:00 -07:00
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-08-23 17:25:05 -07:00
|
|
|
|
2016-10-24 12:27:23 -07:00
|
|
|
|
2014-10-20 13:42:45 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2011-03-12 16:22:43 -05:00
|
|
|
|
2014-10-20 13:42:45 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2015-10-12 11:47:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-10-20 13:42:43 -07:00
|
|
|
|
2014-10-20 13:42:45 -07:00
|
|
|
|
2013-06-28 17:35:48 +02:00
|
|
|
|
2014-10-20 13:42:45 -07:00
|
|
|
|
2014-10-20 13:42:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-10-20 13:42:45 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-10-20 13:42:43 -07:00
|
|
|
|
|
|
|
|
|
2006-03-20 16:59:08 -08:00
|
|
|
|
2015-05-22 20:56:03 -07:00
|
|
|
|
2015-05-22 20:56:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-11-19 12:24:22 -08:00
|
|
|
|
|
|
|
|
|
2015-05-22 20:56:06 -07:00
|
|
|
|
2015-05-22 20:56:03 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
2015-05-22 20:56:03 -07:00
|
|
|
|
|
|
|
|
|
2015-05-22 20:56:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-22 20:56:03 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-17 10:42:33 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-22 20:56:04 -07:00
|
|
|
|
2017-06-17 10:42:33 -07:00
|
|
|
|
2015-05-22 20:56:03 -07:00
|
|
|
|
2017-06-17 10:42:33 -07:00
|
|
|
|
|
|
|
|
|
2015-11-19 12:24:22 -08:00
|
|
|
|
|
|
|
|
|
2015-05-22 20:56:03 -07:00
|
|
|
|
|
|
|
|
|
2015-05-22 20:56:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-08-14 11:05:54 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-27 13:53:08 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-08-14 11:05:54 -07:00
|
|
|
|
2015-05-22 20:56:06 -07:00
|
|
|
|
2015-11-19 12:24:22 -08:00
|
|
|
|
2015-05-22 20:56:06 -07:00
|
|
|
|
2017-12-27 13:53:08 +01:00
|
|
|
|
2015-05-22 20:56:06 -07:00
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
2016-06-13 13:44:19 -07:00
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
2008-03-04 13:48:30 -08:00
|
|
|
|
2011-03-12 16:22:43 -05:00
|
|
|
|
2007-10-15 13:02:51 -07:00
|
|
|
|
2011-03-12 16:22:43 -05:00
|
|
|
|
2007-10-15 13:02:51 -07:00
|
|
|
|
|
|
|
|
|
2016-09-16 12:59:08 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 04:03:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-09-16 12:59:08 -07:00
|
|
|
|
2012-04-01 04:03:45 +00:00
|
|
|
|
2017-08-23 09:58:29 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
|
|
|
|
|
2011-04-22 04:53:02 +00:00
|
|
|
|
2008-03-25 21:47:49 +09:00
|
|
|
|
2006-10-13 15:01:03 -07:00
|
|
|
|
2015-08-20 13:56:31 +02:00
|
|
|
|
2011-03-12 16:22:43 -05:00
|
|
|
|
2016-09-10 12:09:57 -07:00
|
|
|
|
2011-03-12 16:22:43 -05:00
|
|
|
|
|
|
|
|
|
2013-01-13 05:01:51 +00:00
|
|
|
|
2011-03-12 16:22:43 -05:00
|
|
|
|
|
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
2006-10-13 15:01:03 -07:00
|
|
|
|
2015-08-20 13:56:31 +02:00
|
|
|
|
2015-08-28 20:48:19 +02:00
|
|
|
|
2015-08-20 13:56:31 +02:00
|
|
|
|
2017-08-23 09:58:29 +02:00
|
|
|
|
|
|
|
|
|
2015-08-20 13:56:26 +02:00
|
|
|
|
2012-04-01 04:03:45 +00:00
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
|
|
|
|
|
2008-03-04 13:48:30 -08:00
|
|
|
|
2011-03-12 16:22:43 -05:00
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
2011-03-12 16:22:43 -05:00
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
|
|
|
|
|
2016-01-29 12:30:19 +01:00
|
|
|
|
|
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
2015-10-21 08:42:22 -07:00
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
2016-09-10 12:09:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-12 11:47:10 -07:00
|
|
|
|
2012-08-08 21:53:36 +00:00
|
|
|
|
2012-06-25 15:42:26 +00:00
|
|
|
|
2015-10-21 08:42:22 -07:00
|
|
|
|
2015-09-28 10:12:13 -07:00
|
|
|
|
2015-10-21 08:42:22 -07:00
|
|
|
|
2006-08-23 17:25:05 -07:00
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
2015-10-21 08:42:22 -07:00
|
|
|
|
2006-10-13 15:01:03 -07:00
|
|
|
|
2010-03-07 00:14:44 +00:00
|
|
|
|
|
|
|
|
|
2006-10-13 15:01:03 -07:00
|
|
|
|
2011-03-12 16:22:43 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2016-01-29 12:30:19 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2011-03-01 14:59:04 -08:00
|
|
|
|
2007-05-24 18:17:54 -07:00
|
|
|
|
2011-04-28 14:13:38 -07:00
|
|
|
|
2017-06-17 10:42:26 -07:00
|
|
|
|
2007-05-24 18:17:54 -07:00
|
|
|
|
|
|
|
|
|
2017-06-17 10:42:26 -07:00
|
|
|
|
2017-10-09 08:39:43 +02:00
|
|
|
|
2007-05-24 18:17:54 -07:00
|
|
|
|
2015-10-15 16:39:58 -07:00
|
|
|
|
|
|
|
|
|
2010-06-10 23:31:35 -07:00
|
|
|
|
2007-05-24 18:17:54 -07:00
|
|
|
|
2007-11-13 21:34:06 -08:00
|
|
|
|
2015-10-07 16:48:47 -05:00
|
|
|
|
2007-05-24 18:17:54 -07:00
|
|
|
|
2015-10-15 16:39:58 -07:00
|
|
|
|
2007-05-24 18:17:54 -07:00
|
|
|
|
2017-06-17 10:42:26 -07:00
|
|
|
|
2011-11-21 03:39:03 +00:00
|
|
|
|
2015-10-15 16:39:58 -07:00
|
|
|
|
2007-05-24 18:17:54 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-01 14:45:33 -08:00
|
|
|
|
|
|
|
|
|
2007-05-24 18:17:54 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ipv6: Stop rt6_info from using inet_peer's metrics
inet_peer is indexed by the dst address alone. However, the fib6 tree
could have multiple routing entries (rt6_info) for the same dst. For
example,
1. A /128 dst via multiple gateways.
2. A RTF_CACHE route cloned from a /128 route.
In the above cases, all of them will share the same metrics and
step on each other.
This patch will steer away from inet_peer's metrics and use
dst_cow_metrics_generic() for everything.
Change Highlights:
1. Remove rt6_cow_metrics() which currently acquires metrics from
inet_peer for DST_HOST route (i.e. /128 route).
2. Add rt6i_pmtu to take care of the pmtu update to avoid creating a
full size metrics just to override the RTAX_MTU.
3. After (2), the RTF_CACHE route can also share the metrics with its
dst.from route, by:
dst_init_metrics(&cache_rt->dst, dst_metrics_ptr(cache_rt->dst.from), true);
4. Stop creating RTF_CACHE route by cloning another RTF_CACHE route. Instead,
directly clone from rt->dst.
[ Currently, cloning from another RTF_CACHE is only possible during
rt6_do_redirect(). Also, the old clone is removed from the tree
immediately after the new clone is added. ]
In case of cloning from an older redirect RTF_CACHE, it should work as
before.
In case of cloning from an older pmtu RTF_CACHE, this patch will forget
the pmtu and re-learn it (if there is any) from the redirected route.
The _rt6i_peer and DST_METRICS_FORCE_OVERWRITE will be removed
in the next cleanup patch.
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Reviewed-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-28 13:03:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-22 20:56:03 -07:00
|
|
|
|
|
|
|
|
|
2017-08-25 09:05:42 +02:00
|
|
|
|
2017-08-21 09:47:10 -07:00
|
|
|
|
|
|
|
|
|
2015-05-22 20:56:03 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-11-11 11:51:07 -08:00
|
|
|
|
|
|
|
|
|
2015-05-22 20:56:03 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-09-10 22:09:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-10-24 07:48:24 +02:00
|
|
|
|
ipv6: Stop rt6_info from using inet_peer's metrics
inet_peer is indexed by the dst address alone. However, the fib6 tree
could have multiple routing entries (rt6_info) for the same dst. For
example,
1. A /128 dst via multiple gateways.
2. A RTF_CACHE route cloned from a /128 route.
In the above cases, all of them will share the same metrics and
step on each other.
This patch will steer away from inet_peer's metrics and use
dst_cow_metrics_generic() for everything.
Change Highlights:
1. Remove rt6_cow_metrics() which currently acquires metrics from
inet_peer for DST_HOST route (i.e. /128 route).
2. Add rt6i_pmtu to take care of the pmtu update to avoid creating a
full size metrics just to override the RTAX_MTU.
3. After (2), the RTF_CACHE route can also share the metrics with its
dst.from route, by:
dst_init_metrics(&cache_rt->dst, dst_metrics_ptr(cache_rt->dst.from), true);
4. Stop creating RTF_CACHE route by cloning another RTF_CACHE route. Instead,
directly clone from rt->dst.
[ Currently, cloning from another RTF_CACHE is only possible during
rt6_do_redirect(). Also, the old clone is removed from the tree
immediately after the new clone is added. ]
In case of cloning from an older redirect RTF_CACHE, it should work as
before.
In case of cloning from an older pmtu RTF_CACHE, this patch will forget
the pmtu and re-learn it (if there is any) from the redirected route.
The _rt6i_peer and DST_METRICS_FORCE_OVERWRITE will be removed
in the next cleanup patch.
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Reviewed-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-28 13:03:06 -07:00
|
|
|
|
|
|
|
|
|
2015-11-11 11:51:08 -08:00
|
|
|
|
2017-06-17 10:42:42 -07:00
|
|
|
|
2015-05-22 20:56:03 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-03-28 07:15:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2010-03-28 07:15:45 +00:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2010-03-28 07:15:45 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-18 08:25:24 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2009-06-02 05:19:30 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-07-10 23:00:57 +02:00
|
|
|
|
2017-06-17 10:42:35 -07:00
|
|
|
|
|
|
|
|
|
2017-08-21 09:47:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-10 23:00:57 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-22 20:56:00 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-11-11 11:51:06 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-08-25 15:03:10 -07:00
|
|
|
|
|
|
|
|
|
2015-11-11 11:51:06 -08:00
|
|
|
|
|
|
|
|
|
2015-05-22 20:56:00 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2017-02-06 23:14:16 +02:00
|
|
|
|
2014-08-24 21:53:10 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2015-05-22 20:56:00 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-10-28 18:18:01 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-06 23:14:16 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-22 20:56:00 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-15 14:54:11 -07:00
|
|
|
|
2015-11-11 11:51:06 -08:00
|
|
|
|
2015-05-22 20:56:00 -07:00
|
|
|
|
2017-02-06 23:14:16 +02:00
|
|
|
|
2015-05-22 20:56:00 -07:00
|
|
|
|
2015-01-15 22:34:25 +01:00
|
|
|
|
2015-05-22 20:56:00 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-17 10:42:33 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-22 20:56:00 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-22 20:56:00 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-15 20:01:57 -07:00
|
|
|
|
2016-11-04 02:23:43 +09:00
|
|
|
|
2012-06-15 14:54:11 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-05-13 10:17:34 -07:00
|
|
|
|
2012-06-15 14:54:11 -07:00
|
|
|
|
|
|
|
|
|
2013-01-13 05:01:51 +00:00
|
|
|
|
2016-11-04 02:23:43 +09:00
|
|
|
|
2012-06-15 14:54:11 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-22 20:56:00 -07:00
|
|
|
|
2012-06-15 14:54:11 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ipv6: datagram: Update dst cache of a connected datagram sk during pmtu update
There is a case in connected UDP socket such that
getsockopt(IPV6_MTU) will return a stale MTU value. The reproducible
sequence could be the following:
1. Create a connected UDP socket
2. Send some datagrams out
3. Receive a ICMPV6_PKT_TOOBIG
4. No new outgoing datagrams to trigger the sk_dst_check()
logic to update the sk->sk_dst_cache.
5. getsockopt(IPV6_MTU) returns the mtu from the invalid
sk->sk_dst_cache instead of the newly created RTF_CACHE clone.
This patch updates the sk->sk_dst_cache for a connected datagram sk
during pmtu-update code path.
Note that the sk->sk_v6_daddr is used to do the route lookup
instead of skb->data (i.e. iph). It is because a UDP socket can become
connected after sending out some datagrams in un-connected state. or
It can be connected multiple times to different destinations. Hence,
iph may not be related to where sk is currently connected to.
It is done under '!sock_owned_by_user(sk)' condition because
the user may make another ip6_datagram_connect() (i.e changing
the sk->sk_v6_daddr) while dst lookup is happening in the pmtu-update
code path.
For the sock_owned_by_user(sk) == true case, the next patch will
introduce a release_cb() which will update the sk->sk_dst_cache.
Test:
Server (Connected UDP Socket):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Route Details:
[root@arch-fb-vm1 ~]# ip -6 r show | egrep '2fac'
2fac::/64 dev eth0 proto kernel metric 256 pref medium
2fac:face::/64 via 2fac::face dev eth0 metric 1024 pref medium
A simple python code to create a connected UDP socket:
import socket
import errno
HOST = '2fac::1'
PORT = 8080
s = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM)
s.bind((HOST, PORT))
s.connect(('2fac:face::face', 53))
print("connected")
while True:
try:
data = s.recv(1024)
except socket.error as se:
if se.errno == errno.EMSGSIZE:
pmtu = s.getsockopt(41, 24)
print("PMTU:%d" % pmtu)
break
s.close()
Python program output after getting a ICMPV6_PKT_TOOBIG:
[root@arch-fb-vm1 ~]# python2 ~/devshare/kernel/tasks/fib6/udp-connect-53-8080.py
connected
PMTU:1300
Cache routes after recieving TOOBIG:
[root@arch-fb-vm1 ~]# ip -6 r show table cache
2fac:face::face via 2fac::face dev eth0 metric 0
cache expires 463sec mtu 1300 pref medium
Client (Send the ICMPV6_PKT_TOOBIG):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scapy is used to generate the TOOBIG message. Here is the scapy script I have
used:
>>> p=Ether(src='da:75:4d:36:ac:32', dst='52:54:00:12:34:66', type=0x86dd)/IPv6(src='2fac::face', dst='2fac::1')/ICMPv6PacketTooBig(mtu=1300)/IPv6(src='2fac::
1',dst='2fac:face::face', nh='UDP')/UDP(sport=8080,dport=53)
>>> sendp(p, iface='qemubr0')
Fixes: 45e4fd26683c ("ipv6: Only create RTF_CACHE routes after encountering pmtu exception")
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Reported-by: Wei Wang <weiwan@google.com>
Cc: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Wei Wang <weiwan@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-04-11 15:29:36 -07:00
|
|
|
|
|
|
|
|
|
2012-06-15 14:54:11 -07:00
|
|
|
|
2016-11-04 02:23:43 +09:00
|
|
|
|
ipv6: datagram: Update dst cache of a connected datagram sk during pmtu update
There is a case in connected UDP socket such that
getsockopt(IPV6_MTU) will return a stale MTU value. The reproducible
sequence could be the following:
1. Create a connected UDP socket
2. Send some datagrams out
3. Receive a ICMPV6_PKT_TOOBIG
4. No new outgoing datagrams to trigger the sk_dst_check()
logic to update the sk->sk_dst_cache.
5. getsockopt(IPV6_MTU) returns the mtu from the invalid
sk->sk_dst_cache instead of the newly created RTF_CACHE clone.
This patch updates the sk->sk_dst_cache for a connected datagram sk
during pmtu-update code path.
Note that the sk->sk_v6_daddr is used to do the route lookup
instead of skb->data (i.e. iph). It is because a UDP socket can become
connected after sending out some datagrams in un-connected state. or
It can be connected multiple times to different destinations. Hence,
iph may not be related to where sk is currently connected to.
It is done under '!sock_owned_by_user(sk)' condition because
the user may make another ip6_datagram_connect() (i.e changing
the sk->sk_v6_daddr) while dst lookup is happening in the pmtu-update
code path.
For the sock_owned_by_user(sk) == true case, the next patch will
introduce a release_cb() which will update the sk->sk_dst_cache.
Test:
Server (Connected UDP Socket):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Route Details:
[root@arch-fb-vm1 ~]# ip -6 r show | egrep '2fac'
2fac::/64 dev eth0 proto kernel metric 256 pref medium
2fac:face::/64 via 2fac::face dev eth0 metric 1024 pref medium
A simple python code to create a connected UDP socket:
import socket
import errno
HOST = '2fac::1'
PORT = 8080
s = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM)
s.bind((HOST, PORT))
s.connect(('2fac:face::face', 53))
print("connected")
while True:
try:
data = s.recv(1024)
except socket.error as se:
if se.errno == errno.EMSGSIZE:
pmtu = s.getsockopt(41, 24)
print("PMTU:%d" % pmtu)
break
s.close()
Python program output after getting a ICMPV6_PKT_TOOBIG:
[root@arch-fb-vm1 ~]# python2 ~/devshare/kernel/tasks/fib6/udp-connect-53-8080.py
connected
PMTU:1300
Cache routes after recieving TOOBIG:
[root@arch-fb-vm1 ~]# ip -6 r show table cache
2fac:face::face via 2fac::face dev eth0 metric 0
cache expires 463sec mtu 1300 pref medium
Client (Send the ICMPV6_PKT_TOOBIG):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scapy is used to generate the TOOBIG message. Here is the scapy script I have
used:
>>> p=Ether(src='da:75:4d:36:ac:32', dst='52:54:00:12:34:66', type=0x86dd)/IPv6(src='2fac::face', dst='2fac::1')/ICMPv6PacketTooBig(mtu=1300)/IPv6(src='2fac::
1',dst='2fac:face::face', nh='UDP')/UDP(sport=8080,dport=53)
>>> sendp(p, iface='qemubr0')
Fixes: 45e4fd26683c ("ipv6: Only create RTF_CACHE routes after encountering pmtu exception")
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Reported-by: Wei Wang <weiwan@google.com>
Cc: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Wei Wang <weiwan@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-04-11 15:29:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-15 14:54:11 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-09-04 19:44:21 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-01-07 23:53:00 +01:00
|
|
|
|
2013-09-04 19:44:21 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-20 19:16:02 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-10-20 13:42:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-09-04 19:44:21 +08:00
|
|
|
|
2014-10-20 13:42:43 -07:00
|
|
|
|
2015-01-20 19:16:02 -08:00
|
|
|
|
2013-09-04 19:44:21 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-11-19 12:24:22 -08:00
|
|
|
|
2013-09-04 19:44:21 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-04 02:23:43 +09:00
|
|
|
|
|
|
|
|
|
2012-07-12 00:08:07 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-28 10:51:56 +03:00
|
|
|
|
2012-07-12 00:08:07 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-13 05:01:51 +00:00
|
|
|
|
2016-11-04 02:23:43 +09:00
|
|
|
|
2012-07-12 00:08:07 -07:00
|
|
|
|
2013-09-04 19:44:21 +08:00
|
|
|
|
|
|
|
|
|
2012-07-12 00:08:07 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-22 12:07:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-28 10:51:56 +03:00
|
|
|
|
2013-08-22 12:07:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-04 02:23:43 +09:00
|
|
|
|
2013-08-22 12:07:35 +08:00
|
|
|
|
2013-09-04 19:44:21 +08:00
|
|
|
|
|
|
|
|
|
2013-08-22 12:07:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-12 00:08:07 -07:00
|
|
|
|
|
|
|
|
|
2016-11-04 02:23:43 +09:00
|
|
|
|
|
|
|
|
|
2012-07-12 00:08:07 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-12-13 12:52:14 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2010-12-13 12:52:14 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2008-03-04 13:47:47 -08:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2007-02-09 23:24:49 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-11-23 02:12:51 +00:00
|
|
|
|
2010-12-14 13:01:14 -08:00
|
|
|
|
ipv6: Stop rt6_info from using inet_peer's metrics
inet_peer is indexed by the dst address alone. However, the fib6 tree
could have multiple routing entries (rt6_info) for the same dst. For
example,
1. A /128 dst via multiple gateways.
2. A RTF_CACHE route cloned from a /128 route.
In the above cases, all of them will share the same metrics and
step on each other.
This patch will steer away from inet_peer's metrics and use
dst_cow_metrics_generic() for everything.
Change Highlights:
1. Remove rt6_cow_metrics() which currently acquires metrics from
inet_peer for DST_HOST route (i.e. /128 route).
2. Add rt6i_pmtu to take care of the pmtu update to avoid creating a
full size metrics just to override the RTAX_MTU.
3. After (2), the RTF_CACHE route can also share the metrics with its
dst.from route, by:
dst_init_metrics(&cache_rt->dst, dst_metrics_ptr(cache_rt->dst.from), true);
4. Stop creating RTF_CACHE route by cloning another RTF_CACHE route. Instead,
directly clone from rt->dst.
[ Currently, cloning from another RTF_CACHE is only possible during
rt6_do_redirect(). Also, the old clone is removed from the tree
immediately after the new clone is added. ]
In case of cloning from an older redirect RTF_CACHE, it should work as
before.
In case of cloning from an older pmtu RTF_CACHE, this patch will forget
the pmtu and re-learn it (if there is any) from the redirected route.
The _rt6i_peer and DST_METRICS_FORCE_OVERWRITE will be removed
in the next cleanup patch.
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Reviewed-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-28 13:03:06 -07:00
|
|
|
|
|
|
|
|
|
2010-12-14 13:01:14 -08:00
|
|
|
|
2011-11-23 02:13:31 +00:00
|
|
|
|
ipv6: Stop rt6_info from using inet_peer's metrics
inet_peer is indexed by the dst address alone. However, the fib6 tree
could have multiple routing entries (rt6_info) for the same dst. For
example,
1. A /128 dst via multiple gateways.
2. A RTF_CACHE route cloned from a /128 route.
In the above cases, all of them will share the same metrics and
step on each other.
This patch will steer away from inet_peer's metrics and use
dst_cow_metrics_generic() for everything.
Change Highlights:
1. Remove rt6_cow_metrics() which currently acquires metrics from
inet_peer for DST_HOST route (i.e. /128 route).
2. Add rt6i_pmtu to take care of the pmtu update to avoid creating a
full size metrics just to override the RTAX_MTU.
3. After (2), the RTF_CACHE route can also share the metrics with its
dst.from route, by:
dst_init_metrics(&cache_rt->dst, dst_metrics_ptr(cache_rt->dst.from), true);
4. Stop creating RTF_CACHE route by cloning another RTF_CACHE route. Instead,
directly clone from rt->dst.
[ Currently, cloning from another RTF_CACHE is only possible during
rt6_do_redirect(). Also, the old clone is removed from the tree
immediately after the new clone is added. ]
In case of cloning from an older redirect RTF_CACHE, it should work as
before.
In case of cloning from an older pmtu RTF_CACHE, this patch will forget
the pmtu and re-learn it (if there is any) from the redirected route.
The _rt6i_peer and DST_METRICS_FORCE_OVERWRITE will be removed
in the next cleanup patch.
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Reviewed-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-28 13:03:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-11-23 02:13:31 +00:00
|
|
|
|
2014-04-10 21:23:36 -07:00
|
|
|
|
2011-11-23 02:13:31 +00:00
|
|
|
|
|
|
|
|
|
2010-12-14 13:01:14 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-10 21:23:36 -07:00
|
|
|
|
2016-08-24 20:10:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-12-14 13:01:14 -08:00
|
|
|
|
|
|
|
|
|
2007-12-06 16:11:48 -08:00
|
|
|
|
2011-12-06 17:04:13 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2011-12-06 17:04:13 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2008-03-25 21:47:49 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2011-12-03 18:02:47 -05:00
|
|
|
|
2012-03-14 21:13:11 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2015-08-14 11:05:52 -07:00
|
|
|
|
2011-12-03 18:02:47 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2011-12-06 17:04:13 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-09-05 21:34:30 +00:00
|
|
|
|
|
|
|
|
|
2013-10-20 15:43:04 +03:00
|
|
|
|
2011-12-06 17:04:13 -05:00
|
|
|
|
2011-09-05 21:34:30 +00:00
|
|
|
|
|
|
|
|
|
2012-10-24 14:01:18 +08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2017-06-17 10:42:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2011-12-06 17:04:13 -05:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2011-12-06 17:04:13 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2008-01-18 03:56:57 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2009-08-29 01:34:49 +00:00
|
|
|
|
2008-03-04 13:50:14 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-10-08 06:37:34 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2010-10-08 06:37:34 +00:00
|
|
|
|
2013-08-01 10:04:24 +02:00
|
|
|
|
2010-10-08 06:37:34 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2008-03-04 13:49:47 -08:00
|
|
|
|
2014-05-19 17:30:28 +08:00
|
|
|
|
2010-10-08 06:37:34 +00:00
|
|
|
|
|
|
|
|
|
2008-03-04 13:50:14 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-03-04 13:50:14 -08:00
|
|
|
|
2010-10-08 06:37:34 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2015-01-05 23:57:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tcp: use dctcp if enabled on the route to the initiator
Currently, the following case doesn't use DCTCP, even if it should:
A responder has f.e. Cubic as system wide default, but for a specific
route to the initiating host, DCTCP is being set in RTAX_CC_ALGO. The
initiating host then uses DCTCP as congestion control, but since the
initiator sets ECT(0), tcp_ecn_create_request() doesn't set ecn_ok,
and we have to fall back to Reno after 3WHS completes.
We were thinking on how to solve this in a minimal, non-intrusive
way without bloating tcp_ecn_create_request() needlessly: lets cache
the CA ecn option flag in RTAX_FEATURES. In other words, when ECT(0)
is set on the SYN packet, set ecn_ok=1 iff route RTAX_FEATURES
contains the unexposed (internal-only) DST_FEATURE_ECN_CA. This allows
to only do a single metric feature lookup inside tcp_ecn_create_request().
Joint work with Florian Westphal.
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-31 15:58:47 +02:00
|
|
|
|
2015-01-05 23:57:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-03-29 14:00:04 +01:00
|
|
|
|
2015-01-05 23:57:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-08-31 15:58:45 +02:00
|
|
|
|
2015-01-05 23:57:44 +01:00
|
|
|
|
2015-08-31 15:58:45 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-05 23:57:47 +01:00
|
|
|
|
2015-08-31 15:58:45 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tcp: use dctcp if enabled on the route to the initiator
Currently, the following case doesn't use DCTCP, even if it should:
A responder has f.e. Cubic as system wide default, but for a specific
route to the initiating host, DCTCP is being set in RTAX_CC_ALGO. The
initiating host then uses DCTCP as congestion control, but since the
initiator sets ECT(0), tcp_ecn_create_request() doesn't set ecn_ok,
and we have to fall back to Reno after 3WHS completes.
We were thinking on how to solve this in a minimal, non-intrusive
way without bloating tcp_ecn_create_request() needlessly: lets cache
the CA ecn option flag in RTAX_FEATURES. In other words, when ECT(0)
is set on the SYN packet, set ecn_ok=1 iff route RTAX_FEATURES
contains the unexposed (internal-only) DST_FEATURE_ECN_CA. This allows
to only do a single metric feature lookup inside tcp_ecn_create_request().
Joint work with Florian Westphal.
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-31 15:58:47 +02:00
|
|
|
|
2015-08-31 15:58:45 +02:00
|
|
|
|
2015-01-05 23:57:44 +01:00
|
|
|
|
2015-08-31 15:58:45 +02:00
|
|
|
|
|
|
|
|
|
2015-01-05 23:57:44 +01:00
|
|
|
|
2016-05-13 18:33:41 +02:00
|
|
|
|
|
|
|
|
|
2015-08-31 15:58:46 +02:00
|
|
|
|
|
|
|
|
|
2015-08-31 15:58:45 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-05 23:57:44 +01:00
|
|
|
|
|
|
|
|
|
tcp: use dctcp if enabled on the route to the initiator
Currently, the following case doesn't use DCTCP, even if it should:
A responder has f.e. Cubic as system wide default, but for a specific
route to the initiating host, DCTCP is being set in RTAX_CC_ALGO. The
initiating host then uses DCTCP as congestion control, but since the
initiator sets ECT(0), tcp_ecn_create_request() doesn't set ecn_ok,
and we have to fall back to Reno after 3WHS completes.
We were thinking on how to solve this in a minimal, non-intrusive
way without bloating tcp_ecn_create_request() needlessly: lets cache
the CA ecn option flag in RTAX_FEATURES. In other words, when ECT(0)
is set on the SYN packet, set ecn_ok=1 iff route RTAX_FEATURES
contains the unexposed (internal-only) DST_FEATURE_ECN_CA. This allows
to only do a single metric feature lookup inside tcp_ecn_create_request().
Joint work with Florian Westphal.
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-31 15:58:47 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-05 23:57:44 +01:00
|
|
|
|
tcp: use dctcp if enabled on the route to the initiator
Currently, the following case doesn't use DCTCP, even if it should:
A responder has f.e. Cubic as system wide default, but for a specific
route to the initiating host, DCTCP is being set in RTAX_CC_ALGO. The
initiating host then uses DCTCP as congestion control, but since the
initiator sets ECT(0), tcp_ecn_create_request() doesn't set ecn_ok,
and we have to fall back to Reno after 3WHS completes.
We were thinking on how to solve this in a minimal, non-intrusive
way without bloating tcp_ecn_create_request() needlessly: lets cache
the CA ecn option flag in RTAX_FEATURES. In other words, when ECT(0)
is set on the SYN packet, set ecn_ok=1 iff route RTAX_FEATURES
contains the unexposed (internal-only) DST_FEATURE_ECN_CA. This allows
to only do a single metric feature lookup inside tcp_ecn_create_request().
Joint work with Florian Westphal.
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-31 15:58:47 +02:00
|
|
|
|
2015-01-05 23:57:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2016-04-24 21:26:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-10-24 12:27:23 -07:00
|
|
|
|
2016-04-24 21:26:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-21 10:12:04 -06:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-03-04 13:47:47 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2015-10-10 08:26:36 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2017-04-19 14:19:43 -07:00
|
|
|
|
2017-05-21 10:12:05 -06:00
|
|
|
|
|
|
|
|
|
2017-04-19 14:19:43 -07:00
|
|
|
|
2017-05-21 10:12:05 -06:00
|
|
|
|
2017-04-19 14:19:43 -07:00
|
|
|
|
2017-05-21 10:12:05 -06:00
|
|
|
|
|
|
|
|
|
2015-10-10 08:26:36 -07:00
|
|
|
|
2017-05-21 10:12:05 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2017-05-21 10:12:05 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-10 08:26:36 -07:00
|
|
|
|
2017-05-21 10:12:05 -06:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-03-04 13:47:47 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2011-11-14 00:14:49 +00:00
|
|
|
|
2011-12-03 18:02:47 -05:00
|
|
|
|
|
|
|
|
|
2011-11-14 00:14:49 +00:00
|
|
|
|
2011-12-03 18:02:47 -05:00
|
|
|
|
2012-05-15 14:11:53 +00:00
|
|
|
|
2011-11-14 00:14:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-03 18:02:47 -05:00
|
|
|
|
|
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
|
|
|
|
|
2015-08-14 11:05:52 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2011-12-03 18:02:47 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-06 00:13:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2010-06-10 23:31:35 -07:00
|
|
|
|
2010-09-27 00:07:02 +00:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2010-06-10 23:31:35 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2010-06-10 23:31:35 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2015-07-21 10:43:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-01-30 12:07:37 -08:00
|
|
|
|
2015-08-24 09:45:41 -07:00
|
|
|
|
2017-05-27 16:19:28 -06:00
|
|
|
|
2015-07-21 10:43:48 +02:00
|
|
|
|
|
|
|
|
|
2015-08-20 13:56:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-08-17 13:42:24 -07:00
|
|
|
|
2015-08-20 13:56:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-08-17 13:42:24 -07:00
|
|
|
|
2015-07-21 10:43:48 +02:00
|
|
|
|
|
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
|
|
|
|
|
2015-04-28 13:03:07 -07:00
|
|
|
|
2014-03-27 13:04:08 +01:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
2011-12-03 18:02:47 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-03-04 13:47:47 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-03-04 13:47:47 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-09-05 02:12:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-07 16:48:47 -05:00
|
|
|
|
2013-12-02 19:55:21 +05:30
|
|
|
|
2012-09-05 02:12:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-02 19:55:21 +05:30
|
|
|
|
|
|
|
|
|
2012-09-05 02:12:42 +00:00
|
|
|
|
2012-09-06 05:53:35 +00:00
|
|
|
|
2015-09-17 16:01:32 +02:00
|
|
|
|
2012-09-05 02:12:42 +00:00
|
|
|
|
2013-12-02 19:55:21 +05:30
|
|
|
|
2015-09-17 16:01:32 +02:00
|
|
|
|
|
|
|
|
|
2013-12-02 19:55:21 +05:30
|
|
|
|
|
|
|
|
|
2012-09-05 02:12:42 +00:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
2011-04-22 04:53:02 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
2015-08-07 10:54:28 +02:00
|
|
|
|
2015-05-21 00:25:41 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-08-07 10:54:28 +02:00
|
|
|
|
|
|
|
|
|
2017-05-21 10:12:05 -06:00
|
|
|
|
|
|
|
|
|
2015-05-21 00:25:41 +02:00
|
|
|
|
2017-05-21 10:12:05 -06:00
|
|
|
|
2011-11-21 03:39:03 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2016-04-24 21:26:04 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-12-03 20:57:09 -08:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2016-12-03 20:57:09 -08:00
|
|
|
|
2017-05-21 10:12:05 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2017-05-21 10:12:05 -06:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2016-09-18 17:46:07 +02:00
|
|
|
|
2016-04-24 21:26:04 -07:00
|
|
|
|
|
|
|
|
|
2016-09-18 17:46:07 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-24 21:26:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2011-12-03 18:02:47 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2011-12-28 20:19:20 -05:00
|
|
|
|
2012-10-29 00:13:19 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-28 20:19:20 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-03 18:02:47 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2012-10-29 00:13:19 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-21 10:12:05 -06:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2017-05-21 10:12:05 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-03 18:02:47 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2011-04-13 21:10:57 +00:00
|
|
|
|
|
|
|
|
|
2017-05-21 10:12:05 -06:00
|
|
|
|
2011-04-13 21:10:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-11-21 03:39:03 +00:00
|
|
|
|
2011-04-13 21:10:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2010-06-10 23:31:35 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
2008-03-03 23:31:11 -08:00
|
|
|
|
2008-03-25 21:47:49 +09:00
|
|
|
|
2008-03-03 23:31:11 -08:00
|
|
|
|
2015-10-10 08:26:36 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-17 10:42:36 -07:00
|
|
|
|
|
|
|
|
|
2015-09-08 10:53:04 -07:00
|
|
|
|
2015-10-10 08:26:36 -07:00
|
|
|
|
2015-09-08 10:53:04 -07:00
|
|
|
|
|
|
|
|
|
2017-05-21 10:12:04 -06:00
|
|
|
|
|
|
|
|
|
2015-09-08 10:53:04 -07:00
|
|
|
|
|
|
|
|
|
2015-10-10 08:26:36 -07:00
|
|
|
|
2015-09-08 10:53:04 -07:00
|
|
|
|
|
|
|
|
|
2017-05-21 10:12:04 -06:00
|
|
|
|
2015-10-10 08:26:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-09-08 10:53:04 -07:00
|
|
|
|
2015-10-10 08:26:36 -07:00
|
|
|
|
2015-09-08 10:53:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-21 10:12:04 -06:00
|
|
|
|
2015-09-08 10:53:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-17 10:42:36 -07:00
|
|
|
|
|
|
|
|
|
2015-09-08 10:53:04 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
2011-12-28 20:19:20 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2017-06-17 10:42:42 -07:00
|
|
|
|
2012-09-19 19:25:34 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-08-06 22:22:47 -07:00
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
|
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2012-09-19 19:25:34 +00:00
|
|
|
|
2012-10-29 00:13:19 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-08-22 00:00:21 -07:00
|
|
|
|
|
|
|
|
|
2008-01-10 03:26:13 -08:00
|
|
|
|
2011-12-28 20:19:20 -05:00
|
|
|
|
2008-01-10 03:26:13 -08:00
|
|
|
|
2007-12-13 09:45:12 -08:00
|
|
|
|
2006-08-22 00:00:21 -07:00
|
|
|
|
|
|
|
|
|
2017-02-02 12:37:08 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-27 16:07:43 -08:00
|
|
|
|
2017-02-02 12:37:11 -08:00
|
|
|
|
2017-02-02 12:37:08 -08:00
|
|
|
|
2017-02-27 16:07:43 -08:00
|
|
|
|
2017-02-02 12:37:08 -08:00
|
|
|
|
2017-02-27 16:07:43 -08:00
|
|
|
|
|
|
|
|
|
2017-02-02 12:37:08 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-02 12:37:11 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-27 16:07:43 -08:00
|
|
|
|
2017-02-02 12:37:11 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-02 12:37:08 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-27 16:07:43 -08:00
|
|
|
|
2017-02-02 12:37:08 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-27 16:07:43 -08:00
|
|
|
|
2017-02-02 12:37:08 -08:00
|
|
|
|
2017-02-27 16:07:43 -08:00
|
|
|
|
2017-02-02 12:37:08 -08:00
|
|
|
|
2017-02-02 12:37:11 -08:00
|
|
|
|
|
|
|
|
|
2017-02-27 16:07:43 -08:00
|
|
|
|
2017-02-02 12:37:11 -08:00
|
|
|
|
|
|
|
|
|
2017-02-02 12:37:08 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-21 10:12:04 -06:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-03-04 13:47:47 -08:00
|
|
|
|
2017-05-21 10:12:05 -06:00
|
|
|
|
|
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
2017-05-21 10:12:05 -06:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
|
|
|
|
|
2007-02-09 23:24:49 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2010-06-10 23:31:35 -07:00
|
|
|
|
2015-04-28 13:03:03 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
2011-12-28 20:19:20 -05:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2016-12-16 10:30:59 +02:00
|
|
|
|
|
|
|
|
|
2010-06-10 23:31:35 -07:00
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2017-02-02 12:37:08 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-17 03:29:28 -07:00
|
|
|
|
2006-08-23 17:18:26 -07:00
|
|
|
|
|
|
|
|
|
2012-07-11 23:43:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-05 16:34:51 +00:00
|
|
|
|
2012-07-12 00:05:02 -07:00
|
|
|
|
|
|
|
|
|
2012-07-11 23:43:53 -07:00
|
|
|
|
2013-05-28 20:34:26 +00:00
|
|
|
|
2013-01-05 16:34:51 +00:00
|
|
|
|
2012-07-11 23:43:53 -07:00
|
|
|
|
|
|
|
|
|
2012-07-12 00:05:02 -07:00
|
|
|
|
2012-07-11 23:43:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-05 16:34:51 +00:00
|
|
|
|
2012-07-11 23:43:53 -07:00
|
|
|
|
2013-01-05 16:34:51 +00:00
|
|
|
|
2012-07-12 00:05:02 -07:00
|
|
|
|
2012-07-11 23:43:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-12 00:05:02 -07:00
|
|
|
|
2013-01-05 16:34:51 +00:00
|
|
|
|
2012-07-11 23:43:53 -07:00
|
|
|
|
2013-01-05 16:34:51 +00:00
|
|
|
|
2012-07-11 23:43:53 -07:00
|
|
|
|
2012-07-12 00:05:02 -07:00
|
|
|
|
2012-07-11 23:43:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-15 21:20:23 +02:00
|
|
|
|
2012-07-11 23:43:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-12 00:05:02 -07:00
|
|
|
|
|
|
|
|
|
2012-07-11 23:43:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-12 00:05:02 -07:00
|
|
|
|
2015-11-02 01:24:38 +01:00
|
|
|
|
2012-07-12 00:05:02 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-06 23:14:16 +02:00
|
|
|
|
2012-07-12 00:05:02 -07:00
|
|
|
|
2013-01-05 16:34:51 +00:00
|
|
|
|
2012-07-11 23:43:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-15 21:20:23 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-15 21:20:23 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2015-05-22 20:56:05 -07:00
|
|
|
|
2011-12-03 18:02:47 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-08-03 14:13:46 +08:00
|
|
|
|
2011-11-21 03:39:03 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-08-22 00:00:45 -07:00
|
|
|
|
2017-06-17 10:42:33 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2010-06-10 23:31:35 -07:00
|
|
|
|
|
|
|
|
|
2013-01-05 16:34:51 +00:00
|
|
|
|
2013-01-14 09:28:27 +00:00
|
|
|
|
2006-07-30 20:43:36 -07:00
|
|
|
|
|
|
|
|
|
2011-12-03 18:02:47 -05:00
|
|
|
|
2012-07-12 00:05:02 -07:00
|
|
|
|
2006-08-22 00:00:21 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2017-06-17 10:42:33 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2012-07-11 23:43:53 -07:00
|
|
|
|
2012-07-12 00:05:02 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ipv6: Stop rt6_info from using inet_peer's metrics
inet_peer is indexed by the dst address alone. However, the fib6 tree
could have multiple routing entries (rt6_info) for the same dst. For
example,
1. A /128 dst via multiple gateways.
2. A RTF_CACHE route cloned from a /128 route.
In the above cases, all of them will share the same metrics and
step on each other.
This patch will steer away from inet_peer's metrics and use
dst_cow_metrics_generic() for everything.
Change Highlights:
1. Remove rt6_cow_metrics() which currently acquires metrics from
inet_peer for DST_HOST route (i.e. /128 route).
2. Add rt6i_pmtu to take care of the pmtu update to avoid creating a
full size metrics just to override the RTAX_MTU.
3. After (2), the RTF_CACHE route can also share the metrics with its
dst.from route, by:
dst_init_metrics(&cache_rt->dst, dst_metrics_ptr(cache_rt->dst.from), true);
4. Stop creating RTF_CACHE route by cloning another RTF_CACHE route. Instead,
directly clone from rt->dst.
[ Currently, cloning from another RTF_CACHE is only possible during
rt6_do_redirect(). Also, the old clone is removed from the tree
immediately after the new clone is added. ]
In case of cloning from an older redirect RTF_CACHE, it should work as
before.
In case of cloning from an older pmtu RTF_CACHE, this patch will forget
the pmtu and re-learn it (if there is any) from the redirected route.
The _rt6i_peer and DST_METRICS_FORCE_OVERWRITE will be removed
in the next cleanup patch.
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Reviewed-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-28 13:03:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-22 20:56:05 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2015-05-22 20:56:05 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2015-05-22 20:56:05 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2015-05-22 20:56:05 -07:00
|
|
|
|
|
|
|
|
|
2015-08-20 13:56:25 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2006-03-20 17:06:24 -08:00
|
|
|
|
2008-03-04 13:46:48 -08:00
|
|
|
|
2011-04-22 04:53:02 +00:00
|
|
|
|
2016-10-24 10:52:35 -07:00
|
|
|
|
|
|
|
|
|
2006-03-20 17:06:24 -08:00
|
|
|
|
2016-10-24 10:52:35 -07:00
|
|
|
|
|
|
|
|
|
2006-03-20 17:06:24 -08:00
|
|
|
|
|
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
2006-03-20 17:06:24 -08:00
|
|
|
|
2016-10-24 10:52:35 -07:00
|
|
|
|
2011-12-03 18:02:47 -05:00
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
|
|
|
|
|
2012-09-11 21:59:01 +00:00
|
|
|
|
2014-08-24 21:53:10 +01:00
|
|
|
|
2006-03-20 17:06:24 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-10 23:31:35 -07:00
|
|
|
|
2011-12-28 20:19:20 -05:00
|
|
|
|
2006-03-20 17:06:24 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-10 23:31:35 -07:00
|
|
|
|
2006-03-20 17:06:24 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-09-11 21:59:01 +00:00
|
|
|
|
2006-03-20 17:06:24 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-03-04 13:46:48 -08:00
|
|
|
|
2011-04-22 04:53:02 +00:00
|
|
|
|
2016-10-24 10:52:35 -07:00
|
|
|
|
|
|
|
|
|
2012-04-15 05:58:06 +00:00
|
|
|
|
2006-03-20 17:06:24 -08:00
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
2008-02-09 23:43:11 -08:00
|
|
|
|
2016-10-24 10:52:35 -07:00
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-08-03 14:13:46 +08:00
|
|
|
|
2012-09-07 20:12:54 +00:00
|
|
|
|
2008-03-04 13:46:48 -08:00
|
|
|
|
|
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
|
|
|
|
|
2016-10-24 10:52:35 -07:00
|
|
|
|
2011-11-21 03:39:03 +00:00
|
|
|
|
|
|
|
|
|
2006-03-20 17:06:24 -08:00
|
|
|
|
2006-03-20 17:06:42 -08:00
|
|
|
|
|
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
2006-03-20 17:06:24 -08:00
|
|
|
|
2017-05-21 10:12:04 -06:00
|
|
|
|
2006-03-20 17:06:24 -08:00
|
|
|
|
2016-10-24 10:52:35 -07:00
|
|
|
|
2006-03-20 17:06:24 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-04-22 04:53:02 +00:00
|
|
|
|
2007-02-09 23:24:49 +09:00
|
|
|
|
2016-10-24 10:52:35 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2016-10-24 10:52:35 -07:00
|
|
|
|
2011-12-03 18:02:47 -05:00
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2012-09-11 21:59:01 +00:00
|
|
|
|
2014-08-24 21:53:10 +01:00
|
|
|
|
2011-12-28 20:19:20 -05:00
|
|
|
|
2006-03-20 17:00:48 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-10 23:31:35 -07:00
|
|
|
|
2012-09-11 21:59:01 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-04-22 04:53:02 +00:00
|
|
|
|
2006-03-20 17:04:53 -08:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
2015-10-12 11:47:10 -07:00
|
|
|
|
2008-02-09 23:43:11 -08:00
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-08-03 14:13:46 +08:00
|
|
|
|
2012-09-07 20:12:54 +00:00
|
|
|
|
2008-03-04 13:47:47 -08:00
|
|
|
|
2008-03-25 21:47:49 +09:00
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2011-11-21 03:39:03 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2017-05-21 10:12:04 -06:00
|
|
|
|
2016-10-24 10:52:35 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-10-24 10:52:35 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
2010-06-10 23:31:35 -07:00
|
|
|
|
2013-03-03 20:46:46 +00:00
|
|
|
|
|
|
|
|
|
2010-06-10 23:31:35 -07:00
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
2006-08-22 00:00:21 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
2016-10-24 10:52:35 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2008-03-04 13:47:47 -08:00
|
|
|
|
|
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-12 11:47:10 -07:00
|
|
|
|
|
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-03-04 13:47:47 -08:00
|
|
|
|
2008-02-26 18:10:03 -08:00
|
|
|
|
2011-11-21 03:39:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
|
|
|
|
|
2008-03-04 13:47:47 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-08-24 21:53:10 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
net: Allow userns root to control ipv6
Allow an unpriviled user who has created a user namespace, and then
created a network namespace to effectively use the new network
namespace, by reducing capable(CAP_NET_ADMIN) and
capable(CAP_NET_RAW) calls to be ns_capable(net->user_ns,
CAP_NET_ADMIN), or capable(net->user_ns, CAP_NET_RAW) calls.
Settings that merely control a single network device are allowed.
Either the network device is a logical network device where
restrictions make no difference or the network device is hardware NIC
that has been explicity moved from the initial network namespace.
In general policy and network stack state changes are allowed while
resource control is left unchanged.
Allow the SIOCSIFADDR ioctl to add ipv6 addresses.
Allow the SIOCDIFADDR ioctl to delete ipv6 addresses.
Allow the SIOCADDRT ioctl to add ipv6 routes.
Allow the SIOCDELRT ioctl to delete ipv6 routes.
Allow creation of ipv6 raw sockets.
Allow setting the IPV6_JOIN_ANYCAST socket option.
Allow setting the IPV6_FL_A_RENEW parameter of the IPV6_FLOWLABEL_MGR
socket option.
Allow setting the IPV6_TRANSPARENT socket option.
Allow setting the IPV6_HOPOPTS socket option.
Allow setting the IPV6_RTHDRDSTOPTS socket option.
Allow setting the IPV6_DSTOPTS socket option.
Allow setting the IPV6_IPSEC_POLICY socket option.
Allow setting the IPV6_XFRM_POLICY socket option.
Allow sending packets with the IPV6_2292HOPOPTS control message.
Allow sending packets with the IPV6_2292DSTOPTS control message.
Allow sending packets with the IPV6_RTHDRDSTOPTS control message.
Allow setting the multicast routing socket options on non multicast
routing sockets.
Allow the SIOCADDTUNNEL, SIOCCHGTUNNEL, and SIOCDELTUNNEL ioctls for
setting up, changing and deleting tunnels over ipv6.
Allow the SIOCADDTUNNEL, SIOCCHGTUNNEL, SIOCDELTUNNEL ioctls for
setting up, changing and deleting ipv6 over ipv4 tunnels.
Allow the SIOCADDPRL, SIOCDELPRL, SIOCCHGPRL ioctls for adding,
deleting, and changing the potential router list for ISATAP tunnels.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-16 03:03:06 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
2008-03-04 13:47:47 -08:00
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-21 10:12:04 -06:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2017-05-21 10:12:04 -06:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-20 17:09:22 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-06-23 04:31:07 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-04-13 16:18:02 -07:00
|
|
|
|
2009-06-02 05:19:30 +00:00
|
|
|
|
2007-04-13 16:18:02 -07:00
|
|
|
|
|
|
|
|
|
2007-04-25 17:54:47 -07:00
|
|
|
|
2010-02-25 23:28:58 +00:00
|
|
|
|
2008-10-08 10:54:51 -07:00
|
|
|
|
|
|
|
|
|
2007-04-13 16:18:02 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-10-08 10:54:51 -07:00
|
|
|
|
|
|
|
|
|
2007-04-13 16:18:02 -07:00
|
|
|
|
|
|
|
|
|
2010-02-18 08:25:24 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-10-18 20:46:54 -07:00
|
|
|
|
|
|
|
|
|
2007-04-13 16:18:02 -07:00
|
|
|
|
2006-10-18 20:46:54 -07:00
|
|
|
|
|
|
|
|
|
2015-10-07 16:48:47 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2009-06-02 05:19:30 +00:00
|
|
|
|
2007-04-13 16:18:02 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2006-10-18 20:46:54 -07:00
|
|
|
|
|
|
|
|
|
2007-04-13 16:18:02 -07:00
|
|
|
|
2006-10-18 20:46:54 -07:00
|
|
|
|
|
|
|
|
|
2015-10-07 16:48:47 -05:00
|
|
|
|
2006-10-18 20:46:54 -07:00
|
|
|
|
2009-06-02 05:19:30 +00:00
|
|
|
|
2007-04-13 16:18:02 -07:00
|
|
|
|
2006-10-18 20:46:54 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-06 16:48:14 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2015-10-12 11:47:10 -07:00
|
|
|
|
2008-03-25 21:47:49 +09:00
|
|
|
|
2017-08-17 12:17:20 -07:00
|
|
|
|
2016-09-10 12:09:54 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-07 03:33:45 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-06-24 15:23:34 -07:00
|
|
|
|
2010-06-10 23:31:35 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2017-02-02 08:52:21 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-12-21 22:56:42 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2013-10-20 15:43:04 +03:00
|
|
|
|
2011-11-21 03:39:03 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2015-10-12 11:47:10 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-04-13 21:10:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-28 20:19:20 -05:00
|
|
|
|
2011-04-13 21:10:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-27 16:32:38 +08:00
|
|
|
|
2011-04-13 21:10:57 +00:00
|
|
|
|
|
|
|
|
|
2014-05-15 15:56:14 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-03-04 13:48:30 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-01-18 07:40:36 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2010-12-16 17:42:40 +00:00
|
|
|
|
|
|
|
|
|
2008-03-04 13:48:30 -08:00
|
|
|
|
2011-12-28 20:19:20 -05:00
|
|
|
|
2017-01-18 07:40:36 -08:00
|
|
|
|
|
|
|
|
|
2017-06-07 12:26:23 -06:00
|
|
|
|
2017-01-18 07:40:36 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2011-12-26 15:24:36 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-03-03 23:27:06 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-03-04 13:48:30 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-27 16:32:38 +08:00
|
|
|
|
2015-10-12 11:02:08 -05:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2012-04-15 05:58:06 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2012-04-15 05:58:06 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-03 18:02:47 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-01-07 23:53:00 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2011-12-28 20:19:20 -05:00
|
|
|
|
2016-11-04 14:51:54 -07:00
|
|
|
|
ipv6: Stop rt6_info from using inet_peer's metrics
inet_peer is indexed by the dst address alone. However, the fib6 tree
could have multiple routing entries (rt6_info) for the same dst. For
example,
1. A /128 dst via multiple gateways.
2. A RTF_CACHE route cloned from a /128 route.
In the above cases, all of them will share the same metrics and
step on each other.
This patch will steer away from inet_peer's metrics and use
dst_cow_metrics_generic() for everything.
Change Highlights:
1. Remove rt6_cow_metrics() which currently acquires metrics from
inet_peer for DST_HOST route (i.e. /128 route).
2. Add rt6i_pmtu to take care of the pmtu update to avoid creating a
full size metrics just to override the RTAX_MTU.
3. After (2), the RTF_CACHE route can also share the metrics with its
dst.from route, by:
dst_init_metrics(&cache_rt->dst, dst_metrics_ptr(cache_rt->dst.from), true);
4. Stop creating RTF_CACHE route by cloning another RTF_CACHE route. Instead,
directly clone from rt->dst.
[ Currently, cloning from another RTF_CACHE is only possible during
rt6_do_redirect(). Also, the old clone is removed from the tree
immediately after the new clone is added. ]
In case of cloning from an older redirect RTF_CACHE, it should work as
before.
In case of cloning from an older pmtu RTF_CACHE, this patch will forget
the pmtu and re-learn it (if there is any) from the redirected route.
The _rt6i_peer and DST_METRICS_FORCE_OVERWRITE will be removed
in the next cleanup patch.
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Reviewed-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-28 13:03:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-26 00:09:55 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-15 05:58:06 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-12-27 16:32:38 +08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2007-06-05 12:38:30 -07:00
|
|
|
|
2006-08-26 20:13:18 -07:00
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
2006-08-22 00:01:47 -07:00
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
|
|
|
|
|
2012-10-22 03:42:09 +00:00
|
|
|
|
2015-03-11 15:39:21 +01:00
|
|
|
|
2015-07-21 10:43:48 +02:00
|
|
|
|
|
|
|
|
|
2015-12-16 17:50:11 +08:00
|
|
|
|
2016-11-04 02:23:42 +09:00
|
|
|
|
2017-02-27 20:59:39 +08:00
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-21 10:12:04 -06:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
|
|
|
|
|
2015-03-11 15:39:21 +01:00
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2017-04-12 14:34:07 +02:00
|
|
|
|
|
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-09-05 02:12:42 +00:00
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
2012-09-05 02:12:42 +00:00
|
|
|
|
|
|
|
|
|
2012-09-06 05:53:35 +00:00
|
|
|
|
|
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
|
|
|
|
|
2010-09-27 00:07:02 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-28 13:03:03 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-09-07 20:12:54 +00:00
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
2008-03-26 02:26:21 +09:00
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
|
|
|
|
|
2015-03-29 16:59:26 +02:00
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
2011-04-13 21:10:57 +00:00
|
|
|
|
2015-03-29 16:59:26 +02:00
|
|
|
|
2011-04-13 21:10:57 +00:00
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-22 03:42:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-01-17 14:57:36 -08:00
|
|
|
|
|
|
|
|
|
2017-05-27 16:19:27 -06:00
|
|
|
|
2017-01-17 14:57:36 -08:00
|
|
|
|
|
|
|
|
|
2012-10-22 03:42:09 +00:00
|
|
|
|
|
|
|
|
|
2015-03-11 15:39:21 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-07-21 10:43:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-01-17 14:57:36 -08:00
|
|
|
|
2015-07-21 10:43:48 +02:00
|
|
|
|
|
|
|
|
|
2017-05-27 16:19:27 -06:00
|
|
|
|
2017-01-17 14:57:36 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-12-16 17:50:11 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2015-09-08 10:53:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-02 12:37:12 -08:00
|
|
|
|
2015-09-08 10:53:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-07-05 14:41:46 -06:00
|
|
|
|
2015-09-08 10:53:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-02 12:37:10 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-21 10:12:04 -06:00
|
|
|
|
|
|
|
|
|
2012-10-22 03:42:09 +00:00
|
|
|
|
2017-02-02 12:37:10 -08:00
|
|
|
|
|
|
|
|
|
2012-10-22 03:42:09 +00:00
|
|
|
|
|
|
|
|
|
2015-09-08 10:53:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-02 12:37:10 -08:00
|
|
|
|
2012-10-22 03:42:09 +00:00
|
|
|
|
|
|
|
|
|
2015-09-08 10:53:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-22 03:42:09 +00:00
|
|
|
|
2017-02-02 12:37:10 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-18 20:53:55 +02:00
|
|
|
|
2012-10-22 03:42:09 +00:00
|
|
|
|
|
|
|
|
|
2015-09-08 10:53:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-22 03:42:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-03-29 16:59:26 +02:00
|
|
|
|
2012-10-22 03:42:09 +00:00
|
|
|
|
|
|
|
|
|
2015-07-21 10:43:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-22 03:42:09 +00:00
|
|
|
|
2015-09-08 10:53:04 -07:00
|
|
|
|
2017-05-21 10:12:04 -06:00
|
|
|
|
2015-10-10 08:26:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-09-08 10:53:04 -07:00
|
|
|
|
2015-10-10 08:26:36 -07:00
|
|
|
|
2015-09-08 10:53:04 -07:00
|
|
|
|
|
|
|
|
|
2012-10-22 03:42:09 +00:00
|
|
|
|
2017-06-17 10:42:36 -07:00
|
|
|
|
2015-09-08 10:53:04 -07:00
|
|
|
|
2012-10-22 03:42:09 +00:00
|
|
|
|
2015-09-08 10:53:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-02 12:37:10 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-09-08 10:53:04 -07:00
|
|
|
|
|
|
|
|
|
2017-02-02 12:37:10 -08:00
|
|
|
|
2017-05-21 10:12:04 -06:00
|
|
|
|
2017-02-02 12:37:10 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-09-08 10:53:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-01 22:58:22 +00:00
|
|
|
|
2015-05-18 20:54:00 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-01 22:58:22 +00:00
|
|
|
|
2015-05-18 20:54:00 +02:00
|
|
|
|
|
|
|
|
|
2015-09-08 10:53:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-02 12:37:10 -08:00
|
|
|
|
|
|
|
|
|
2015-09-08 10:53:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-02 12:37:10 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-09-08 10:53:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-21 10:12:04 -06:00
|
|
|
|
2015-09-08 10:53:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-17 10:42:36 -07:00
|
|
|
|
|
|
|
|
|
2015-09-10 06:57:12 +08:00
|
|
|
|
2015-09-08 10:53:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-21 10:12:04 -06:00
|
|
|
|
|
|
|
|
|
2015-09-08 10:53:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-21 10:12:04 -06:00
|
|
|
|
2015-09-08 10:53:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-22 03:42:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-04-16 09:48:24 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2017-05-21 10:12:04 -06:00
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-22 03:42:09 +00:00
|
|
|
|
2017-05-21 10:12:04 -06:00
|
|
|
|
2017-02-02 12:37:08 -08:00
|
|
|
|
|
|
|
|
|
2017-05-21 10:12:04 -06:00
|
|
|
|
2017-02-02 12:37:08 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2017-04-16 09:48:24 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2017-05-21 10:12:04 -06:00
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-22 03:42:09 +00:00
|
|
|
|
2017-05-21 10:12:04 -06:00
|
|
|
|
2012-10-22 03:42:09 +00:00
|
|
|
|
2017-05-21 10:12:04 -06:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2017-02-02 12:37:09 -08:00
|
|
|
|
2006-11-10 14:10:15 -08:00
|
|
|
|
2017-02-02 12:37:09 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-11-10 14:10:15 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-01-23 22:09:41 -08:00
|
|
|
|
2015-01-05 23:57:47 +01:00
|
|
|
|
2015-03-11 15:39:21 +01:00
|
|
|
|
2015-07-21 10:43:48 +02:00
|
|
|
|
2017-02-02 12:37:09 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-03-06 15:57:31 -08:00
|
|
|
|
2017-02-02 12:37:09 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-08-15 09:09:49 +02:00
|
|
|
|
2017-08-03 13:28:20 +02:00
|
|
|
|
|
|
|
|
|
2017-03-06 15:57:31 -08:00
|
|
|
|
|
|
|
|
|
2017-02-02 12:37:09 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-03-06 15:57:31 -08:00
|
|
|
|
2017-02-02 12:37:09 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-03-06 15:57:31 -08:00
|
|
|
|
2017-02-02 12:37:09 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-11-10 14:10:15 -08:00
|
|
|
|
|
|
|
|
|
2008-08-14 15:33:21 -07:00
|
|
|
|
|
|
|
|
|
2005-06-21 13:51:04 -07:00
|
|
|
|
2012-09-07 20:12:54 +00:00
|
|
|
|
2017-01-17 15:51:08 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
ipv6: Stop rt6_info from using inet_peer's metrics
inet_peer is indexed by the dst address alone. However, the fib6 tree
could have multiple routing entries (rt6_info) for the same dst. For
example,
1. A /128 dst via multiple gateways.
2. A RTF_CACHE route cloned from a /128 route.
In the above cases, all of them will share the same metrics and
step on each other.
This patch will steer away from inet_peer's metrics and use
dst_cow_metrics_generic() for everything.
Change Highlights:
1. Remove rt6_cow_metrics() which currently acquires metrics from
inet_peer for DST_HOST route (i.e. /128 route).
2. Add rt6i_pmtu to take care of the pmtu update to avoid creating a
full size metrics just to override the RTAX_MTU.
3. After (2), the RTF_CACHE route can also share the metrics with its
dst.from route, by:
dst_init_metrics(&cache_rt->dst, dst_metrics_ptr(cache_rt->dst.from), true);
4. Stop creating RTF_CACHE route by cloning another RTF_CACHE route. Instead,
directly clone from rt->dst.
[ Currently, cloning from another RTF_CACHE is only possible during
rt6_do_redirect(). Also, the old clone is removed from the tree
immediately after the new clone is added. ]
In case of cloning from an older redirect RTF_CACHE, it should work as
before.
In case of cloning from an older pmtu RTF_CACHE, this patch will forget
the pmtu and re-learn it (if there is any) from the redirected route.
The _rt6i_peer and DST_METRICS_FORCE_OVERWRITE will be removed
in the next cleanup patch.
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Reviewed-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-28 13:03:06 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-08-22 00:01:27 -07:00
|
|
|
|
2006-11-27 09:27:07 -08:00
|
|
|
|
2006-08-10 23:09:48 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2012-09-07 20:12:54 +00:00
|
|
|
|
2011-12-03 18:02:47 -05:00
|
|
|
|
2007-01-31 23:16:40 -08:00
|
|
|
|
2006-08-22 00:01:27 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
2006-08-10 23:09:48 -07:00
|
|
|
|
2006-08-04 23:20:06 -07:00
|
|
|
|
2006-08-10 23:09:48 -07:00
|
|
|
|
|
|
|
|
|
2012-04-01 20:27:33 -04:00
|
|
|
|
|
|
|
|
|
2012-09-05 02:12:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-09-06 05:53:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-09-05 02:12:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-03 18:02:47 -05:00
|
|
|
|
2010-09-27 00:07:02 +00:00
|
|
|
|
2017-03-15 18:14:33 -07:00
|
|
|
|
|
|
|
|
|
2011-12-28 20:19:20 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-03 18:02:47 -05:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-03-29 16:59:25 +02:00
|
|
|
|
2012-04-01 20:27:33 -04:00
|
|
|
|
2007-02-09 23:24:49 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2015-03-29 16:59:25 +02:00
|
|
|
|
2012-04-01 20:27:33 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2015-03-29 16:59:25 +02:00
|
|
|
|
2012-04-01 20:27:33 -04:00
|
|
|
|
2007-02-09 23:24:49 +09:00
|
|
|
|
2012-04-01 20:27:33 -04:00
|
|
|
|
2015-03-29 16:59:25 +02:00
|
|
|
|
2012-04-01 20:27:33 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-04-03 09:22:53 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-01-17 15:51:07 -08:00
|
|
|
|
2016-09-25 23:08:31 +02:00
|
|
|
|
2017-01-17 15:51:07 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-04-03 09:22:53 +09:00
|
|
|
|
|
|
|
|
|
2012-04-01 20:27:33 -04:00
|
|
|
|
|
|
|
|
|
2008-04-03 09:22:53 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2012-04-01 20:27:33 -04:00
|
|
|
|
2015-03-29 16:59:25 +02:00
|
|
|
|
2012-04-01 20:27:33 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-08-22 00:01:27 -07:00
|
|
|
|
2011-04-13 21:10:57 +00:00
|
|
|
|
|
|
|
|
|
2011-11-21 03:39:03 +00:00
|
|
|
|
2015-03-29 16:59:25 +02:00
|
|
|
|
2012-04-01 20:27:33 -04:00
|
|
|
|
2011-04-13 21:10:57 +00:00
|
|
|
|
|
|
|
|
|
ipv6: Stop rt6_info from using inet_peer's metrics
inet_peer is indexed by the dst address alone. However, the fib6 tree
could have multiple routing entries (rt6_info) for the same dst. For
example,
1. A /128 dst via multiple gateways.
2. A RTF_CACHE route cloned from a /128 route.
In the above cases, all of them will share the same metrics and
step on each other.
This patch will steer away from inet_peer's metrics and use
dst_cow_metrics_generic() for everything.
Change Highlights:
1. Remove rt6_cow_metrics() which currently acquires metrics from
inet_peer for DST_HOST route (i.e. /128 route).
2. Add rt6i_pmtu to take care of the pmtu update to avoid creating a
full size metrics just to override the RTAX_MTU.
3. After (2), the RTF_CACHE route can also share the metrics with its
dst.from route, by:
dst_init_metrics(&cache_rt->dst, dst_metrics_ptr(cache_rt->dst.from), true);
4. Stop creating RTF_CACHE route by cloning another RTF_CACHE route. Instead,
directly clone from rt->dst.
[ Currently, cloning from another RTF_CACHE is only possible during
rt6_do_redirect(). Also, the old clone is removed from the tree
immediately after the new clone is added. ]
In case of cloning from an older redirect RTF_CACHE, it should work as
before.
In case of cloning from an older pmtu RTF_CACHE, this patch will forget
the pmtu and re-learn it (if there is any) from the redirected route.
The _rt6i_peer and DST_METRICS_FORCE_OVERWRITE will be removed
in the next cleanup patch.
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Reviewed-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-28 13:03:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-08-22 00:01:27 -07:00
|
|
|
|
|
|
|
|
|
2012-04-01 20:27:33 -04:00
|
|
|
|
|
|
|
|
|
2012-07-29 16:01:30 +00:00
|
|
|
|
2017-02-02 12:37:09 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-03-06 15:57:31 -08:00
|
|
|
|
2017-02-02 12:37:09 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-29 16:01:30 +00:00
|
|
|
|
2008-05-19 16:55:13 -07:00
|
|
|
|
2012-07-10 05:06:14 -07:00
|
|
|
|
2006-11-27 09:27:07 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2015-03-11 15:39:21 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-07-21 10:43:48 +02:00
|
|
|
|
2015-01-16 22:09:00 +01:00
|
|
|
|
|
|
|
|
|
2006-08-22 00:01:27 -07:00
|
|
|
|
|
|
|
|
|
2007-01-31 23:16:40 -08:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2006-08-10 23:11:17 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2017-01-26 13:54:08 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-08-22 00:01:27 -07:00
|
|
|
|
|
|
|
|
|
2017-01-17 15:51:08 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2017-01-26 13:54:08 -08:00
|
|
|
|
2008-08-14 15:33:21 -07:00
|
|
|
|
2012-09-07 20:12:54 +00:00
|
|
|
|
2017-01-17 15:51:08 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2017-04-16 09:48:24 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-03-26 02:26:21 +09:00
|
|
|
|
2006-08-22 00:01:47 -07:00
|
|
|
|
2017-05-25 10:42:40 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-08-22 00:01:47 -07:00
|
|
|
|
|
|
|
|
|
2011-03-12 16:22:43 -05:00
|
|
|
|
2017-05-25 10:42:40 -07:00
|
|
|
|
2006-08-22 00:01:47 -07:00
|
|
|
|
2017-04-12 14:34:07 +02:00
|
|
|
|
2017-04-16 09:48:24 -07:00
|
|
|
|
2006-08-22 00:01:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-12 16:22:43 -05:00
|
|
|
|
2016-06-11 20:08:19 +02:00
|
|
|
|
|
|
|
|
|
2017-05-25 10:42:40 -07:00
|
|
|
|
2006-08-22 00:01:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-11-21 03:39:03 +00:00
|
|
|
|
2006-08-22 00:01:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-11-21 03:39:03 +00:00
|
|
|
|
2006-08-22 00:01:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 04:03:45 +00:00
|
|
|
|
2006-08-22 00:01:47 -07:00
|
|
|
|
2014-05-15 16:38:41 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-04 02:23:42 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-08-22 00:01:47 -07:00
|
|
|
|
|
|
|
|
|
2012-04-01 04:03:45 +00:00
|
|
|
|
|
|
|
|
|
2017-08-15 16:34:42 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-08-22 00:01:47 -07:00
|
|
|
|
2017-08-15 16:34:42 +02:00
|
|
|
|
2006-08-22 00:01:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-01 04:03:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-20 12:28:25 +02:00
|
|
|
|
2017-08-15 16:34:42 +02:00
|
|
|
|
|
|
|
|
|
2012-04-01 04:03:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-20 12:28:25 +02:00
|
|
|
|
2017-05-25 10:42:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-08-22 00:01:47 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2017-03-01 20:48:39 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-20 12:28:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2011-12-03 18:02:47 -05:00
|
|
|
|
2012-10-29 00:13:19 +00:00
|
|
|
|
2006-08-22 00:01:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2010-06-10 23:31:35 -07:00
|
|
|
|
2017-05-25 10:42:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-08-22 00:01:47 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2012-09-07 20:12:54 +00:00
|
|
|
|
2006-08-22 00:01:47 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-09-13 10:18:33 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2008-03-04 13:47:47 -08:00
|
|
|
|
2007-12-13 09:45:12 -08:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-12-13 09:45:12 -08:00
|
|
|
|
2011-12-03 18:02:47 -05:00
|
|
|
|
2006-08-22 00:01:08 -07:00
|
|
|
|
2015-07-21 10:43:48 +02:00
|
|
|
|
2011-12-03 18:02:47 -05:00
|
|
|
|
2006-08-15 00:35:24 -07:00
|
|
|
|
|
|
|
|
|
2008-08-14 15:33:21 -07:00
|
|
|
|
2017-01-17 15:51:08 -08:00
|
|
|
|
2007-01-31 23:16:40 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-09-07 20:12:54 +00:00
|
|
|
|
2009-02-24 23:18:28 -08:00
|
|
|
|
|
|
|
|
|
2006-08-15 00:35:24 -07:00
|
|
|
|
|
|
|
|
|
2008-03-04 13:47:47 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2008-03-04 13:48:30 -08:00
|
|
|
|
2013-05-28 01:30:21 +00:00
|
|
|
|
2008-03-04 13:48:30 -08:00
|
|
|
|
2013-05-28 01:30:21 +00:00
|
|
|
|
2008-03-25 21:47:49 +09:00
|
|
|
|
2008-03-04 13:48:30 -08:00
|
|
|
|
2017-05-08 10:12:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-10 23:31:35 -07:00
|
|
|
|
2008-03-04 13:48:30 -08:00
|
|
|
|
|
|
|
|
|
2010-06-10 23:31:35 -07:00
|
|
|
|
2008-03-04 13:48:30 -08:00
|
|
|
|
2010-06-10 23:31:35 -07:00
|
|
|
|
2008-03-04 13:48:30 -08:00
|
|
|
|
2017-05-08 10:12:13 -07:00
|
|
|
|
2017-06-20 11:42:27 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-08-15 04:09:51 -07:00
|
|
|
|
2017-05-08 10:12:13 -07:00
|
|
|
|
2017-08-15 04:09:51 -07:00
|
|
|
|
|
|
|
|
|
2008-03-04 13:48:30 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-11-06 05:27:11 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-09-21 16:55:59 +02:00
|
|
|
|
2007-11-06 05:27:11 -08:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2008-03-04 13:46:23 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-03-04 13:46:23 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-10-08 06:37:34 +00:00
|
|
|
|
2008-03-04 13:46:23 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-18 04:07:21 -07:00
|
|
|
|
2008-03-04 13:46:23 -08:00
|
|
|
|
|
|
|
|
|
2007-02-12 00:55:35 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-18 04:07:44 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-11 23:04:25 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2011-02-24 19:48:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2011-02-24 19:48:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-01 10:04:14 +02:00
|
|
|
|
2011-02-24 19:48:03 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2013-06-11 23:04:25 -07:00
|
|
|
|
2007-02-09 23:24:49 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-01-10 03:01:01 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-04-28 12:11:49 -07:00
|
|
|
|
2008-11-03 18:21:05 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-03-04 13:48:53 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2008-11-03 18:21:05 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-10 03:01:01 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2008-11-03 18:21:05 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-10 03:01:01 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2008-11-03 18:21:05 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-10 03:01:01 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2008-11-03 18:21:05 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-10 03:01:01 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2008-11-03 18:21:05 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-10 03:01:01 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2010-08-14 22:42:51 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-10 03:01:01 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2008-11-03 18:21:05 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-10 03:01:01 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2010-08-14 22:42:51 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-10 03:01:01 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2008-11-03 18:21:05 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2009-11-05 13:32:03 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2010-01-17 03:35:32 +00:00
|
|
|
|
2008-01-10 02:53:43 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-28 00:24:28 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-02-24 19:48:03 +00:00
|
|
|
|
2009-08-29 01:34:49 +00:00
|
|
|
|
2008-02-28 00:24:28 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-18 20:11:03 -08:00
|
|
|
|
2012-11-16 03:02:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-28 00:24:28 +09:00
|
|
|
|
|
|
|
|
|
2008-01-10 02:53:43 -08:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2010-01-17 03:35:32 +00:00
|
|
|
|
2008-03-04 13:45:33 -08:00
|
|
|
|
2008-04-21 14:25:23 -07:00
|
|
|
|
2008-03-04 13:48:30 -08:00
|
|
|
|
2009-08-29 01:34:49 +00:00
|
|
|
|
|
|
|
|
|
2008-03-04 13:49:23 -08:00
|
|
|
|
2010-10-08 06:37:34 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-03-04 13:48:30 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-10-08 06:37:34 +00:00
|
|
|
|
2010-06-10 23:31:35 -07:00
|
|
|
|
2008-03-04 13:48:30 -08:00
|
|
|
|
2010-06-10 23:31:35 -07:00
|
|
|
|
net: Implement read-only protection and COW'ing of metrics.
Routing metrics are now copy-on-write.
Initially a route entry points it's metrics at a read-only location.
If a routing table entry exists, it will point there. Else it will
point at the all zero metric place-holder called 'dst_default_metrics'.
The writeability state of the metrics is stored in the low bits of the
metrics pointer, we have two bits left to spare if we want to store
more states.
For the initial implementation, COW is implemented simply via kmalloc.
However future enhancements will change this to place the writable
metrics somewhere else, in order to increase sharing. Very likely
this "somewhere else" will be the inetpeer cache.
Note also that this means that metrics updates may transiently fail
if we cannot COW the metrics successfully.
But even by itself, this patch should decrease memory usage and
increase cache locality especially for routing workloads. In those
cases the read-only metric copies stay in place and never get written
to.
TCP workloads where metrics get updated, and those rare cases where
PMTU triggers occur, will take a very slight performance hit. But
that hit will be alleviated when the long-term writable metrics
move to a more sharable location.
Since the metrics storage went from a u32 array of RTAX_MAX entries to
what is essentially a pointer, some retooling of the dst_entry layout
was necessary.
Most importantly, we need to preserve the alignment of the reference
count so that it doesn't share cache lines with the read-mostly state,
as per Eric Dumazet's alignment assertion checks.
The only non-trivial bit here is the move of the 'flags' member into
the writeable cacheline. This is OK since we are always accessing the
flags around the same moment when we made a modification to the
reference count.
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-26 20:51:05 -08:00
|
|
|
|
|
|
|
|
|
2008-03-04 13:48:30 -08:00
|
|
|
|
|
|
|
|
|
2017-08-08 20:23:49 +02:00
|
|
|
|
2008-03-04 13:48:30 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-10-07 14:12:10 -07:00
|
|
|
|
|
|
|
|
|
2010-06-10 23:31:35 -07:00
|
|
|
|
2008-03-04 13:48:30 -08:00
|
|
|
|
2010-06-10 23:31:35 -07:00
|
|
|
|
net: Implement read-only protection and COW'ing of metrics.
Routing metrics are now copy-on-write.
Initially a route entry points it's metrics at a read-only location.
If a routing table entry exists, it will point there. Else it will
point at the all zero metric place-holder called 'dst_default_metrics'.
The writeability state of the metrics is stored in the low bits of the
metrics pointer, we have two bits left to spare if we want to store
more states.
For the initial implementation, COW is implemented simply via kmalloc.
However future enhancements will change this to place the writable
metrics somewhere else, in order to increase sharing. Very likely
this "somewhere else" will be the inetpeer cache.
Note also that this means that metrics updates may transiently fail
if we cannot COW the metrics successfully.
But even by itself, this patch should decrease memory usage and
increase cache locality especially for routing workloads. In those
cases the read-only metric copies stay in place and never get written
to.
TCP workloads where metrics get updated, and those rare cases where
PMTU triggers occur, will take a very slight performance hit. But
that hit will be alleviated when the long-term writable metrics
move to a more sharable location.
Since the metrics storage went from a u32 array of RTAX_MAX entries to
what is essentially a pointer, some retooling of the dst_entry layout
was necessary.
Most importantly, we need to preserve the alignment of the reference
count so that it doesn't share cache lines with the read-mostly state,
as per Eric Dumazet's alignment assertion checks.
The only non-trivial bit here is the move of the 'flags' member into
the writeable cacheline. This is OK since we are always accessing the
flags around the same moment when we made a modification to the
reference count.
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-26 20:51:05 -08:00
|
|
|
|
|
|
|
|
|
2008-03-04 13:48:30 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-10-07 14:12:10 -07:00
|
|
|
|
|
|
|
|
|
2010-06-10 23:31:35 -07:00
|
|
|
|
2008-03-04 13:48:30 -08:00
|
|
|
|
2010-06-10 23:31:35 -07:00
|
|
|
|
net: Implement read-only protection and COW'ing of metrics.
Routing metrics are now copy-on-write.
Initially a route entry points it's metrics at a read-only location.
If a routing table entry exists, it will point there. Else it will
point at the all zero metric place-holder called 'dst_default_metrics'.
The writeability state of the metrics is stored in the low bits of the
metrics pointer, we have two bits left to spare if we want to store
more states.
For the initial implementation, COW is implemented simply via kmalloc.
However future enhancements will change this to place the writable
metrics somewhere else, in order to increase sharing. Very likely
this "somewhere else" will be the inetpeer cache.
Note also that this means that metrics updates may transiently fail
if we cannot COW the metrics successfully.
But even by itself, this patch should decrease memory usage and
increase cache locality especially for routing workloads. In those
cases the read-only metric copies stay in place and never get written
to.
TCP workloads where metrics get updated, and those rare cases where
PMTU triggers occur, will take a very slight performance hit. But
that hit will be alleviated when the long-term writable metrics
move to a more sharable location.
Since the metrics storage went from a u32 array of RTAX_MAX entries to
what is essentially a pointer, some retooling of the dst_entry layout
was necessary.
Most importantly, we need to preserve the alignment of the reference
count so that it doesn't share cache lines with the read-mostly state,
as per Eric Dumazet's alignment assertion checks.
The only non-trivial bit here is the move of the 'flags' member into
the writeable cacheline. This is OK since we are always accessing the
flags around the same moment when we made a modification to the
reference count.
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-26 20:51:05 -08:00
|
|
|
|
|
|
|
|
|
2008-03-04 13:48:30 -08:00
|
|
|
|
|
|
|
|
|
2008-10-07 14:15:00 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-03-04 13:49:47 -08:00
|
|
|
|
|
|
|
|
|
2008-03-04 13:48:30 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-03-04 13:49:23 -08:00
|
|
|
|
2008-10-07 14:12:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-10-08 06:37:34 +00:00
|
|
|
|
|
|
|
|
|
2008-03-04 13:49:23 -08:00
|
|
|
|
|
|
|
|
|
2008-03-04 13:45:33 -08:00
|
|
|
|
|
|
|
|
|
2010-01-17 03:35:32 +00:00
|
|
|
|
2008-03-04 13:45:33 -08:00
|
|
|
|
2008-03-04 13:48:30 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
net dst: fix percpu_counter list corruption and poison overwritten
There're some percpu_counter list corruption and poison overwritten warnings
in recent kernel, which is resulted by fc66f95c.
commit fc66f95c switches to use percpu_counter, in ip6_route_net_init, kernel
init the percpu_counter for dst entries, but, the percpu_counter is never destroyed
in ip6_route_net_exit. So if the related data is freed by kernel, the freed percpu_counter
is still on the list, then if we insert/remove other percpu_counter, list corruption
resulted. Also, if the insert/remove option modifies the ->prev,->next pointer of
the freed value, the poison overwritten is resulted then.
With the following patch, the percpu_counter list corruption and poison overwritten
warnings disappeared.
Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Cc: "Pekka Savola (ipv6)" <pekkas@netcore.fi>
Cc: James Morris <jmorris@namei.org>
Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Cc: Patrick McHardy <kaber@trash.net>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-11-02 16:11:05 +00:00
|
|
|
|
2008-03-04 13:45:33 -08:00
|
|
|
|
|
|
|
|
|
2012-06-18 12:08:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-18 01:34:54 +00:00
|
|
|
|
|
|
|
|
|
2012-06-18 12:08:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-18 01:34:56 +00:00
|
|
|
|
|
|
|
|
|
2012-06-18 12:08:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-03-04 13:45:33 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-09 16:27:05 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-09 16:32:41 -07:00
|
|
|
|
2012-06-09 16:27:05 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-09 19:00:16 -07:00
|
|
|
|
2012-06-09 16:27:05 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-18 12:08:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-03-04 13:48:30 -08:00
|
|
|
|
|
|
|
|
|
2017-05-08 10:12:13 -07:00
|
|
|
|
2008-03-04 13:48:30 -08:00
|
|
|
|
|
|
|
|
|
2017-05-03 22:07:31 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-12-07 00:43:48 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-12-07 00:43:48 -08:00
|
|
|
|
2015-05-22 20:56:04 -07:00
|
|
|
|
2007-12-07 00:43:48 -08:00
|
|
|
|
2008-03-04 13:48:53 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-01-07 18:09:08 -08:00
|
|
|
|
2007-05-24 18:17:54 -07:00
|
|
|
|
2010-10-08 06:37:34 +00:00
|
|
|
|
2008-03-04 13:48:30 -08:00
|
|
|
|
2008-03-04 13:48:10 -08:00
|
|
|
|
|
|
|
|
|
2012-06-09 16:27:05 -07:00
|
|
|
|
|
|
|
|
|
2012-06-16 01:12:19 -07:00
|
|
|
|
2012-06-14 23:00:17 +00:00
|
|
|
|
2012-06-15 15:51:55 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-09 16:27:05 -07:00
|
|
|
|
2008-10-01 02:37:56 -07:00
|
|
|
|
|
|
|
|
|
2012-06-16 01:12:19 -07:00
|
|
|
|
2007-12-07 00:43:48 -08:00
|
|
|
|
2008-03-04 13:48:30 -08:00
|
|
|
|
2007-12-07 00:43:48 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-16 01:12:19 -07:00
|
|
|
|
2007-12-08 00:14:11 -08:00
|
|
|
|
2007-12-07 00:43:48 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-12-08 00:14:54 -08:00
|
|
|
|
2012-06-18 12:08:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-12-07 00:43:48 -08:00
|
|
|
|
2017-08-09 20:41:48 +02:00
|
|
|
|
|
|
|
|
|
2017-08-15 16:34:43 +02:00
|
|
|
|
|
|
|
|
|
2012-06-18 12:08:33 +00:00
|
|
|
|
2007-12-07 00:43:48 -08:00
|
|
|
|
2008-03-04 13:48:30 -08:00
|
|
|
|
2008-03-04 13:45:33 -08:00
|
|
|
|
2012-06-18 12:08:33 +00:00
|
|
|
|
2008-03-04 13:48:30 -08:00
|
|
|
|
2015-05-22 20:56:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-12-07 00:43:48 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-18 12:08:33 +00:00
|
|
|
|
|
|
|
|
|
2007-12-07 00:43:48 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-14 23:00:17 +00:00
|
|
|
|
|
|
|
|
|
2008-03-04 13:48:30 -08:00
|
|
|
|
|
|
|
|
|
2012-06-15 15:51:55 -07:00
|
|
|
|
|
|
|
|
|
2010-10-08 06:37:34 +00:00
|
|
|
|
|
|
|
|
|
2007-12-07 00:43:48 -08:00
|
|
|
|
2008-03-04 13:49:23 -08:00
|
|
|
|
2007-12-07 00:43:48 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-03-04 13:48:30 -08:00
|
|
|
|
2012-06-18 12:08:33 +00:00
|
|
|
|
2006-08-04 03:39:02 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2012-06-09 16:27:05 -07:00
|
|
|
|
2008-03-04 13:48:30 -08:00
|
|
|
|
net dst: fix percpu_counter list corruption and poison overwritten
There're some percpu_counter list corruption and poison overwritten warnings
in recent kernel, which is resulted by fc66f95c.
commit fc66f95c switches to use percpu_counter, in ip6_route_net_init, kernel
init the percpu_counter for dst entries, but, the percpu_counter is never destroyed
in ip6_route_net_exit. So if the related data is freed by kernel, the freed percpu_counter
is still on the list, then if we insert/remove other percpu_counter, list corruption
resulted. Also, if the insert/remove option modifies the ->prev,->next pointer of
the freed value, the poison overwritten is resulted then.
With the following patch, the percpu_counter list corruption and poison overwritten
warnings disappeared.
Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Cc: "Pekka Savola (ipv6)" <pekkas@netcore.fi>
Cc: James Morris <jmorris@namei.org>
Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Cc: Patrick McHardy <kaber@trash.net>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-11-02 16:11:05 +00:00
|
|
|
|
2008-03-04 13:49:23 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|