bgpcep.git
4 years agoRelease Neon release/neon-sr3
jenkins-releng [Tue, 17 Dec 2019 00:19:26 +0000 (00:19 +0000)]
Release Neon

4 years agoFix CSIT regression due to BGPCEP-878 fix 30/86430/1
Ajay Lele [Sat, 14 Dec 2019 04:09:13 +0000 (20:09 -0800)]
Fix CSIT regression due to BGPCEP-878 fix

Handle scenario in BGPClusterSingletonService#restartNeighbors()
where BgpPeer#restart() is called after BgpPeer#closeServiceInstance()
without BgpPeer#restart() getting called in between.

JIRA: BGPCEP-878
Signed-off-by: Ajay Lele <ajayslele@gmail.com>
Change-Id: I5f8ac4ac4992e4641769243c91fac03bd0a96094
(cherry picked from commit a0281358d14e627b4e718d8b016e149ce8ed749f)

4 years agoRegister PCEP session to stats handler only after it is fully initialized 41/86241/1
Ajay Lele [Tue, 3 Dec 2019 03:17:53 +0000 (19:17 -0800)]
Register PCEP session to stats handler only after it is fully initialized

JIRA: BGPCEP-889
Change-Id: I008418426061d51fd3bef1be7e2fca9b63c99100
Signed-off-by: Ajay Lele <ajayslele@gmail.com>
4 years agoAddress deadlock scenarios in BGP peer, session mgmt code 10/86010/3
Ajay Lele [Wed, 30 Oct 2019 00:13:15 +0000 (17:13 -0700)]
Address deadlock scenarios in BGP peer, session mgmt code

In scenario-1, BGPPeer and BGPSessionImpl was acquiring locks in opposite order,
resulting in deadlock. Addressed it by enforcing same order of locking i.e.
[BGPPeer (listener) -> BGPSessionImpl (session)].
In scenario-2, deadlock was because of BGPProtocolSessionPromise and StrictBGPPeerRegistry
acquiring locks in opposite order. Addressed by using concurrent Set obviating
need to acquire lock on StrictBGPPeerRegistry object.

JIRA: BGPCEP-884
Change-Id: I9e05adde3220191c8f8436bd76fb25dbfc251e49
Signed-off-by: Ajay Lele <ajayslele@gmail.com>
(cherry picked from commit c23ee5e55cb94faf602d8ef16f109af7023ed8ed)

4 years agoFix NPE while accessing DomTxChain when bgp/app peer singleton service is restarted 08/86008/3
Ajay Lele [Thu, 29 Aug 2019 21:37:58 +0000 (14:37 -0700)]
Fix NPE while accessing DomTxChain when bgp/app peer singleton service is restarted

Due to cluster partition/heal, singleton service associated with bgp/app
peer instance can get restarted. Create/close of DomTxChain instance used
by the service was not being handled properly resulting in NPE and failure
to register the peer which caused the BGP connection to not get reestablished.

JIRA: BGPCEP-878
Change-Id: I436ad0877db19c65463bf7b7e09faa3b2b42e5a0
Signed-off-by: Ajay Lele <ajayslele@gmail.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 5efe6160e57bc846831dbbe7dd88b8a30c33919a)

4 years agoBump odlparent/yangtools/mdsal to 4.0.14/2.1.14/3.0.13 11/85911/1
Robert Varga [Thu, 21 Nov 2019 03:40:38 +0000 (04:40 +0100)]
Bump odlparent/yangtools/mdsal to 4.0.14/2.1.14/3.0.13

Adopts upstream upgrades and fixes.

Change-Id: I14c1f3f3420f20c5a0dc090fb4941e3435afd812
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump to odlparent-4.0.13/yangtools-2.1.13/mdsal-3.0.7 66/85266/15
Robert Varga [Sun, 20 Oct 2019 08:45:29 +0000 (10:45 +0200)]
Bump to odlparent-4.0.13/yangtools-2.1.13/mdsal-3.0.7

This picks up latest upgrades and fixes.

Change-Id: Ic268f6fa4ccd963af771c39dbcf6a5b455e353b5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove unused imports 54/85354/2
Robert Varga [Wed, 23 Oct 2019 08:53:01 +0000 (10:53 +0200)]
Remove unused imports

pyang validation is turning up warnings about unused imports,
fix them up.

Change-Id: Ib7776ea60bcff8737f000fe7a563978152da13be
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 6ae4199e60ae722e27ee24a1eef096f0c5c6e57a)

4 years agoFix bgp-segment-routing 91/85291/7
Robert Varga [Mon, 21 Oct 2019 08:23:24 +0000 (10:23 +0200)]
Fix bgp-segment-routing

This model is not valid yang, as it is defining overlapping leaves
in choice/case statements. This fixes the violations by providing
encapsulating containers.

JIRA: BGPCEP-880
Change-Id: I4f4f99a6b4a95ab6c8eb997d5ad97d3101b4f387
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFix rsvp.yang 90/85290/5
Robert Varga [Mon, 21 Oct 2019 08:20:07 +0000 (10:20 +0200)]
Fix rsvp.yang

This model is not valid yang, as it is defining overlapping leaves
in choice/case statements. This fixes the violations by providing
encapsulating containers, i.e. the content within each case is also
put into a container.

JIRA: BGPCEP-880
Change-Id: I55d1ac7491b2985a29558ec88f90919771b2a753
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoSet PMSI tunnel attribute transitive. 62/83762/3
PeterSuna [Mon, 19 Aug 2019 11:51:10 +0000 (13:51 +0200)]
Set PMSI tunnel attribute transitive.

PMSI tunnel attribute is an optional transitive BGP attribute, as per
https://tools.ietf.org/html/rfc6514#section-5.

