]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: Reorder `struct route_entry` to reduce size 4328/head
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 15 Feb 2019 16:57:22 +0000 (11:57 -0500)
committerStephen Worley <sworley@cumulusnetworks.com>
Tue, 14 May 2019 19:23:34 +0000 (12:23 -0700)
Reduce the size of the data structure from 88 bytes to 80 bytes

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
zebra/rib.h

index 8a59cea6d0d5a7000c3999958c4d4faf0de0a93f..141152b04f3eb323d43ce1c13ede7d02202fac5f 100644 (file)
@@ -99,9 +99,6 @@ struct route_entry {
        /* Type fo this route. */
        int type;
 
-       /* Source protocol instance */
-       unsigned short instance;
-
        /* VRF identifier. */
        vrf_id_t vrf_id;
 
@@ -115,9 +112,6 @@ struct route_entry {
        uint32_t mtu;
        uint32_t nexthop_mtu;
 
-       /* Distance. */
-       uint8_t distance;
-
        /* Flags of this route.
         * This flag's definition is in lib/zebra.h ZEBRA_FLAG_* and is exposed
         * to clients via Zserv
@@ -146,6 +140,12 @@ struct route_entry {
 
        /* Sequence value incremented for each dataplane operation */
        uint32_t dplane_sequence;
+
+       /* Source protocol instance */
+       uint16_t instance;
+
+       /* Distance. */
+       uint8_t distance;
 };
 
 /* meta-queue structure: