Skip to content

Commit 10388e9

Browse files
committed
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>
1 parent c7f0429 commit 10388e9

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

zebra/zebra_dplane.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ struct dplane_route_info {
135135
uint32_t zd_mtu;
136136
uint32_t zd_nexthop_mtu;
137137

138+
uint32_t zd_flags;
139+
138140
/* Nexthop hash entry info */
139141
struct dplane_nexthop_info nhe;
140142

@@ -1430,6 +1432,20 @@ uint16_t dplane_ctx_get_old_instance(const struct zebra_dplane_ctx *ctx)
14301432
return ctx->u.rinfo.zd_old_instance;
14311433
}
14321434

1435+
uint32_t dplane_ctx_get_flags(const struct zebra_dplane_ctx *ctx)
1436+
{
1437+
DPLANE_CTX_VALID(ctx);
1438+
1439+
return ctx->u.rinfo.zd_flags;
1440+
}
1441+
1442+
void dplane_ctx_set_flags(struct zebra_dplane_ctx *ctx, uint32_t flags)
1443+
{
1444+
DPLANE_CTX_VALID(ctx);
1445+
1446+
ctx->u.rinfo.zd_flags = flags;
1447+
}
1448+
14331449
uint32_t dplane_ctx_get_metric(const struct zebra_dplane_ctx *ctx)
14341450
{
14351451
DPLANE_CTX_VALID(ctx);
@@ -2806,6 +2822,7 @@ int dplane_ctx_route_init(struct zebra_dplane_ctx *ctx, enum dplane_op_e op,
28062822

28072823
ctx->zd_table_id = re->table;
28082824

2825+
ctx->u.rinfo.zd_flags = re->flags;
28092826
ctx->u.rinfo.zd_metric = re->metric;
28102827
ctx->u.rinfo.zd_old_metric = re->metric;
28112828
ctx->zd_vrf_id = re->vrf_id;

zebra/zebra_dplane.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,8 @@ route_tag_t dplane_ctx_get_old_tag(const struct zebra_dplane_ctx *ctx);
380380
uint16_t dplane_ctx_get_instance(const struct zebra_dplane_ctx *ctx);
381381
void dplane_ctx_set_instance(struct zebra_dplane_ctx *ctx, uint16_t instance);
382382
uint16_t dplane_ctx_get_old_instance(const struct zebra_dplane_ctx *ctx);
383+
uint32_t dplane_ctx_get_flags(const struct zebra_dplane_ctx *ctx);
384+
void dplane_ctx_set_flags(struct zebra_dplane_ctx *ctx, uint32_t flags);
383385
uint32_t dplane_ctx_get_metric(const struct zebra_dplane_ctx *ctx);
384386
uint32_t dplane_ctx_get_old_metric(const struct zebra_dplane_ctx *ctx);
385387
uint32_t dplane_ctx_get_mtu(const struct zebra_dplane_ctx *ctx);

0 commit comments

Comments
 (0)