Before is was set as a optional non-transitive. Due this flag it
cannot be sent successfully update message with PMSI tunnel attribute
to an Arista device.

JIRA: BGPCEP-877
Change-Id: I50669645e1eb19f14eb14b8f5a5c0217d8983a26
Signed-off-by: PeterSuna <peter.suna@pantheon.tech>
4 years agoBump versions by x.y.(z+1) 03/84103/1
jenkins-releng [Sat, 31 Aug 2019 12:44:15 +0000 (12:44 +0000)]
Bump versions by x.y.(z+1)

Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
Change-Id: I3ab7822987bb093ac4f9afce23c4caa94548f9e6

4 years agoUse adaptive allocators again 06/83306/1
Robert Varga [Mon, 29 Jul 2019 16:30:38 +0000 (18:30 +0200)]
Use adaptive allocators again

This is a fixup of I865f8c2c949c226d69be8981e1070e96089b3ccb,
which restores the use of adaptive buffer allocators. While the
previous fix was a notable improvement in performance, it could
end up wasting memory on small input messages.

Change-Id: I74b5b5ddfa74b52b86ecd5ba9b9bd8779b4a9e8d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit cafb1376e7b8e8a239d3bcb08f4ee5c592e5c214)

4 years agoCorrect input buffer sizing 04/83304/1
Robert Varga [Mon, 29 Jul 2019 11:44:28 +0000 (13:44 +0200)]
Correct input buffer sizing

We are always reading at most one message at a time, but provide
a bed initial buffer sizing hint -- we always start with one byte,
which is far from optimal.

This patch corrects this mistake by seeding the session with an
allocator, which allocates 4K buffers.

Change-Id: I865f8c2c949c226d69be8981e1070e96089b3ccb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoSimplify LOG references 69/83269/2
Robert Varga [Thu, 25 Jul 2019 23:28:22 +0000 (01:28 +0200)]
Simplify LOG references

There is no need to refer to LOG via BGPProtocolSessionPromise,
this cleans up the code.

Change-Id: Ifb3c23e14eef23f60e01e67c42a1085409faa49a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit f0cf17c32072fc5f4f3489e82ee0766a459640db)

4 years agoCleanup sonar-reported code smells 91/83191/3
Robert Varga [Fri, 19 Jul 2019 15:19:57 +0000 (17:19 +0200)]
Cleanup sonar-reported code smells

This is a simple pass over reported issues, making trivial fixes.

Change-Id: If2094f3e9b02ccfea407dd3eddc641937b186170
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit f3064526ab982735bbd490da15246a2a4ce35de9)

4 years agoImprove time tracking overheads a bit 68/83268/1
Robert Varga [Thu, 25 Jul 2019 22:38:30 +0000 (00:38 +0200)]
Improve time tracking overheads a bit

We are performing unneeded computation when we are rescheduling
the keepalive timer:
- we always convert the keepAlive timer from seconds to nanos
  when checking expiry
- we are forcing netty to translate seconds to nanos again when
  we are re-scheduling the timer
- we end up doing a superfluous addition, which then undone when
  we are computing the next duration

This normalizes all the timer delays to nanoseconds, so we
eliminate these inefficiencies.

JIRA: BGPCEP-872
Change-Id: Ic5912020a1cfa0df4fc6d4cf401d846cd9140ee4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 7fbf2d3b2ef7b03fab9208e03a27e053acd415e2)

4 years agoUse RouterId's peerId 57/83257/1
Robert Varga [Wed, 24 Jul 2019 08:58:04 +0000 (10:58 +0200)]
Use RouterId's peerId

RouterId acts as a loading cache, hence we can use a squashed instance
of PeerId to lookup into peer tracker.

Change-Id: Ic74d2fa2f79c6dd88eb0d0168687bf8f9435966c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 01516001c5300e9463c63462f636b4f66436cee4)

4 years agoOptimize BgpAttributeConditionsUtil 92/83192/1
Robert Varga [Fri, 19 Jul 2019 17:28:08 +0000 (19:28 +0200)]
Optimize BgpAttributeConditionsUtil

We can very slightly optimize dispatch in these utilities by
returning statements. Also rename a confusingly-named local
variable.

Change-Id: Ia68705e82a4830b92111494e32a9ffcfed2943e8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 249cb9fc0261e5687020ab51014a45d45d67c50c)

4 years agoRemove unneeded test dependency declarations 70/83170/4
Robert Varga [Fri, 19 Jul 2019 09:16:10 +0000 (11:16 +0200)]
Remove unneeded test dependency declarations

mockito is a default test dependencies, remove its explicit
declarations.

Change-Id: I0a3c7ca4b82863bdac8d4627422e884d2d0dcda0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove superfluous osgi-core dependencies 69/83169/2
Robert Varga [Fri, 19 Jul 2019 09:04:49 +0000 (11:04 +0200)]
Remove superfluous osgi-core dependencies

These components do not have a dependency on OSGi, remove
the declarations.

Change-Id: I042f87c13d21d4c517cccf8092a28b05ee7e95da
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump mdsal to 3.0.10 19/83119/1
Robert Varga [Thu, 18 Jul 2019 13:38:02 +0000 (15:38 +0200)]
Bump mdsal to 3.0.10

This brings in latest fixes/improvements.

Change-Id: Ida49ef543f765fd8f828761d7804e5b51a93b1b3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoUse ImmutableOffsetMapTemplate for route keys 65/82965/2
Robert Varga [Mon, 8 Jul 2019 12:30:47 +0000 (14:30 +0200)]
Use ImmutableOffsetMapTemplate for route keys

