1
0
mirror of https://github.com/osrg/gobgp.git synced 2024-05-11 05:55:10 +00:00

21 Commits

Author SHA1 Message Date
Maxime Peim
9fbc03765a send-max: respect configuration 2024-04-29 17:29:42 +09:00
Tuetuopay
bbde806641 evpn: fix quadratic mac-mobility handling for gRPC routes
The gRPC code paths uses different functions than the BGP code path.
Thus is did not receive the fix for the mac mobility handling.

Fixes: c393f43 ("evpn: fix quadratic evpn mac-mobility handling")
2024-04-29 17:25:29 +09:00
Tuetuopay
c393f4382c evpn: fix quadratic evpn mac-mobility handling
This patch adds a special case in the destination hashmap for EVPN
Type-2 routes, to index them by MAC address. This allows for direct
access to the destination struct, instead of iterating over all
destination and all paths.

In effect, this replaces an iteration over all known paths by a quick
lookup to the MAC, leaving only an iteration to multiple paths to the
same MAC (e.g. multihoming or through multiple VNIs).

The practical effect is a reasonable convergence time for large EVPN
instances.

- before: 6m 7s
- after: 11s

The comparison was performed on a Xeon Silver 4209T, and an EVPN
instance comprising of 13k EVPN type-2 routes. The time is measured
by comparing the timestamp of the first and the last routes logged by
the cli's monitor mode.

Given the extreme difference, no further work was done for a more
accurate measurment.
2023-12-17 01:20:00 +01:00
Rodrigo Peña
b6be999f90 Fix crash on ListPathRequest with malformed prefix
When ListPathRequest is done by a gRPC client including a malformed prefix,
 the server would crash an invalid memory address reference.

This commit fixes the crash by checking whether the parseCIDR method returned
an error.
2023-09-07 10:50:37 -03:00
Kirill Pletnev
35bfc9605c CLI VPNv4/VPNv6 filtering
gobgp CLI can filter VPNv4/VPNv6 prefixes with or without rd.
2023-09-06 11:14:47 +03:00
Kirill Pletnev
002690b848 ListPath can filter VPNv4/v6 routes
ListPath gRPC endpoint can filter VPNv4/VPNv6 prefixes. All lookup options are supported.
2023-09-06 11:11:35 +03:00
Yuya Kusakabe
b1ed1f1795 cli,mup: fix prefix and route type handling 2023-03-26 12:15:00 +09:00
Yuya Kusakabe
dc328dccf6 cli,mup: add support for filtering MUP routes with route type 2022-11-28 09:02:54 +09:00
Yuya Kusakabe
438f2460b3 cli: initial support for BGP-MUP SAFI and Extended Community 2022-08-31 12:26:42 +09:00
Jeremiah Millay
1519b5b654 Fix panic in table.GetLongerPrefixDestinations() with invalid cidr 2022-07-01 12:10:30 -04:00
FUJITA Tomonori
97aefbb24a decouple logging
gobgp is tightly coupled with logrus and uses the global logrus logger
instance. The uses of gobgp library can't use other logging libraries.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2021-12-08 10:39:16 +00:00
FUJITA Tomonori
c593d7c8b3 switch to Go API v2 for protobuf
seems that sticking to Go API v1 for protobuf is headache for projects
using GoBGP.

This breaks the compatibility so bumps up the major version to 3.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2021-12-08 07:22:50 +00:00
FUJITA Tomonori
635128d3e5 table: fix longer-prefixes lookup
probably regression due to the introduction of critbitgo.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2021-01-12 14:25:27 +09:00
Pavel Vorontsov
789664e8c3 add support GetTable method for vrfs #2235 2020-02-19 13:35:10 +09:00
FUJITA Tomonori
b4e2d9e440 table: replace radix with crit-bit algo for longer-prefixes search
faster and less memory usage.

Now go-radix has gone.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2019-10-25 20:38:33 +09:00
FUJITA Tomonori
589fdea311 table: implement adj-in table use routing table structures
rib and adj-in use the same data strcutures. Needs more clean up.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2019-09-17 21:11:05 +09:00
FUJITA Tomonori
682e42c98d table: improve table.Info for global rib
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2019-09-12 22:17:18 +09:00
FUJITA Tomonori
2682343dea fix duplicated local path id bug
Fix a bug that the same path id is assigned to two paths. The bug
happens in the following way:

1. a new path is assigned to a local path id.
2. an import policy dropping the path from the master rib is added and
execute softreset in.
3. the path still exists in the adj but doesn't in the master. the
path id was freed (marked as unused).
5. a new path with the same prefix comes from another peer. The same
id is assigned to the new path.
6 deleted the policy and execute softreset in.
7 there are two paths in the master with the same path id.

This path guarantees that only when a path is removed in the adj, the
id for path is freed.

Note that this doesn't fatten Path strcuture, which should be avoided
for any reason.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2019-08-27 15:46:32 +09:00
FUJITA Tomonori
8e348d6f18 table: delete unused deleteDestByNlri()
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2019-08-27 14:32:18 +09:00
FUJITA Tomonori
1d14b8ecfb silence staticcheck warnings
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2019-01-09 14:36:48 +09:00
FUJITA Tomonori
c4775c4251 follow Standard Go Project Layout
https://github.com/golang-standards/project-layout

Now you can see clearly what are private and public library code.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-07-07 20:44:25 +09:00