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")
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.
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.
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>
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>
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>