We are sharing the same key layout for all entries, hence it is
wasteful to instantiate a full ImmutableMap for each of them. Use
pre-computed ImmutableOffsetMapTemplate.ordered() to efficiently
instantiate identifiers.

Change-Id: Id3424f95e7e7ad3a6e7ed75715d8505645a45e69
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 8161baf409d425f87bb05b21b569a85c62ecd552)

4 years agoUpdate keepalive tracking 64/82964/1
Robert Varga [Tue, 7 May 2019 16:40:51 +0000 (18:40 +0200)]
Update keepalive tracking

We should not be scheduling keepalives too aggressively after we
have exceeded the deadline. Also add some debugs to show when
keepalives are triggered.

Change-Id: I916a9d7f937dc6b062742b2726f4d906d91774ed
JIRA: BGPCEP-872
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 05d747c1b38c5c5e7f5dd0a865e2e144fb5471ce)

4 years agoFix unsynchronized LSP counting 06/82906/1
Robert Varga [Wed, 3 Jul 2019 08:40:26 +0000 (10:40 +0200)]
Fix unsynchronized LSP counting

Trying to copy values out of lspData without holding the lock
can result it ConcurrentModificationException and was broken
by the fix for BGPCEP-845.

Restore the lock for the duration of the copy and count the items
outside of the lock.

JIRA: BGPCEP-875
Change-Id: Ic6e839cac51a73c0812aabb58e96cb2f4959c4d6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 5089a36f11b2f9d249aeca53da867037be26fe1b)

4 years agoBump mdsal to 3.0.9 41/82841/1
Robert Varga [Mon, 1 Jul 2019 07:43:51 +0000 (09:43 +0200)]
Bump mdsal to 3.0.9

This picks up latest fixes and improvements.

Change-Id: If0c6c7fb333e8b64932e2342f361a0a80b21a624
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump yangtools to 2.1.11 40/82840/1
Robert Varga [Mon, 1 Jul 2019 07:43:39 +0000 (09:43 +0200)]
Bump yangtools to 2.1.11

This picks up latest fixes.

Change-Id: I36dfbc9764cfdedb6a67d762b75215874860fe19
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump odlparent to 4.0.11 39/82839/1
Robert Varga [Mon, 1 Jul 2019 07:43:31 +0000 (09:43 +0200)]
Bump odlparent to 4.0.11

This adopts latest upgrades.

Change-Id: I80345c9f02610af58473f7e80fb5e7854a231ab7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRevert "Remove OSGi dependency from bgp modules" 97/82197/4
Luis Gomez [Tue, 21 May 2019 16:23:02 +0000 (16:23 +0000)]
Revert "Remove OSGi dependency from bgp modules"

Due to bug BGPCEP-873

This reverts commit 39e546e47a692f7e24ed8194237cfe552bf5bc50.

Change-Id: I47b2fc757381e9a58cdf2a17017db25f74914c79
Signed-off-by: Luis Gomez <ecelgp@gmail.com>
5 years agoBump versions by x.y.(z+1) 51/82051/1
jenkins-releng [Wed, 15 May 2019 00:05:50 +0000 (00:05 +0000)]
Bump versions by x.y.(z+1)

Change-Id: I46e49997015d35419246b6c414c0432e4ca1bf55
Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
5 years agoRemove OSGi dependency from bgp modules 29/81929/2
Matej Perina [Fri, 11 Jan 2019 09:05:01 +0000 (10:05 +0100)]
Remove OSGi dependency from bgp modules

This change makes modules reusable for projects that
do not use OSGi framework.

BgpPeer, AppPeer and RibImpl creation moved from
blueprint to BgpDeployerImpl.

Change-Id: I1d13ade6f5f8edeb9595ceb94017962401f44ed6
Signed-off-by: Matej Perina <matej.perina@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 62b37d2c48880f858e7b0503e9bb60d5e168c412)

5 years agoFix NPE when no node present in PCEP topology config 05/81905/1
Ajay Lele [Wed, 10 Apr 2019 20:07:02 +0000 (13:07 -0700)]
Fix NPE when no node present in PCEP topology config

Change-Id: Ia6e8be1bbe1f822673ab14a8a38307eb516e13f3
Signed-off-by: Ajay Lele <ajayslele@gmail.com>
(cherry picked from commit 5821d0da260c053849ea1b428f7609b9edb3e799)

5 years agoBump mdsal to 3.0.8 45/81745/2
Robert Varga [Wed, 24 Apr 2019 13:17:03 +0000 (15:17 +0200)]
Bump mdsal to 3.0.8

This brings in latest fixes and enhancements.

Change-Id: I070e5a0ae66c1c293827cc38d64cdd59f728c9a2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump yangtools to 2.1.10 44/81744/1
Robert Varga [Wed, 24 Apr 2019 13:16:19 +0000 (15:16 +0200)]
Bump yangtools to 2.1.10

This brings in latest fixes and enhancements.

Change-Id: Ie9908724418e4ae5fe12499ccad240d4ad604624
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump odlparent to 4.0.10 43/81743/1
Robert Varga [Wed, 24 Apr 2019 13:16:41 +0000 (15:16 +0200)]
Bump odlparent to 4.0.10

This brings in latest fixes and enhancements.

Change-Id: I5e493983082ad479038a0760d51c1c1e1b7dd98a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoDo not use JdkFutureAdapters in BgpPeerRpc 31/81531/1
Robert Varga [Tue, 9 Apr 2019 18:01:47 +0000 (20:01 +0200)]
Do not use JdkFutureAdapters in BgpPeerRpc

ChannelFuture provides listeners, hence we can trivially bridge
results without having to listen in a threadpool.

Change-Id: Ia46c5f406b6be50b9eba293ecf80714db99dabf4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 76ed78eb1ae79c0cbc67cd00b7ea3a087719304f)

