diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2022-10-03 15:28:48 -0400 | 
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2022-12-12 10:44:57 -0500 | 
| commit | 10388e99c490f4a3d76586d14ce13ac039ad43d1 (patch) | |
| tree | c84cf6e9e29113c0c53d016d73ce41e3412d9444 /zebra/zebra_dplane.c | |
| parent | c7f0429e813e01b697c7779cd5e3bada5f692446 (diff) | |
zebra: Add dplane_ctx_get|set_flags
Zebra needs the ability to pass this data around.
Add it to the dplanes ability to pass.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
zebra: Add a dplane_ctx_set_flags
The dplane_ctx_set_flags call is missing, we will need it.  Add it.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'zebra/zebra_dplane.c')
| -rw-r--r-- | zebra/zebra_dplane.c | 17 | 
1 files changed, 17 insertions, 0 deletions
diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c index 698cda8b8c..1deac4bffe 100644 --- a/zebra/zebra_dplane.c +++ b/zebra/zebra_dplane.c @@ -135,6 +135,8 @@ struct dplane_route_info {  	uint32_t zd_mtu;  	uint32_t zd_nexthop_mtu; +	uint32_t zd_flags; +  	/* Nexthop hash entry info */  	struct dplane_nexthop_info nhe; @@ -1430,6 +1432,20 @@ uint16_t dplane_ctx_get_old_instance(const struct zebra_dplane_ctx *ctx)  	return ctx->u.rinfo.zd_old_instance;  } +uint32_t dplane_ctx_get_flags(const struct zebra_dplane_ctx *ctx) +{ +	DPLANE_CTX_VALID(ctx); + +	return ctx->u.rinfo.zd_flags; +} + +void dplane_ctx_set_flags(struct zebra_dplane_ctx *ctx, uint32_t flags) +{ +	DPLANE_CTX_VALID(ctx); + +	ctx->u.rinfo.zd_flags = flags; +} +  uint32_t dplane_ctx_get_metric(const struct zebra_dplane_ctx *ctx)  {  	DPLANE_CTX_VALID(ctx); @@ -2806,6 +2822,7 @@ int dplane_ctx_route_init(struct zebra_dplane_ctx *ctx, enum dplane_op_e op,  	ctx->zd_table_id = re->table; +	ctx->u.rinfo.zd_flags = re->flags;  	ctx->u.rinfo.zd_metric = re->metric;  	ctx->u.rinfo.zd_old_metric = re->metric;  	ctx->zd_vrf_id = re->vrf_id;  | 
