Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zebra: Reorg struct route_entry to have important bits first #15309

Merged
merged 1 commit into from
Feb 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions zebra/rib.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,25 +85,12 @@ struct route_entry {
*/
struct nhg_hash_entry *nhe;

/* Nexthop group from FIB (optional), reflecting what is actually
* installed in the FIB if that differs. The 'backup' group is used
* when backup nexthops are present in the route's nhg.
*/
struct nexthop_group fib_ng;
struct nexthop_group fib_backup_ng;

/* Nexthop group hash entry IDs. The "installed" id is the id
* used in linux/netlink, if available.
*/
uint32_t nhe_id;
uint32_t nhe_installed_id;

/* Tag */
route_tag_t tag;

/* Uptime. */
time_t uptime;

/* Type of this route. */
int type;

Expand Down Expand Up @@ -160,7 +147,20 @@ struct route_entry {
/* Distance. */
uint8_t distance;

/* Tag */
route_tag_t tag;

/* Uptime. */
time_t uptime;

struct re_opaque *opaque;

/* Nexthop group from FIB (optional), reflecting what is actually
* installed in the FIB if that differs. The 'backup' group is used
* when backup nexthops are present in the route's nhg.
*/
struct nexthop_group fib_ng;
struct nexthop_group fib_backup_ng;
};

#define RIB_SYSTEM_ROUTE(R) RSYSTEM_ROUTE((R)->type)
Expand Down
Loading