5 years agoFix routing-policy-config 13/81513/1
Robert Varga [Tue, 9 Apr 2019 17:18:55 +0000 (19:18 +0200)]
Fix routing-policy-config

The XML contains illegal constructs, not matching the model, leading
to XML parsing exceptions. Fix that.

Change-Id: I3130f925e862ed9b58db3a32a820cac983770ff5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 155dc841fd842635b29b8eb65cb40ecf3e1e3413)

5 years agoRemove use of AttrBuilders 91/81391/1
Robert Varga [Thu, 4 Apr 2019 23:43:35 +0000 (01:43 +0200)]
Remove use of AttrBuilders

We are not interfacing with attributes, there is no point to reference
AttrBuilders, which are going away.

Change-Id: I9a82dca47157fdf492216dde2dc415a16bd6c085
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit a45ef59d67f720cd703879c23dd27fad0ea3255e)

5 years agoFix logging mismatches 89/81389/1
Robert Varga [Thu, 4 Apr 2019 22:23:19 +0000 (00:23 +0200)]
Fix logging mismatches

Throwables should not be formatted, fix that. Also rework
logging for null tunnels.

Change-Id: I1dbf1b3ce79bbb32b5dbc65b125b405910f7dc88
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix day-1 typo in LU parser registration 40/81340/2
Ajay Lele [Sat, 30 Mar 2019 04:10:44 +0000 (21:10 -0700)]
Fix day-1 typo in LU parser registration

Change-Id: I0400092f70ad64a4f8acc65ec9cb6f9e1a09f3e0
Signed-off-by: Ajay Lele <ajayslele@gmail.com>
(cherry picked from commit 9066f86692012b285e036face5629acc5a1debdb)

5 years agoUse only our advertized tables to send routes 25/81025/2
Robert Varga [Fri, 15 Mar 2019 06:11:49 +0000 (07:11 +0100)]
Use only our advertized tables to send routes

Previous fix used intersection of advertizements, which is not
accurate: if the peer accepts our proposal, we should be sending
all advertizements, allowing asymmetric setups to work correctly.

JIRA: BGPCEP-862
Change-Id: Ie01f2905d76989093b8914fcd08c7a628fa4686a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit cafc68569a1d8eb3b4997cc7a21de8a3a2d44034)

5 years agoDo not allow parameter 255 to be registered 71/80871/3
Robert Varga [Thu, 14 Mar 2019 15:15:11 +0000 (16:15 +0100)]
Do not allow parameter 255 to be registered

Codepoint 255 is claimed by draft-ietf-idr-ext-opt-param and needs
special treatment. Do not allow it to be registered.

Change-Id: I0cdd8f95569ce1b48796c4552b2c90379aa34873
JIRA: BGPCEP-868
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoInit data-broker before topo-provider registration to prevent NPE 07/80807/3
Ajay Lele [Tue, 12 Mar 2019 22:49:12 +0000 (15:49 -0700)]
Init data-broker before topo-provider registration to prevent NPE

java.lang.NullPointerException: null
        at org.opendaylight.bgpcep.bgp.topology.provider.AbstractTopologyBuilder.initTransactionChain(AbstractTopologyBuilder.java:292)
        at org.opendaylight.bgpcep.bgp.topology.provider.AbstractTopologyBuilder.start(AbstractTopologyBuilder.java:107)
        at org.opendaylight.bgpcep.bgp.topology.provider.config.TopologyReferenceSingletonServiceImpl.instantiateServiceInstance(TopologyReferenceSingletonServiceImpl.java:51)
        . . .

JIRA: BGPCEP-870
Change-Id: Iaec5a537cb5125e1355f197222d9265673d779a9
Signed-off-by: Ajay Lele <ajayslele@gmail.com>
5 years agoBump versions by x.y.(z+1) 61/80961/1
jenkins-releng [Mon, 18 Mar 2019 22:21:50 +0000 (22:21 +0000)]
Bump versions by x.y.(z+1)

Change-Id: I20eac651a1986a33e16a9cb2a691528806f65f18
Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
5 years agoRemove superfluous warning 10/80810/1
Robert Varga [Wed, 13 Mar 2019 09:24:48 +0000 (10:24 +0100)]
Remove superfluous warning

Route write path was missing a break; statement, leading to a
warning being emitted when things are perfectly fine.

Change-Id: I418d77ed2efef13c39ee4b40715c1708a45a42fc
JIRA: BGPCEP-869
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 83c02dfd3307b32b16c5a6caba2a280e6a175a36)

5 years agoTake our advertized tables into consideration in RibOut 94/80794/2
Robert Varga [Tue, 12 Mar 2019 11:27:55 +0000 (12:27 +0100)]
Take our advertized tables into consideration in RibOut

Asymmetric configuration of peers can end up with us receiving
tables which we do not advertize towards a peer (but still
process them internally).

In such a case we want to limit adj-rib-out to the intersection
of our advertized and peer-advertized tables.

JIRA: BGPCEP-865
Change-Id: I1b8c0a951c2be513841daf3901ef2b530ed87bf3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix race between BGP config topology DCN and topology-provider registration 76/80776/2
Ajay Lele [Sat, 9 Mar 2019 00:01:48 +0000 (16:01 -0800)]
Fix race between BGP config topology DCN and topology-provider registration

Change-Id: I827aea0722d1fc97ed066eaeebc705b192f3beb0
Signed-off-by: Ajay Lele <ajayslele@gmail.com>
(cherry picked from commit add328eed9dc5b2b1d91f4dd083091adff2d96a5)

5 years agoEnforce outbound parameter/capability length 95/80795/2
Robert Varga [Tue, 12 Mar 2019 12:30:26 +0000 (13:30 +0100)]
Enforce outbound parameter/capability length

