diff options
| author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2020-07-25 09:10:56 +0300 |
|---|---|---|
| committer | Donatas Abraitis <donatas.abraitis@gmail.com> | 2020-09-07 22:30:19 +0300 |
| commit | 8336c896fdcc993ee6dbf428f75231e1b0453ed9 (patch) | |
| tree | da6723510b8903190247358dcfbcb752a6493afd /lib/spf_backoff.c | |
| parent | e410d563072d7319e6cc9803e8aee05cbee339f5 (diff) | |
bgpd: Add `neighbor <neigh> shutdown rtt` command
This would be useful in cases with lots of peers and shutdown them
automatically if RTT goes above the specified limit.
A host with 512 or more IPv6 addresses has a higher latency due to
ipv6_addr_label(). This method tries to pick the best candidate address
fo outgoing connection and literally increases processing latency.
```
Samples: 28 of event 'cycles', Event count (approx.): 22131542
Children Self Command Shared Object Symbol
+ 100.00% 0.00% ping6 [kernel.kallsyms] [k] entry_SYSCALL_64_fastpath
+ 100.00% 0.00% ping6 [unknown] [.] 0x0df0ad0b8047022a
+ 100.00% 0.00% ping6 libc-2.17.so [.] __sendto_nocancel
+ 100.00% 0.00% ping6 [kernel.kallsyms] [k] sys_sendto
+ 100.00% 0.00% ping6 [kernel.kallsyms] [k] SYSC_sendto
+ 100.00% 0.00% ping6 [kernel.kallsyms] [k] sock_sendmsg
+ 100.00% 0.00% ping6 [kernel.kallsyms] [k] inet_sendmsg
+ 100.00% 0.00% ping6 [kernel.kallsyms] [k] rawv6_sendmsg
+ 100.00% 0.00% ping6 [kernel.kallsyms] [k] ip6_dst_lookup_flow
+ 100.00% 0.00% ping6 [kernel.kallsyms] [k] ip6_dst_lookup_tail
+ 100.00% 0.00% ping6 [kernel.kallsyms] [k] ip6_route_get_saddr
+ 100.00% 0.00% ping6 [kernel.kallsyms] [k] ipv6_dev_get_saddr
+ 100.00% 0.00% ping6 [kernel.kallsyms] [k] __ipv6_dev_get_saddr
+ 100.00% 0.00% ping6 [kernel.kallsyms] [k] ipv6_get_saddr_eval
+ 100.00% 0.00% ping6 [kernel.kallsyms] [k] ipv6_addr_label
+ 100.00% 100.00% ping6 [kernel.kallsyms] [k] __ipv6_addr_label
+ 0.00% 0.00% ping6 [kernel.kallsyms] [k] schedule
```
This is how it works:
```
~# vtysh -c 'show bgp neigh 192.168.0.2 json' | jq '."192.168.0.2".estimatedRttInMsecs'
9
~# tc qdisc add dev eth1 root netem delay 120ms
~# vtysh -c 'show bgp neigh 192.168.0.2 json' | jq '."192.168.0.2".estimatedRttInMsecs'
89
~# vtysh -c 'show bgp neigh 192.168.0.2 json' | jq '."192.168.0.2".estimatedRttInMsecs'
null
~# vtysh -c 'show bgp neigh 192.168.0.2 json' | jq '."192.168.0.2".lastResetDueTo'
"Admin. shutdown"
```
Warning message:
bgpd[14807]: 192.168.0.2 shutdown due to high round-trip-time (200ms > 150ms)
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'lib/spf_backoff.c')
0 files changed, 0 insertions, 0 deletions
