Vladimir Isaev 779ca383b9 stats: fix state counter removal
Avoid using vec_del1() for directory vector to keep indexes valid all
the time.

There are state counters for each slave in LACP bond mode which can be
dynamically created and removed. Vector index is used to access these
counters. But also vec_del1() is used to remove counter from vector.
This function changes the index of the last element, so after this we
are unable to access ex-last element using old index.

As a result it is not possible to add-del-add two interfaces to the LACP
bond:

DBGvpp# create bond mode lacp
BondEthernet0
DBGvpp# create packet-generator interface pg1
DBGvpp# create packet-generator interface pg2
DBGvpp# bond add BondEthernet0 pg1
DBGvpp# bond add BondEthernet0 pg2
DBGvpp# bond del pg1
DBGvpp# bond del pg2
DBGvpp# bond add BondEthernet0 pg1
DBGvpp# bond add BondEthernet0 pg2
bond add: /if/lacp/1/3/partner-state is already register

Type: fix

Signed-off-by: Vladimir Isaev <visaev@netgate.com>
Change-Id: I2c86e13905eefdef6233369cd4ab5c1b53d123bd
(cherry picked from commit 72e31bc2d9b910147c09e1c329713fccc873a018)
2020-08-12 15:59:46 +00:00
..
2019-09-30 12:13:04 +00:00
2019-06-24 16:03:09 +00:00
2019-06-26 10:10:05 +00:00
2019-06-18 13:31:39 +00:00
2020-08-12 15:59:46 +00:00
2019-06-20 03:36:54 +00:00
2019-06-18 13:31:39 +00:00
2019-06-18 13:31:39 +00:00
2019-06-18 13:31:39 +00:00
2019-06-18 13:31:39 +00:00
2019-06-18 13:31:39 +00:00
2019-06-18 13:31:39 +00:00
2019-06-18 13:31:39 +00:00
2019-06-18 13:31:39 +00:00
2019-06-18 13:31:39 +00:00
2019-06-18 13:31:39 +00:00
2019-06-18 13:31:39 +00:00
2019-11-28 09:24:10 +00:00
2019-06-18 13:31:39 +00:00
2019-09-30 12:13:04 +00:00
2019-06-18 13:31:39 +00:00
2019-06-25 12:37:13 +00:00
2019-06-18 13:31:39 +00:00
2019-06-18 13:31:39 +00:00
2019-06-18 13:31:39 +00:00
2019-06-18 13:54:35 +00:00
2019-07-31 16:17:36 +00:00