Capability and Optional Parameter length fields are only single-byte
entities, limiting the size of capabilities to 255 bytes without
overflow.

Rather than emitting an invalid message, catch this error before
writeout so the operator may make adjustments to ensure this limit
is not exceeded.

JIRA: BGPCEP-867
Change-Id: Idecfcfa1e991aadbdf35cd221f9312dea0f6d0c0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoDisable LLGR by default 96/80796/1
Robert Varga [Tue, 12 Mar 2019 13:40:33 +0000 (14:40 +0100)]
Disable LLGR by default

LLGR is an unfinished feature and advertizing it by default means
we cannot fit our advertizement into the OPEN message. Disable it
by default, allowing users to test it when they need to.

JIRA: BGPCEP-867
Change-Id: Ife9c4c30125b06c3c8edfe7c884835fd6359d84a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd Errata 4493 error codes 64/80764/2
Robert Varga [Mon, 11 Mar 2019 10:35:10 +0000 (11:35 +0100)]
Add Errata 4493 error codes

When we send out a malformed header/update, we may end up receiving
a 1/0 or 3/0 error, which we'll fail to handle on DEBUG level because
we lack the corresponding definition.

Fix this by adding the appropriate references.

JIRA: BGPCEP-864
Change-Id: Ic7437bf34a5e3e6de84f98fc4fd57f8bd1b64bbf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoGuard against torn down peer 60/80760/2
Robert Varga [Mon, 11 Mar 2019 10:04:32 +0000 (11:04 +0100)]
Guard against torn down peer

When we fail to look up peer we should not be throwing a NPE, as we
will end up with inconsistent TransactionChain.

Change-Id: Ia662d4fcb777cce5323fbad820466c9350ec039b
JIRA: BGPCEP-863
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoUpdate .gitreview to stable/neon 03/80103/1
jenkins-releng [Fri, 1 Feb 2019 22:43:44 +0000 (22:43 +0000)]
Update .gitreview to stable/neon

Change-Id: I592332969d78c878d2bdcc782602e4b1e4592b3f
Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
5 years agoUpdate RIB-based constants 89/79989/5
Robert Varga [Tue, 29 Jan 2019 11:20:48 +0000 (12:20 +0100)]
Update RIB-based constants

There are QNames which we are using all over the place, make sure
we concentrate them in a utility holder. Also ensure constants are
suffixed, so we can import them concurrently.

Change-Id: Ie6618aeea776e8278cd7762560636d46ac64bb88
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRework table modification application 55/79955/9
Robert Varga [Sun, 27 Jan 2019 21:54:15 +0000 (22:54 +0100)]
Rework table modification application

This reworks the way a table modification is applied so that we
examine and handle the attributes first -- hence we can understand
that a table has become LLGR_STALE and perform an overwrite.

This also cleans up some the code paths, so they can be optimized
in future, for example the logic for handling route targets.

JIRA: BGPCEP-495
Change-Id: Ic20f55e2fe985b41e971d084ae683eb574b9da33
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoOptimize whole-table overwrite 38/79938/15
Robert Varga [Sun, 27 Jan 2019 20:55:01 +0000 (21:55 +0100)]
Optimize whole-table overwrite

When a table is overwritten, we can treat it as a delete followed
by a fill of after-routes. This simplifies the logic quite a bit
and speeds it up. It also allows parts of it to operate on
before/after data rather than a DataTreeCandidateNode, hence it
is a reusable piece we'll need for LLGR_STALE nodes.

JIRA: BGPCEP-495
Change-Id: Ib84296652d84c4616d617583f14e5395058eac1c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoDo not pass explicit TableKey around 86/79986/2
Robert Varga [Tue, 29 Jan 2019 08:08:03 +0000 (09:08 +0100)]
Do not pass explicit TableKey around

TableKey is derived from RIBSupport, hence if we are passing
RIBSupport somewhere, we do not need to pass TableKey, too.

Change-Id: I30b2196cbcf16201f5885c5af9d1f5b2fed8c8d7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoOptimize deletion of entire adj-rib-in table 32/79932/13
Robert Varga [Fri, 25 Jan 2019 18:43:55 +0000 (19:43 +0100)]
Optimize deletion of entire adj-rib-in table

In case we are deleting an entire table, there is no point in
issuing delete requests for its children.

This refactor eliminates the delete operations, invokes checks
for route target table only once and updates the counters only
once.

This is a stepping stone towards being able to handle LLGR_STALE
routes in an atomic fashion.

JIRA: BGPCEP-495
Change-Id: I3f345cd8764ad83bb39724fbfd42a0bcdc16a009
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix AS number comparison 76/79976/2
Robert Varga [Mon, 28 Jan 2019 18:18:42 +0000 (19:18 +0100)]
Fix AS number comparison

Squashing AS number to an integer makes it possible for it to be
interpreted as a negative number -- which we then fail to squash
to AS_TRANS.

Fix this by forcing the comparison to happen on longs, which does
not suffer from this.

JIRA: BGPCEP-860
Change-Id: Iee10264aef22be70f34b2f122a063331bd0ec142
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFurther cleanup of EffectiveRibInWriter 31/79931/3
Robert Varga [Fri, 25 Jan 2019 18:01:53 +0000 (19:01 +0100)]
Further cleanup of EffectiveRibInWriter

- prevent a potential NPE when empty change is received
- do not store modified children needlessly
- do not log delete duplicates
- do not mask optional to null
- separate out delete/modify/write table methods

Change-Id: I01b340fb3cb3ec0577ccd3856b79388115ff78df
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd RIBNodeIdentifiers 30/79930/1
Robert Varga [Fri, 25 Jan 2019 16:56:56 +0000 (17:56 +0100)]
Add RIBNodeIdentifiers

