diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2025-02-13 10:40:17 -0500 | 
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2025-02-13 10:40:17 -0500 | 
| commit | b4786a61e28341c6cd4bb78bc4039dc798bad9a0 (patch) | |
| tree | b2ee9410a5b1a6fe03b4ec72744ec15d3c01a4c0 | |
| parent | 007243d94de48e285b7912cd4323098774b24320 (diff) | |
pbr: Add tableid to some debugs
Add prefix and tableid to one debug instead of several.
Consolidate a bit.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
| -rw-r--r-- | pbrd/pbr_zebra.c | 12 | 
1 files changed, 6 insertions, 6 deletions
diff --git a/pbrd/pbr_zebra.c b/pbrd/pbr_zebra.c index dd15beaff4..277271c6b6 100644 --- a/pbrd/pbr_zebra.c +++ b/pbrd/pbr_zebra.c @@ -135,9 +135,11 @@ static int route_notify_owner(ZAPI_CALLBACK_ARGS)  	enum zapi_route_notify_owner note;  	uint32_t table_id; -	if (!zapi_route_notify_decode(zclient->ibuf, &p, &table_id, ¬e, -				      NULL, NULL)) +	if (!zapi_route_notify_decode(zclient->ibuf, &p, &table_id, ¬e, NULL, NULL)) { +		DEBUGD(&pbr_dbg_zebra, "%s: Received Notification for which PBR could not decode", +		       __func__);  		return -1; +	}  	switch (note) {  	case ZAPI_ROUTE_FAIL_INSTALL: @@ -236,8 +238,6 @@ static void route_add_helper(struct zapi_route *api, struct nexthop_group nhg,  	api->prefix.family = install_afi; -	DEBUGD(&pbr_dbg_zebra, "    Encoding %pFX", &api->prefix); -  	i = 0;  	for (ALL_NEXTHOPS(nhg, nhop)) {  		api_nh = &api->nexthops[i]; @@ -284,10 +284,10 @@ void route_add(struct pbr_nexthop_group_cache *pnhgc, struct nexthop_group nhg,  {  	struct zapi_route api; -	DEBUGD(&pbr_dbg_zebra, "%s for Table: %d", __func__, pnhgc->table_id); -  	memset(&api, 0, sizeof(api)); +	DEBUGD(&pbr_dbg_zebra, "%s %pFX for Table: %d", __func__, &api.prefix, pnhgc->table_id); +  	api.vrf_id = VRF_DEFAULT;  	api.type = ZEBRA_ROUTE_PBR;  	api.safi = SAFI_UNICAST;  | 
