The flag ROUTE_ENTRY_NEXTHOPS_CHANGED is only ever set or unset.
Since this flag is not used for anything useful, remove from system.
By changing this flag we have re-ordered `internalStatus' of json
output of zebra rib routes. Go through and fix up tetsts to
use the new values.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
"selected": true,
"installed": true,
"prefix": "10.0.3.0/24",
- "internalStatus": 34,
+ "internalStatus": 16,
"nexthops": [
{
"interfaceName": "r1-eth0",
"selected": true,
"installed": true,
"prefix": "10.254.254.2/32",
- "internalStatus": 34,
+ "internalStatus": 16,
"nexthops": [
{
"interfaceName": "r1-eth0",
"selected": true,
"installed": true,
"prefix": "10.254.254.1/32",
- "internalStatus": 32,
+ "internalStatus": 16,
"nexthops": [
{
"directlyConnected": true,
"selected": true,
"installed": true,
"prefix": "2001:db8:4::/64",
- "internalStatus": 34,
+ "internalStatus": 16,
"nexthops": [
{
"interfaceName": "r1-eth0",
"protocol": "bgp",
"internalFlags": 0,
"metric": 0,
- "internalStatus": 2,
+ "internalStatus": 0,
"prefix": "2001:db8:1::/64",
"nexthops": [
{
"selected": true,
"installed": true,
"prefix": "2001:db8:1::/64",
- "internalStatus": 32,
+ "internalStatus": 16,
"nexthops": [
{
"directlyConnected": true,
"protocol": "ospf",
"internalFlags": 0,
"metric": 10,
- "internalStatus": 2,
+ "internalStatus": 0,
"prefix": "10.0.3.0/24",
"nexthops": [
{
"selected": true,
"installed": true,
"prefix": "10.0.3.0/24",
- "internalStatus": 32,
+ "internalStatus": 16,
"nexthops": [
{
"directlyConnected": true,
"selected": true,
"installed": true,
"prefix": "10.254.254.3/32",
- "internalStatus": 34,
+ "internalStatus": 16,
"nexthops": [
{
"interfaceName": "r2-eth1",
"selected": true,
"installed": true,
"prefix": "10.254.254.2/32",
- "internalStatus": 32,
+ "internalStatus": 16,
"nexthops": [
{
"directlyConnected": true,
"selected": true,
"installed": true,
"prefix": "10.254.254.1/32",
- "internalStatus": 34,
+ "internalStatus": 16,
"nexthops": [
{
"interfaceName": "r2-eth0",
"protocol": "ospf6",
"internalFlags": 0,
"metric": 10,
- "internalStatus": 2,
+ "internalStatus": 0,
"prefix": "2001:db8:4::/64",
"nexthops": [
{
"selected": true,
"installed": true,
"prefix": "2001:db8:4::/64",
- "internalStatus": 32,
+ "internalStatus": 16,
"nexthops": [
{
"directlyConnected": true,
"selected": true,
"installed": true,
"prefix": "2001:db8:1::/64",
- "internalStatus": 32,
+ "internalStatus": 16,
"nexthops": [
{
"directlyConnected": true,
"selected": true,
"installed": true,
"prefix": "10.0.3.0/24",
- "internalStatus": 32,
+ "internalStatus": 16,
"nexthops": [
{
"directlyConnected": true,
"selected": true,
"installed": true,
"prefix": "10.254.254.3/32",
- "internalStatus": 32,
+ "internalStatus": 16,
"nexthops": [
{
"directlyConnected": true,
"selected": true,
"installed": true,
"prefix": "10.254.254.2/32",
- "internalStatus": 34,
+ "internalStatus": 16,
"nexthops": [
{
"interfaceName": "r3-eth0",
"selected": true,
"installed": true,
"prefix": "10.254.254.1/32",
- "internalStatus": 34,
+ "internalStatus": 16,
"nexthops": [
{
"interfaceName": "r3-eth0",
"selected": true,
"installed": true,
"prefix": "10.254.254.4/32",
- "internalStatus": 32,
+ "internalStatus": 16,
"nexthops": [
{
"directlyConnected": true,
"protocol": "ospf6",
"internalFlags": 0,
"metric": 10,
- "internalStatus": 2,
+ "internalStatus": 0,
"prefix": "2001:db8:4::/64",
"nexthops": [
{
"selected": true,
"installed": true,
"prefix": "2001:db8:4::/64",
- "internalStatus": 32,
+ "internalStatus": 16,
"nexthops": [
{
"directlyConnected": true,
"selected": true,
"installed": true,
"prefix": "2001:db8:1::/64",
- "internalStatus": 34,
+ "internalStatus": 16,
"nexthops": [
{
"interfaceName": "r4-eth0",
"distance": 20,
"metric": 0,
"installed": true,
- "internalStatus": 34,
+ "internalStatus": 16,
"internalFlags": 8,
"nexthops": [
{
"distance": 0,
"metric": 0,
"installed": true,
- "internalStatus": 32,
+ "internalStatus": 16,
"internalFlags": 8,
"nexthops": [
{
"vrfId":3,
"distance": 20,
"metric": 0,
- "internalStatus": 2,
+ "internalStatus": 0,
"internalFlags": 0,
"nexthops": [
{
"distance": 0,
"metric": 0,
"installed": true,
- "internalStatus": 32,
+ "internalStatus": 16,
"internalFlags": 8,
"nexthops": [
{
"distance": 0,
"metric": 0,
"installed": true,
- "internalStatus": 32,
+ "internalStatus": 16,
"internalFlags": 8,
"nexthops": [
{
"distance": 20,
"metric": 0,
"installed": true,
- "internalStatus": 34,
+ "internalStatus": 16,
"internalFlags": 8,
"nexthops": [
{
"distance": 0,
"metric": 0,
"installed": true,
- "internalStatus": 32,
+ "internalStatus": 16,
"internalFlags": 8,
"nexthops": [
{
/* RIB internal status */
uint32_t status;
#define ROUTE_ENTRY_REMOVED 0x1
-/* to simplify NHT logic when NHs change, instead of doing a NH by NH cmp */
-#define ROUTE_ENTRY_NEXTHOPS_CHANGED 0x2
/* The Route Entry has changed */
-#define ROUTE_ENTRY_CHANGED 0x4
+#define ROUTE_ENTRY_CHANGED 0x2
/* The Label has changed on the Route entry */
-#define ROUTE_ENTRY_LABELS_CHANGED 0x8
+#define ROUTE_ENTRY_LABELS_CHANGED 0x4
/* Route is queued for Installation into the Data Plane */
-#define ROUTE_ENTRY_QUEUED 0x10
+#define ROUTE_ENTRY_QUEUED 0x8
/* Route is installed into the Data Plane */
-#define ROUTE_ENTRY_INSTALLED 0x20
+#define ROUTE_ENTRY_INSTALLED 0x10
/* Route has Failed installation into the Data Plane in some manner */
-#define ROUTE_ENTRY_FAILED 0x40
+#define ROUTE_ENTRY_FAILED 0x20
/* Nexthop information. */
uint8_t nexthop_num;
SET_FLAG(nexthop->flags,
NEXTHOP_FLAG_RECURSIVE);
- SET_FLAG(re->status,
- ROUTE_ENTRY_NEXTHOPS_CHANGED);
nexthop_set_resolved(afi, newhop, nexthop);
resolved = 1;
}
&& nexthop->type < NEXTHOP_TYPE_BLACKHOLE)
&& !(IPV6_ADDR_SAME(&prev_src.ipv6,
&nexthop->rmap_src.ipv6)))
- || CHECK_FLAG(re->status, ROUTE_ENTRY_LABELS_CHANGED)) {
+ || CHECK_FLAG(re->status, ROUTE_ENTRY_LABELS_CHANGED))
SET_FLAG(re->status, ROUTE_ENTRY_CHANGED);
- SET_FLAG(re->status, ROUTE_ENTRY_NEXTHOPS_CHANGED);
- }
}
return re->nexthop_active_num;
re->status, re->flags, re->distance,
re->metric);
- UNSET_FLAG(re->status, ROUTE_ENTRY_NEXTHOPS_CHANGED);
-
/* Currently selected re. */
if (CHECK_FLAG(re->flags, ZEBRA_FLAG_SELECTED)) {
assert(old_selected == NULL);
re = zebra_rnh_resolve_nexthop_entry(zvrf, afi, nrn, rnh,
&prn);
- if (re) {
- UNSET_FLAG(re->status, ROUTE_ENTRY_NEXTHOPS_CHANGED);
+ if (re)
UNSET_FLAG(re->status, ROUTE_ENTRY_LABELS_CHANGED);
- }
}
/* Evaluate all tracked entries (nexthops or routes for import into BGP)