We are allocating constant NodeIdentifiers across the board, some
efficiently, some inefficiently.

Move these constants to a single place where they can be maintained,
optimizing their users.

Change-Id: Ica9f7b299cbcb7f757f4fc7152c916bda58aa63f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoCleanup EffectiveRibInWriter 28/79928/1
Robert Varga [Fri, 25 Jan 2019 15:56:42 +0000 (16:56 +0100)]
Cleanup EffectiveRibInWriter

Cleanup argument formatting and remove duplicate key lookup,
as RIBSupport is freely available from RIBSupportContext.

Change-Id: Id99f3c553784647c3f28263b604da9c51864e5a6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump to mdsal 3.0.6 08/79808/1
Stephen Kitt [Tue, 22 Jan 2019 08:51:00 +0000 (09:51 +0100)]
Bump to mdsal 3.0.6

Change-Id: Ic974f195b06993a955e6884f235ec7befe83258a
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoBump mdsal to 3.0.5 50/79750/4
Robert Varga [Sun, 20 Jan 2019 02:41:03 +0000 (03:41 +0100)]
Bump mdsal to 3.0.5

This aligns with odlparent-4.0.9 and yangtools-2.1.8.

Change-Id: Ie0e9a934feec1e204fe1de3a8cfb7f997a0d94bf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump yangtools to 2.1.8 48/79748/2
Robert Varga [Sun, 20 Jan 2019 02:36:08 +0000 (03:36 +0100)]
Bump yangtools to 2.1.8

This align with odlparent-4.0.9.

Change-Id: Id057d68ae7cb82300e85aeee78cd18703b304cc7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump to odlparent 4.0.9 62/79662/1
Stephen Kitt [Fri, 18 Jan 2019 15:32:04 +0000 (16:32 +0100)]
Bump to odlparent 4.0.9

Change-Id: Ic87ccbe86130989e442ea9be6fe90bc882fbee7a
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoReuse attributes after apply import policy 91/79491/3
Claudio D. Gasparini [Fri, 11 Jan 2019 23:39:48 +0000 (00:39 +0100)]
Reuse attributes after apply import policy

Update attributes only if there has been any
change applied by import policy. Otherwise
attibutes are the same for the route that
has been already stored.

Change-Id: I288cea16badcd81ce4d5aef21214394421bb992c
Signed-off-by: Claudio D. Gasparini <claudio.gasparini@pantheon.tech>
5 years agoHandle table deletion under eff-rib-in 98/79498/1
Claudio D. Gasparini [Sun, 13 Jan 2019 13:26:48 +0000 (14:26 +0100)]
Handle table deletion under eff-rib-in

Improve handling of empty tables

Change-Id: If33ad3eea717288f743c8e74e8b5c76263dcc0a3
Signed-off-by: Claudio D. Gasparini <claudio.gasparini@pantheon.tech>
5 years agoDisable treat-as-withdraw on config example 92/79492/1
Claudio D. Gasparini [Fri, 11 Jan 2019 23:54:23 +0000 (00:54 +0100)]
Disable treat-as-withdraw on config example

given that tears down session with test using
exabgp.

Change-Id: I1d46f942c338c445ddd61591b457b915ceb66bac
Signed-off-by: Claudio D. Gasparini <claudio.gasparini@pantheon.tech>
5 years agoBump mdsal to 3.0.4 28/79428/2
Robert Varga [Thu, 10 Jan 2019 15:41:29 +0000 (16:41 +0100)]
Bump mdsal to 3.0.4

This realigns odlparent/yangtools/mdsal and brings in the latest
improvements.

Change-Id: Icd864396fb4c0190c5b1311abfd3e1a0f29d8208
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove duplication concepts dependency 42/79442/2
Robert Varga [Thu, 10 Jan 2019 16:04:34 +0000 (17:04 +0100)]
Remove duplication concepts dependency

This fixes a maven warning.

Change-Id: I08f8b6509b4ba5ab2ceb252e44465e608e7fb3e2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump yangtools to 2.1.7 24/79424/1
Robert Varga [Thu, 10 Jan 2019 15:34:06 +0000 (16:34 +0100)]
Bump yangtools to 2.1.7

This realigns odlparent/yangtools and brings in a few minor
improvements.

Change-Id: I28c6f2b5c2dea41f501fcc479f93eaadd8fc8df7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump to odlparent 4.0.8 72/79372/1
Stephen Kitt [Wed, 9 Jan 2019 14:54:51 +0000 (15:54 +0100)]
Bump to odlparent 4.0.8

Change-Id: Idd2e5a252daef4e17b114d36bad94d8383431d43
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoVerify dataobject is Route 25/79325/2
Claudio D. Gasparini [Tue, 8 Jan 2019 22:22:39 +0000 (23:22 +0100)]
Verify dataobject is Route

before casting when mapping from Normalized node

Change-Id: I4b28b50c42de2c577d325b1f42bd4c435c14592d
Signed-off-by: Claudio D. Gasparini <claudio.gasparini@pantheon.tech>
5 years agoFix feature dependencies 56/79256/1
Robert Varga [Sun, 6 Jan 2019 23:27:03 +0000 (00:27 +0100)]
Fix feature dependencies

Even after migrations, features should depend on odl-mdsal-broker,
not dom-broker, as otherwise they do not correctly squash their
dependencies and they will fail to bring in the implementation.

Change-Id: I4633ed8dacc191f42fad27b8fd624beecf888d2f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoUse version range for odl-netty-4 55/79255/1
Robert Varga [Sun, 6 Jan 2019 22:34:29 +0000 (23:34 +0100)]
Use version range for odl-netty-4

