On Thu, Nov 29, 2018 at 2:28 AM Eric Dumazet wrote:
>
> Wei Wang added these fields in linux-4.19
>
> Tested:
>
> ss -ti ...
>
> ts sack cubic wscale:8,8 rto:7 rtt:2.678/0.267 mss:1428 pmtu:1500
> rcvmss:536 advmss:1428 cwnd:91 ssthresh:65
> (*) bytes_
From: Wei Wang
In rawv6_send_hdrinc(), in order to avoid an extra dst_hold(), we
directly assign the dst to skb and set passed in dst to NULL to avoid
double free.
However, in error case, we free skb and then do stats update with the
dst pointer passed in. This causes use-after-free on the dst
On Tue, Sep 18, 2018 at 4:25 PM David Ahern wrote:
>
> On 9/18/18 1:45 PM, Wei Wang wrote:
> > From: Wei Wang
> >
> > When dst->_metrics and f6i->fib6_metrics share the same memory, both
> > take reference count on the dst_metrics structure. However, when d
From: Wei Wang
When dst->_metrics and f6i->fib6_metrics share the same memory, both
take reference count on the dst_metrics structure. However, when dst is
destroyed, ip6_dst_destroy() only invokes dst_destroy_metrics_generic()
which does not take care of READONLY metrics and does not r
From: Wei Wang
This reverts commit e70a3aad44cc8b24986687ffc98c4a4f6ecf25ea.
This change causes use-after-free on dst->_metrics.
The crash trace looks like this:
[ 97.763269] BUG: KASAN: use-after-free in ip6_mtu+0x116/0x140
[ 97.769038] Read of size 4 at addr 881781d2cf84 by t
From: Wei Wang
The latest fix on the memory leak of fib6_metrics still causes
use-after-free.
This patch series first revert the previous fix and propose a new fix
that is more inline with ipv4 logic and is tested to fix the
use-after-free issue reported.
Wei Wang (2):
Revert "ipv6
On Tue, Sep 4, 2018 at 11:11 PM Song Liu wrote:
>
> We are debugging an issue with fib6_node_lookup_1().
>
> We use a 4.16 based kernel, and we have back ported most upstream
> patches in ip6_fib.{c.h}. The only major differences I can spot are
>
> 8b7f2731bd68d83940714ce92381d1a72596407c
>
From: Wei Wang
In l2tp code, if it is a L2TP_UDP_ENCAP tunnel, tunnel->sk points to a
UDP socket. User could call sendmsg() on both this tunnel and the UDP
socket itself concurrently. As l2tp_xmit_skb() holds socket lock and call
__sk_dst_check() to refresh sk->sk_dst_cache, while udpv6_s
From: Wei Wang
In l2tp code, if it is a L2TP_UDP_ENCAP tunnel, tunnel->sk points to a
UDP socket. User could call sendmsg() on both this tunnel and the UDP
socket itself concurrently. As l2tp_xmit_skb() holds socket lock and call
__sk_dst_check() to refresh sk->sk_dst_cache, while udpv6_s
From: Wei Wang
This patch series adds 3 RFC4898 stats:
1. tcpEStatsPerfHCDataOctetsOut
2. tcpEStatsPerfOctetsRetrans
3. tcpEStatsStackDSACKDups
and an addtional stat to record the number of data packet reordering
events seen:
4. tcp_reord_seen
Together with the existing stats, application can
From: Wei Wang
Introduce a new TCP stats to record the number of reordering events seen
and expose it in both tcp_info (TCP_INFO) and opt_stats
(SOF_TIMESTAMPING_OPT_STATS).
Application can use this stats to track the frequency of the reordering
events in addition to the existing reordering
From: Wei Wang
Introduce a new TCP stat to record the number of bytes sent
(RFC4898 tcpEStatsPerfHCDataOctetsOut) and expose it in both tcp_info
(TCP_INFO) and opt_stats (SOF_TIMESTAMPING_OPT_STATS).
Signed-off-by: Wei Wang
Signed-off-by: Eric Dumazet
Acked-by: Neal Cardwell
Acked-by: Soheil
From: Wei Wang
Introduce a new TCP stat to record the number of DSACK blocks received
(RFC4989 tcpEStatsStackDSACKDups) and expose it in both tcp_info
(TCP_INFO) and opt_stats (SOF_TIMESTAMPING_OPT_STATS).
Signed-off-by: Wei Wang
Signed-off-by: Eric Dumazet
Acked-by: Neal Cardwell
Acked
From: Wei Wang
Introduce a new TCP stat to record the number of bytes retransmitted
(RFC4898 tcpEStatsPerfOctetsRetrans) and expose it in both tcp_info
(TCP_INFO) and opt_stats (SOF_TIMESTAMPING_OPT_STATS).
Signed-off-by: Wei Wang
Signed-off-by: Eric Dumazet
Acked-by: Neal Cardwell
Acked
From: Wei Wang
This is to refactor the calculation of the size of opt_stats to a helper
function to make the code cleaner and easier for later changes.
Suggested-by: Stephen Hemminger
Signed-off-by: Wei Wang
Signed-off-by: Eric Dumazet
Acked-by: Neal Cardwell
Acked-by: Soheil Hassas Yeganeh
On Mon, Jul 30, 2018 at 3:14 PM Stephen Hemminger
wrote:
>
> On Mon, 30 Jul 2018 14:59:09 -0700
> Wei Wang wrote:
>
> > + stats = alloc_skb(9 * nla_total_size_64bit(sizeof(u64)) +
> > 7 * nla_total_size(sizeof(u32)) +
> >
From: Wei Wang
This patch series adds 3 RFC4898 stats:
1. tcpEStatsPerfHCDataOctetsOut
2. tcpEStatsPerfOctetsRetrans
3. tcpEStatsStackDSACKDups
and an addtional stat to record the number of data packet reordering
events seen:
4. tcp_reord_seen
Together with the existing stats, application can
From: Wei Wang
Introduce a new TCP stat to record the number of bytes retransmitted
(RFC4898 tcpEStatsPerfOctetsRetrans) and expose it in both tcp_info
(TCP_INFO) and opt_stats (SOF_TIMESTAMPING_OPT_STATS).
Signed-off-by: Wei Wang
Signed-off-by: Eric Dumazet
Acked-by: Neal Cardwell
Acked
From: Wei Wang
Introduce a new TCP stat to record the number of bytes sent
(RFC4898 tcpEStatsPerfHCDataOctetsOut) and expose it in both tcp_info
(TCP_INFO) and opt_stats (SOF_TIMESTAMPING_OPT_STATS).
Signed-off-by: Wei Wang
Signed-off-by: Eric Dumazet
Acked-by: Neal Cardwell
Acked-by: Soheil
From: Wei Wang
Introduce a new TCP stat to record the number of DSACK blocks received
(RFC4989 tcpEStatsStackDSACKDups) and expose it in both tcp_info
(TCP_INFO) and opt_stats (SOF_TIMESTAMPING_OPT_STATS).
Signed-off-by: Wei Wang
Signed-off-by: Eric Dumazet
Acked-by: Neal Cardwell
Acked
From: Wei Wang
Introduce a new TCP stats to record the number of reordering events seen
and expose it in both tcp_info (TCP_INFO) and opt_stats
(SOF_TIMESTAMPING_OPT_STATS).
Application can use this stats to track the frequency of the reordering
events in addition to the existing reordering
From: Wei Wang
In the code path where only rcu read lock is held, e.g. in the route
lookup code path, it is not safe to directly call fib6_info_hold()
because the fib6_info may already have been deleted but still exists
in the rcu grace period. Holding reference to it could cause double
free
From: Wei Wang
When receiving multiple packets with the same ts ecr value, only try
to compute rcv_rtt sample with the earliest received packet.
This is because the rcv_rtt calculated by later received packets
could possibly include long idle time or other types of delay.
For example:
(1) server
From: Wei Wang
Sock hash only supports IPv4 socket proto right now.
If a non-IPv4 socket gets stored in the BPF map, sk->sk_prot gets
overwritten with the v4 tcp prot.
Syskaller reported the following related issue on an IPv6 socket:
BUG: KASAN: slab-out-of-bounds in ip6_dst_idev include/
From: Wei Wang
Sock map only supports IPv4 socket proto right now.
If a non-IPv4 socket gets stored in the BPF map, sk->sk_prot gets
overwritten with the v4 tcp prot.
It could potentially cause issues when invoking functions from
sk->sk_prot later in the stack.
Fixes: 174a79ff9515
From: Wei Wang <wei...@google.com>
In tcp_select_initial_window(), we only set rcv_wnd to
tcp_default_init_rwnd() if current mss > (1 << wscale). Otherwise,
rcv_wnd is kept at the full receive space of the socket which is a
value way larger than tcp_default_init_rwnd().
With
info+0x32/0x70 net/core/dev.c:1707
> call_netdevice_notifiers net/core/dev.c:1725 [inline]
> __dev_notify_flags+0x262/0x430 net/core/dev.c:6960
> dev_change_flags+0xf5/0x140 net/core/dev.c:6994
> devinet_ioctl+0x126a/0x1ac0 net/ipv4/devinet.c:1080
> inet_ioctl+0x184/0x310
On Mon, Feb 26, 2018 at 3:02 PM, David Ahern <dsah...@gmail.com> wrote:
> On 2/26/18 3:29 PM, Wei Wang wrote:
>> On Sun, Feb 25, 2018 at 11:47 AM, David Ahern <dsah...@gmail.com> wrote:
>>> IPv6 FIB will only contain FIB entries with exception routes added to
&
On Mon, Feb 26, 2018 at 2:55 PM, David Ahern <dsah...@gmail.com> wrote:
> On 2/26/18 3:28 PM, Wei Wang wrote:
>>> @@ -213,11 +234,6 @@ static inline void rt6_set_expires(struct rt6_info
>>> *rt, unsigned long expires)
>>>
>>> static inline void
On Mon, Feb 26, 2018 at 2:47 PM, David Ahern <dsah...@gmail.com> wrote:
> On 2/26/18 3:28 PM, Wei Wang wrote:
>> On Sun, Feb 25, 2018 at 11:47 AM, David Ahern <dsah...@gmail.com> wrote:
>>> Introduce fib6_nh structure and move nexthop related data from
>>&g
On Sun, Feb 25, 2018 at 11:47 AM, David Ahern wrote:
> IPv6 FIB will only contain FIB entries with exception routes added to
> the FIB entry. Remove CACHE and dst checks from fib6 add and delete since
> they can never happen once the data type changes.
>
> Fixup the lookup
On Sun, Feb 25, 2018 at 11:47 AM, David Ahern wrote:
> Add expires to rt6_info for FIB entries, and add fib6 helpers to
> manage it. Data path use of dst.expires remains.
>
> Signed-off-by: David Ahern
> ---
> include/net/ip6_fib.h | 26
On Sun, Feb 25, 2018 at 11:47 AM, David Ahern wrote:
> Introduce fib6_nh structure and move nexthop related data from
> rt6_info and rt6_info.dst to fib6_nh. References to dev, gateway or
> lwtstate from a FIB lookup perspective are converted to use fib6_nh;
> datapath
On 02/07/2018 09:26 AM, kbuild test robot wrote:
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost
head: 96bcd04462b99e2c80e09f6537770a0ca6b288d0
commit: 96bcd04462b99e2c80e09f6537770a0ca6b288d0 [20/20] virtio-balloon:
VIRTIO_BALLOON_F_FREE_PAGE_HINT
config:
On Thu, Feb 1, 2018 at 2:56 PM, Eric Biggers wrote:
> +wei...@google.com
>
> On Tue, Jan 02, 2018 at 03:58:02PM -0800, syzbot wrote:
>> Hello,
>>
>> syzkaller hit the following crash on
>> 6bb8824732f69de0f233ae6b1a8158e149627b38
>>
On Tue, Jan 30, 2018 at 5:16 PM, Eric Biggers <ebigge...@gmail.com> wrote:
> On Wed, Jan 03, 2018 at 10:53:02AM -0800, 'Wei Wang' via syzkaller-bugs wrote:
>> On Wed, Jan 3, 2018 at 8:16 AM, David Ahern <dsah...@gmail.com> wrote:
>> > [ +wei...@google.com ]
>&
On Fri, Jan 26, 2018 at 12:05 PM, Martin KaFai Lau <ka...@fb.com> wrote:
> On Fri, Jan 26, 2018 at 11:40:17AM -0800, Wei Wang wrote:
>> From: Wei Wang <wei...@google.com>
>>
>> In current route cache aging logic, if a route has both RTF_EXPIRE and
>> RTF_GATE
From: Wei Wang <wei...@google.com>
In current route cache aging logic, if a route has both RTF_EXPIRE and
RTF_GATEWAY set, the route will only be removed if the neighbor cache
has no RTN_ROUTE flag. Otherwise, even if the route has expired, it
won't get deleted.
Fix this logic to always
On Fri, Jan 19, 2018 at 1:36 PM, Wei Wang <wei...@google.com> wrote:
>
>
> On Fri, Jan 19, 2018 at 1:13 PM, Ido Schimmel <ido...@idosch.org> wrote:
>> Hi Wei, Martin,
>>
>> On Thu, Jan 18, 2018 at 03:31:29PM -0800, Wei Wang wrote:
>>> On Thu, Jan 18,
On Thu, Jan 18, 2018 at 2:47 PM, Martin KaFai Lau <ka...@fb.com> wrote:
> On Thu, Jan 18, 2018 at 10:40:03AM -0800, Wei Wang wrote:
>> From: Wei Wang <wei...@google.com>
>>
>> After commit 4512c43eac7e, if we add a route to the subtree of tb6_root
>>
From: Wei Wang <wei...@google.com>
After commit 4512c43eac7e, if we add a route to the subtree of tb6_root
which does not have any route attached to it yet, the current code will
let tb6_root and the node in the subtree share the same route.
This could cause problem cause tb6_root has RT
On Wed, Jan 3, 2018 at 3:31 PM, Cong Wang wrote:
>
> On Wed, Jan 3, 2018 at 12:55 PM, Ozgur wrote:
> >
> >
> > 03.01.2018, 21:57, "Cong Wang" :
> >> On Tue, Jan 2, 2018 at 3:58 PM, syzbot
> >>
On Thu, Jan 11, 2018 at 9:25 AM, Anders K. Pedersen | Cohaesio
wrote:
> On tir, 2017-12-26 at 12:05 +0100, Anders K. Pedersen | Cohaesio wrote:
>> Hello,
>>
>> On one of our border routers, Netfilter is occasionally logging packets
>> with "OUT=lo" (output interface lo) even
From: Wei Wang <wei...@google.com>
In the current code, when creating a new fib6 table, tb6_root.leaf gets
initialized to net->ipv6.ip6_null_entry.
If a default route is being added with rt->rt6i_metric = 0x,
fib6_add() will add this route after net->ipv6.ip6_null_entry
On Sat, Jan 6, 2018 at 10:16 PM, Martin KaFai Lau <ka...@fb.com> wrote:
> On Sat, Jan 06, 2018 at 05:41:28PM -0800, Wei Wang wrote:
>> On Fri, Jan 5, 2018 at 11:42 PM, Martin KaFai Lau <ka...@fb.com> wrote:
>> > On Fri, Jan 05, 2018 at 05:38:35PM -0800, Wei Wang wr
On Fri, Jan 5, 2018 at 11:42 PM, Martin KaFai Lau <ka...@fb.com> wrote:
> On Fri, Jan 05, 2018 at 05:38:35PM -0800, Wei Wang wrote:
>> From: Wei Wang <wei...@google.com>
>>
>> In the current code, when creating a new fib6 table, tb6_root.leaf gets
>>
From: Wei Wang <wei...@google.com>
In the current code, when creating a new fib6 table, tb6_root.leaf gets
initialized to net->ipv6.ip6_null_entry.
If a default route is being added with rt->rt6i_metric = 0x,
fib6_add() will add this route after net->ipv6.ip6_null_entry
From: Wei Wang <wei...@google.com>
In fib6_add(), pn could be NULL if fib6_add_1() failed to return a fib6
node. Checking pn != fn before accessing pn->leaf makes sure pn is not
NULL.
This fixes the following GPF reported by syzkaller:
general protection fault: [#1] SMP KASAN
Dumpi
On Wed, Jan 3, 2018 at 8:16 AM, David Ahern wrote:
> [ +wei...@google.com ]
>
> On 1/2/18 3:58 PM, syzbot wrote:
>> Hello,
>>
>> syzkaller hit the following crash on
>> 61233580f1f33c50e159c50e24d80ffd2ba2e06b
>>
On Tue, Dec 19, 2017 at 2:56 AM, Ortwin Glück wrote:
> Hi,
>
> On 4.14.6 I just got this (on a busy firewall):
> [Tue Dec 19 11:15:59 2017] dst_release: dst:9bb7aca0d6c0 refcnt:-1
>
> Are you sure the refcounting is now correct?
>
> Ortwin
Would you give more details under what
From: Wei Wang <wei...@google.com>
When ms timestamp is used, current logic uses 1us in
tcp_rcv_rtt_update() when the real rcv_rtt is within 1 - 999us.
This could cause rcv_rtt underestimation.
Fix it by always using a min value of 1ms if ms timestamp is used.
Fixes: 645f4c6f2ebd ("
From: Wei Wang <wei...@google.com>
tcpi_rcv_ssthresh is an important stats when debugging receive side
behavior.
Add it to the ss output.
Signed-off-by: Wei Wang <wei...@google.com>
Signed-off-by: Eric Dumazet <eduma...@google.com>
---
misc/ss.c | 4
1 file changed, 4 i
On 11/08/2017 03:23 AM, Michael S. Tsirkin wrote:
On Tue, Nov 07, 2017 at 08:13:10PM +0200, Michael S. Tsirkin wrote:
On Tue, Nov 07, 2017 at 09:29:59AM -0800, Linus Torvalds wrote:
On Tue, Nov 7, 2017 at 9:23 AM, Linus Torvalds
wrote:
I guess I'll take it, but
From: Wei Wang <wei...@google.com>
Cached routes should only be created by the system when receiving pmtu
discovery or ip redirect msg. Users should not be allowed to create
cached routes.
Furthermore, after the patch series to move cached routes into exception
table, user added cached
From: Wei Wang <wei...@google.com>
In rt6_select(), fn->leaf could be pointing to net->ipv6.ip6_null_entry.
In this case, we should directly return instead of trying to carry on
with the rest of the process.
If not, we could crash at:
spin_lock_bh(>rt6i_table->rt6_lock);
60fcf5cfb ("ipv6: hook up exception table to store dst cache")
> Signed-off-by: Paolo Abeni <pab...@redhat.com>
> ---
Acked-by: Wei Wang <wei...@google.com>
> net/ipv6/route.c | 12 +++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> dif
> the gc timer will run for whatever time needed to properly
> clean the table.
>
> v2 -> v3:
> - clarified the commit message
>
> Fixes: 2b760fcf5cfb ("ipv6: hook up exception table to store dst cache")
> Signed-off-by: Paolo Abeni <pab...@redhat.com>
&
On Wed, Oct 18, 2017 at 6:03 AM, Paolo Abeni <pab...@redhat.com> wrote:
> On Tue, 2017-10-17 at 13:48 -0700, Wei Wang wrote:
>> On Tue, Oct 17, 2017 at 1:02 PM, Paolo Abeni <pab...@redhat.com> wrote:
>> > Meanwhile others sockets may grab more references to (and u
On Tue, Oct 17, 2017 at 1:02 PM, Paolo Abeni <pab...@redhat.com> wrote:
> On Tue, 2017-10-17 at 11:58 -0700, Wei Wang wrote:
>> On Tue, Oct 17, 2017 at 10:40 AM, Paolo Abeni <pab...@redhat.com> wrote:
>> > The commit 2b760fcf5cfb ("ipv6: hook up exception table
On Tue, Oct 17, 2017 at 10:40 AM, Paolo Abeni wrote:
> The commit 2b760fcf5cfb ("ipv6: hook up exception table to store
> dst cache") partially reverted 1e2ea8ad37be ("ipv6: set
> dst.obsolete when a cached route has expired").
>
> This change brings back the dst obsoleting and
re that
> the gc timer will run for whatever time needed to properly
> clean the table.
>
> Fixes: 2b760fcf5cfb ("ipv6: hook up exception table to store dst cache")
> Signed-off-by: Paolo Abeni <pab...@redhat.com>
> ---
Acked-by: Wei Wang <wei...@google.com>
On Tue, Oct 17, 2017 at 10:40 AM, Paolo Abeni wrote:
> After the commit 2b760fcf5cfb ("ipv6: hook up exception table to
> store dst cache"), entries in the routing cache are not shown by:
>
> ip route show cache
>
> because the per route exception table containing such routes
From: Wei Wang <wei...@google.com>
In order to not dirty the cacheline too often, we try to only update
dst->__use and dst->lastusetime at most once per jiffy.
As dst->lastusetime is only used by ipv6 garbage collector, it should
be good enough time resolution.
And __u
From: Wei Wang <wei...@google.com>
In fib6_locate(), we need to first make sure fn is not NULL before doing
FIB6_SUBTREE(fn) to avoid crash.
This fixes the following static checker warning:
net/ipv6/ip6_fib.c:1462 fib6_locate()
warn: variable dereferenced before check 'fn' (se
F_CACHE entry bit.
>
> Detected by CoverityScan, CID#1457734, #1457747 ("Wrong operator used")
>
> Fixes: 35732d01fe31 ("ipv6: introduce a hash table to store dst cache")
> Signed-off-by: Colin Ian King <colin.k...@canonical.com>
> ---
Acked-by: Wei
Martin KaFai Lau <ka...@fb.com>
>
Thanks a lot for catching this. Yes. It should have been '&' instead of '|'.
Acked-by: Wei Wang <wei...@google.com>
>>
>> Detected by CoverityScan, CID#1457747 ("Wrong operator used")
>>
>> Fixes: 35732d01fe31 (&q
From: Wei Wang <wei...@google.com>
This patch replaces rcu_deference() with rcu_dereference_bh() in
ipv6_route_seq_next() to avoid the following warning:
[ 19.431685] WARNING: suspicious RCU usage
[ 19.433451] 4.14.0-rc3-00914-g66f5d6c #118 Not tainted
[ 19.
On Fri, Oct 6, 2017 at 4:57 PM, 吉藤英明 <hideaki.yoshif...@miraclelinux.com> wrote:
> Hi,
>
> 2017-10-07 4:06 GMT+09:00 Wei Wang <wei...@google.com>:
>> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
>> index 941c062389d2..aeb349aea429 100644
>> --- a/net
From: Wei Wang <wei...@google.com>
With rwlock, it is safe to call dst_hold() in the read thread because
read thread is guaranteed to be separated from write thread.
However, after we replace rwlock with rcu, it is no longer safe to use
dst_hold(). A dst might already have been d
From: Wei Wang <wei...@google.com>
If we move all cached dst into the exception table under the main route,
current rt6_clean_tohost() will no longer be able to access them.
This commit makes fib6_clean_tohost() to also go through all cached
routes in exception table and removes cached g
From: Wei Wang <wei...@google.com>
This function takes a route as input and tries to update the sernum in
the fib6_node this route is associated with. It will be used in later
commit when adding a cached route into the exception table under that
route.
Signed-off-by: Wei Wang <wei...@g
From: Wei Wang <wei...@google.com>
If all dst cache entries are stored in the exception table under the
main route, we have to go through them during fib6_age() when doing
garbage collecting.
Introduce a new function rt6_age_exception() which goes through all dst
entries in the exception
From: Wei Wang <wei...@google.com>
After rwlock is replaced with rcu and spinlock, route lookup can happen
simultanously with route deletion.
This patch removes the call to free_percpu(rt->rt6i_pcpu) from
rt6_release() to avoid the race condition between rt6_release() and
rt6_get_p
From: Wei Wang <wei...@google.com>
After we move cached dst entries into the exception table under its
parent route, current fib6_remove_prefsrc() no longer can access them.
This commit makes fib6_remove_prefsrc() also go through all routes
in the exception table to remove the pr
From: Wei Wang <wei...@google.com>
After rwlock is replaced with rcu and spinlock, ip6_pol_route() will be
called with only rcu held. That means rt6 route deletion could happen
simultaneously with rt6_make_pcpu_rt(). This could potentially cause
memory leak if rt6_release() is called right
From: Wei Wang <wei...@google.com>
With all the preparation work before, we are now ready to replace rwlock
with rcu and spinlock in fib6_table.
That means now all fib6_node in fib6_table are protected by rcu. And
when freeing fib6_node, call_rcu() is used to wait for the rcu grace
period
From: Wei Wang <wei...@google.com>
Currently, most of the rt6_stats are not hooked up correctly. As the
last part of this patch series, hook up all existing rt6_stats and add
one new stat fib_rt_uncache to indicate the number of routes in the
uncached list.
For details of the stats, please
From: Wei Wang <wei...@google.com>
If rwlock is replaced with rcu and spinlock, it is possible that the
reader thread will see fn->leaf as NULL in the following scenarios:
1. fib6_add() is in progress and we have already inserted a new node but
not yet inserted the route.
2. fib6_
From: Wei Wang <wei...@google.com>
After rwlock is replaced with rcu and spinlock, fib6_lookup() could
potentially return an intermediate node if other thread is doing
fib6_del() on a route which is the only route on the node so that
fib6_repair_tree() will be called on this node and poten
From: Wei Wang <wei...@google.com>
This commit makes use of the exception hash table implementation to
store dst caches created by pmtu discovery and ip redirect into the hash
table under the rt_info and no longer inserts these routes into fib6
tree.
This makes the fib6 tree only contain
From: Wei Wang <wei...@google.com>
fib6_add() logic currently calls fib6_add_1() to figure out what node
should be used for the newly added route and then call
fib6_add_rt2node() to insert the route to the node.
And during the call of fib6_add_1(), fn_sernum is updated for all nodes
that
From: Wei Wang <wei...@google.com>
Currently, fib6 table is protected by rwlock. During route lookup,
reader lock is taken and during route insertion, deletion or
modification, writer lock is taken. This is a very inefficient
implementation because the fastpath always has to do the ope
From: Wei Wang <wei...@google.com>
fib6_locate() is used to find the fib6_node according to the passed in
prefix address key. It currently tries to find the fib6_node with the
exact match of the passed in key. However, when we move cached routes
into the exception table, fib6_locate() wil
From: Wei Wang <wei...@google.com>
Add a hash table into struct rt6_info in order to store dst caches
created by pmtu discovery and ip redirect in ipv6 routing code.
APIs to add dst cache, delete dst cache, find dst cache and update
dst cache in the hash table are implemented and will b
From: Wei Wang <wei...@google.com>
If we move all cached dst into the exception table under the main route,
current rt6_mtu_change() will no longer be able to access them.
This commit makes rt6_mtu_change_route() function to also go through all
cached routes in the exception table under th
From: Wei Wang <wei...@google.com>
This commit does a cleanup and moves tcp_rearm_rto() call in the TFO
server case into a previous spot in tcp_rcv_state_process() to make
it more compact.
This is only a cosmetic change.
Suggested-by: Yuchung Cheng <ych...@google.com>
Signed-off-
From: Wei Wang <wei...@google.com>
Currently in the TCP code, the initialization sequence for cached
metrics, congestion control, BPF, etc, after successful connection
is very inconsistent. This introduces inconsistent bevhavior and is
prone to bugs. The current call sequence is as follow
On Tue, Oct 3, 2017 at 9:28 PM, David Miller <da...@davemloft.net> wrote:
> From: Wei Wang <wei...@google.com>
> Date: Mon, 2 Oct 2017 10:01:35 -0700
>
>> @@ -456,6 +456,19 @@ void tcp_init_sock(struct sock *sk)
>> }
>> EXPORT_SYMBOL(tcp_init_sock);
>&g
From: Wei Wang <wei...@google.com>
This commit does a cleanup and moves tcp_rearm_rto() call in the TFO
server case into a previous spot in tcp_rcv_state_process() to make
it more compact.
This is only a cosmetic change.
Suggested-by: Yuchung Cheng <ych...@google.com>
Signed-off-
From: Wei Wang <wei...@google.com>
Currently in the TCP code, the initialization sequence for cached
metrics, congestion control, BPF, etc, after successful connection
is very inconsistent. This introduces inconsistent bevhavior and is
prone to bugs. The current call sequence is as follow
On Tue, Sep 26, 2017 at 6:20 AM, Eric Dumazet <eduma...@google.com> wrote:
> On Mon, Sep 25, 2017 at 10:52 PM, Wei Wang <wei...@google.com> wrote:
>> On Mon, Sep 25, 2017 at 7:23 PM, Eric Dumazet <eduma...@google.com> wrote:
>>> On Mon, Sep 25, 2017 at 7:0
On Wed, Sep 27, 2017 at 10:14 AM, Paolo Abeni wrote:
> When a host is under high ipv6 load, the updates of the ingress
> route '__use' field are a source of relevant contention: such
> field is updated for each packet and several cores can access
> concurrently the dst, even if
On Mon, Sep 25, 2017 at 7:23 PM, Eric Dumazet wrote:
> On Mon, Sep 25, 2017 at 7:07 PM, Martin KaFai Lau wrote:
>
>> I am probably still missing something.
>>
>> Considering the del operation should be under the writer lock,
>> if rt->rt6i_node should be NULL
On Mon, Sep 25, 2017 at 5:56 PM, Martin KaFai Lau <ka...@fb.com> wrote:
> On Mon, Sep 25, 2017 at 05:35:22PM +0000, Wei Wang wrote:
>> From: Wei Wang <wei...@google.com>
>>
>> fib6_del() generates WARN_ON() when rt->dst.obsolete > 0. This does n
From: Wei Wang <wei...@google.com>
fib6_del() generates WARN_ON() when rt->dst.obsolete > 0. This does not
make sense because it is possible that the route passed in is already
deleted by some other thread and rt->dst.obsolete is set to
DST_OBSOLETE_DEAD.
So this commit delet
old() helper to have additional
> debugging, as a follow up to commit 44ebe79149ff ("net: add debug
> atomic_inc_not_zero() in dst_hold()")
>
> In net-next we will convert dst atomic_t to refcount_t for peace of
> mind.
>
> Fixes: a4c2fd7f7891 ("net: rem
,7 +271,7 @@ static inline void dst_use_noref(struct dst_entry
*dst, unsigned long time)
static inline struct dst_entry *dst_clone(struct dst_entry *dst)
{
if (dst)
- atomic_inc(>__refcnt);
+ dst_hold(dst);
return dst;
}
Thanks.
Wei
On Wed, Sep
>>> bisected again and same result:
>>> b838d5e1c5b6e57b10ec8af2268824041e3ea911 is the first bad commit
>>> commit b838d5e1c5b6e57b10ec8af2268824041e3ea911
>>> Author: Wei Wang <wei...@google.com>
>>> Date: Sat Jun 17 10:42:32 2017 -0700
>&
>> This is why I suggested to replace the BUG() in another mail
>>
>> So :
>>
>> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
>> index
>> f535779d9dc1dfe36934c2abba4e43d053ac5d6f..220cd12456754876edf2d3ef13195e82d70d5c74
>> 100644
>> --- a/include/linux/netdevice.h
>> +++
skb_dst_force_safe() and one to
> skb_dst() in case the ip_route_input_noref() check fails.
>
> Reported-by: Sabrina Dubroca <sdubr...@redhat.com>
> Fixes: ad65a2f05695 ("ipv4: call dst_hold_safe() properly")
> Signed-off-by: Stefano Brivio <sbri...@redhat.com>
Acked-
1 - 100 of 207 matches
Mail list logo