odlparent features should use ranges, do precisely that.

Change-Id: I4a60dbde4edb2441eb9c0167720bdf7b88bf6831
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove unneeded jaxb-api exclusion 54/79254/1
Robert Varga [Sun, 6 Jan 2019 22:28:00 +0000 (23:28 +0100)]
Remove unneeded jaxb-api exclusion

odlparent-4.0.5+ is providing a correct definition, there is no
need to exclude it here.

Change-Id: I837eab31bf2ca4c4d0514051585942fcdbc1b601
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove unneeded stax-api 53/79253/1
Robert Varga [Sun, 6 Jan 2019 22:26:52 +0000 (23:26 +0100)]
Remove unneeded stax-api

Normal XML APIs are part of JRE, there is just no need to declare
them explicitly.

Change-Id: Ic02ac04d3b95544c813b34bea0698df6a0b6f8a5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoUse odl-apache-commons-lang3 feature 52/79252/1
Robert Varga [Sun, 6 Jan 2019 22:25:37 +0000 (23:25 +0100)]
Use odl-apache-commons-lang3 feature

commons-lang3 is packaged by odlparent, use that instead packaging
it ourselves.

Change-Id: I7d2247ac243b6af8def05d9f708c35be5369c982
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMove EffectiveRibInWriter to Binding independent 41/79041/8
Claudio D. Gasparini [Sat, 22 Dec 2018 23:35:40 +0000 (00:35 +0100)]
Move EffectiveRibInWriter to Binding independent

JIRA: BGPCEP-853
Change-Id: I96e4b858bf41a2c1fb44810c684dd1c9f1d27907
Signed-off-by: Claudio D. Gasparini <claudio.gasparini@pantheon.tech>
5 years agoAdd jaxb-api dependency 18/79218/1
Robert Varga [Fri, 4 Jan 2019 02:43:53 +0000 (03:43 +0100)]
Add jaxb-api dependency

Java 11 does not ship jaxb-api, add an explicit dependency
to make compilation work.

Change-Id: I86e925e6efb4a186aed022237720a05de5d88d7d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump odlparent to 4.0.7 13/79113/2
Stephen Kitt [Wed, 2 Jan 2019 10:23:42 +0000 (11:23 +0100)]
Bump odlparent to 4.0.7

Change-Id: I7e3f22a4b0c5b0dde28dd8823527200b4e4d683d
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoFix ll graceful-restart-config 94/79094/1
Claudio D. Gasparini [Mon, 31 Dec 2018 19:58:53 +0000 (20:58 +0100)]
Fix ll graceful-restart-config

Wrong configuration has been introducer by
I0bf449c7dc1e08e4c68fcba5673f54de3a4fe0dd
breaking all integration test.
Fix typos and aling names under models

JIRA:BGPCEP-495
Change-Id: I49b46db181705fb05e31a7f8b3ba6b99de86735f
Signed-off-by: Claudio D. Gasparini <claudio.gasparini@pantheon.tech>
5 years agoBump mdsal to 3.0.3 14/79014/1
Robert Varga [Sun, 23 Dec 2018 22:36:11 +0000 (23:36 +0100)]
Bump mdsal to 3.0.3

This brings in latest fixes and alignes with odlparent-4.0.5.

Change-Id: I28cde8f1d88d1af96a48a8b6ae082334954df926
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump to yangtools-2.1.6 04/79004/2
Robert Varga [Sun, 23 Dec 2018 07:03:25 +0000 (08:03 +0100)]
Bump to yangtools-2.1.6

This brings in latest fixes and odlparent-4.0.5 alignment.

Change-Id: I0b19dec51e35a6050df04622b6acb765bcad3509
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix EffectiveRibInWriter.writeTable() 85/78885/4
Robert Varga [Thu, 20 Dec 2018 06:40:07 +0000 (07:40 +0100)]
Fix EffectiveRibInWriter.writeTable()

This patch fixes the case where the entire adj-rib-in table
is overwritten, so that such case leads to eff-rib-in table
being re-creeated from scratch.

This requires RIBSupport to be updated to allow extraction
on routes from data rather than just from DataObjectModification.

JIRA: BGPCEP-857
Change-Id: I6f88c4e30acb8498964cc9295f42c2ecbcab7251
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump to odlparent 4.0.5 08/78908/3
Stephen Kitt [Fri, 21 Dec 2018 09:09:31 +0000 (10:09 +0100)]
Bump to odlparent 4.0.5

Change-Id: I4de2360ccfe5c3c8d0f5f3d8d5ec9ccc637f3f31
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoMigrate AbstractRegistration/AutoCloseable 23/78923/1
Robert Varga [Thu, 20 Dec 2018 23:10:50 +0000 (00:10 +0100)]
Migrate AbstractRegistration/AutoCloseable

yangtools.concepts provides equivalent functionality, migrate
all components to use Registration concept instead of AutoCloseable.

Change-Id: I1c2646623d5dc6b4589cc931810ecbfcf055e50f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd BGP-LS Performance Metrics support 33/78833/2
odd22 [Mon, 17 Dec 2018 10:37:20 +0000 (11:37 +0100)]
Add BGP-LS Performance Metrics support

Allow BGP-LS to handle Performance Metrics as per draft "BGP-LS Advertisement
of IGP Traffic Engineering Performance Metric Extensions"
https://tools.ietf.org/html/draft-ietf-idr-te-pm-bgp-17

 - Add new entries in bgp-linkstate.yang
 - Add description, reference and units to delay and loss typedef
 - Add new parser in LinkAttributesParser.java
 - Add corresponding tests in LinkstateAttributeParserTest.java

JIRA: BGPCEP-855

Change-Id: I0b8cb1f34ede8675d33fcdc746b93d613ce8c484
Signed-off-by: odd22 <olivier.dugeon@orange.com>
5 years agoCleanup client dispatchers 47/78847/2
Robert Varga [Mon, 17 Dec 2018 19:29:49 +0000 (20:29 +0100)]
Cleanup client dispatchers

In presence of Epoll support, each BGPDispatcherImpl is a heavy-weight
resource, which must be properly cleaned up.

Register all created dispatchers and tear them down when the test
finishes.

Change-Id: I3df7e72039a38f6f159e5a5cecf376d85529627a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix AbstractAddPathTest resource cleanup 46/78846/2
Robert Varga [Mon, 17 Dec 2018 19:22:51 +0000 (20:22 +0100)]
Fix AbstractAddPathTest resource cleanup

The tests were not calling super.tearDown() for some reason,
fix that up.

Change-Id: Ia8eea6d4315a1d16613b6e66376102e2f713cba1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoEnforce pcep-spi checkstyle 43/78843/2
Robert Varga [Mon, 17 Dec 2018 16:23:09 +0000 (17:23 +0100)]
Enforce pcep-spi checkstyle

This is trivial conversion, removing reflection-based tests
and killing unneeded final's and splitting long lines.

Change-Id: I158060d63cb59c387428897af9dc47efaf56dcee
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoDo not instantiate executor service for tasks 23/78823/2
Robert Varga [Sat, 15 Dec 2018 19:01:09 +0000 (20:01 +0100)]
Do not instantiate executor service for tasks

Netty channel (which backs each BGPSession) is itself backed by
an EventLoop, which is an implementation of ScheduledExecutorService.

Take advantage of this to schedule the timers we need, instead
of leaking threads by allocating executor services again and
again.

Change-Id: I6bb4bf8d63abd0af0c8cf10012a905db8fa0975d
JIRA: BGPCEP-495
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoPropagate LLGR configuration 22/78822/1
Robert Varga [Sat, 15 Dec 2018 17:53:42 +0000 (18:53 +0100)]
Propagate LLGR configuration

Add BGPPeer awareness of LLGR, with basic configuration and
negotiation, without following required mechanics yet.

JIRA: BGPCEP-495
Change-Id: I659fcdb35ffc9884f3cfb579d98495cee48d468d
Signed-off-by: Matej Perina <matej.perina@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix a checkstyle violation 21/78821/1
Robert Varga [Sat, 15 Dec 2018 17:23:31 +0000 (18:23 +0100)]
Fix a checkstyle violation

This is a missing space, fix that.

Change-Id: Ia676cab69575ef5408268256a4d2e3920a340cf7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix BGPPeer internal locking 20/78820/1
Robert Varga [Sat, 15 Dec 2018 17:10:56 +0000 (18:10 +0100)]
Fix BGPPeer internal locking

onRouteRefreshMessage() is not synchronized and manipulates
adjRibOutListenerSet, which is a thread-safety hazard.

Fix by holding a lock for the duration needed, as well as
use a single remove() operation instead of get/remove combo.

Finally lower private method synchronization and replace it
with @GuardedBy annotations, so that it is understood those
methods are only ever called with the lock already held.

Change-Id: Idd509a345dfc3afa800e7456fb6d3bdbd1f367e7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix more rib-impl checkstyle 15/78815/1
Robert Varga [Sat, 15 Dec 2018 10:54:30 +0000 (11:54 +0100)]
Fix more rib-impl checkstyle

This brings the number of violations below 60.

Change-Id: I177545b21da1f965a6db936341223a732560d4d0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix some rib-impl warnigs 55/78755/7
Robert Varga [Thu, 13 Dec 2018 12:56:56 +0000 (13:56 +0100)]
Fix some rib-impl warnigs

This patch addresses about half of the warnings generate rib-impl.

Change-Id: Ibfcddf215c0add72d9b13a192381b7390233cfcf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoJUnit test for treat-as-withdraw procedures 53/78653/34
Matej Perina [Mon, 10 Dec 2018 14:51:05 +0000 (15:51 +0100)]
JUnit test for treat-as-withdraw procedures

add test to verify that parsing UPDATE message with
malformed attribute list result in converting:
- Nlri to withdrawn routes (parser-impl test)
- MP_REACH to MP_UNREACH (extensions/inet test)

JIRA: BGPCEP-359
Change-Id: Ia0ad989c15e1645746942a662e7da1d5a079b9ad
Signed-off-by: Matej Perina <matej.perina@pantheon.tech>
5 years agoRefactor StaleBestPathRoute 12/78512/20
Robert Varga [Fri, 14 Dec 2018 17:07:38 +0000 (18:07 +0100)]
Refactor StaleBestPathRoute

This removes the dependency on RIBSupport by forcing users to provide
proper lists. Since there are only two users, we can create specialized
instances, co-located with them, so that we do not have to cross through
SPI/implementation boundaries.

This allows saves quite a bit of memory in non-addpath case and also
improves code AddPathAbstractRouteEntry isolation, as we no longer
leak List<Long> all over the place.

Change-Id: I48b91d15df738095812736dfdeaa71d88b30598b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoPass PathIds to StaleBestRoute 79/78779/6
Robert Varga [Fri, 14 Dec 2018 02:23:38 +0000 (03:23 +0100)]
Pass PathIds to StaleBestRoute

At the end of the day, StaleBestRoute needs to be refactored
so that we have two implementations: one for addpath, one for
non-addpath selection.

As a first step, make sure callers allocate PathIds and pass
them to StaleBestRoute.

Change-Id: Ief9a0280eec1bfa99530f3aedef8451a98ac35df
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>