diff options
Diffstat (limited to 'zebra/zebra_dplane.c')
| -rw-r--r-- | zebra/zebra_dplane.c | 48 |
1 files changed, 17 insertions, 31 deletions
diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c index 76d7d00e4a..e93444d22e 100644 --- a/zebra/zebra_dplane.c +++ b/zebra/zebra_dplane.c @@ -2224,20 +2224,14 @@ static int dplane_ctx_rule_init(struct zebra_dplane_ctx *ctx, struct zebra_pbr_rule *new_rule, struct zebra_pbr_rule *old_rule) { - if (IS_ZEBRA_DEBUG_DPLANE_DETAIL) { - char buf1[PREFIX_STRLEN]; - char buf2[PREFIX_STRLEN]; - + if (IS_ZEBRA_DEBUG_DPLANE_DETAIL) zlog_debug( - "init dplane ctx %s: IF %s Prio %u Fwmark %u Src %s Dst %s Table %u", + "init dplane ctx %s: IF %s Prio %u Fwmark %u Src %pFX Dst %pFX Table %u", dplane_op2str(op), new_rule->ifname, new_rule->rule.priority, new_rule->rule.filter.fwmark, - prefix2str(&new_rule->rule.filter.src_ip, buf1, - sizeof(buf1)), - prefix2str(&new_rule->rule.filter.dst_ip, buf2, - sizeof(buf2)), + &new_rule->rule.filter.src_ip, + &new_rule->rule.filter.dst_ip, new_rule->rule.action.table); - } ctx->zd_op = op; ctx->zd_status = ZEBRA_DPLANE_REQUEST_SUCCESS; @@ -2895,15 +2889,10 @@ static enum zebra_dplane_result intf_addr_update_internal( struct zebra_dplane_ctx *ctx = NULL; struct zebra_ns *zns; - if (IS_ZEBRA_DEBUG_DPLANE_DETAIL) { - char addr_str[PREFIX_STRLEN]; - - prefix2str(ifc->address, addr_str, sizeof(addr_str)); - - zlog_debug("init intf ctx %s: idx %d, addr %u:%s", + if (IS_ZEBRA_DEBUG_DPLANE_DETAIL) + zlog_debug("init intf ctx %s: idx %d, addr %u:%pFX", dplane_op2str(op), ifp->ifindex, ifp->vrf_id, - addr_str); - } + ifc->address); ctx = dplane_ctx_alloc(); @@ -3220,8 +3209,8 @@ enum zebra_dplane_result dplane_vtep_add(const struct interface *ifp, struct ipaddr addr; if (IS_ZEBRA_DEBUG_VXLAN) - zlog_debug("Install %s into flood list for VNI %u intf %s(%u)", - inet_ntoa(*ip), vni, ifp->name, ifp->ifindex); + zlog_debug("Install %pI4 into flood list for VNI %u intf %s(%u)", + ip, vni, ifp->name, ifp->ifindex); SET_IPADDR_V4(&addr); addr.ipaddr_v4 = *ip; @@ -3245,8 +3234,8 @@ enum zebra_dplane_result dplane_vtep_delete(const struct interface *ifp, if (IS_ZEBRA_DEBUG_VXLAN) zlog_debug( - "Uninstall %s from flood list for VNI %u intf %s(%u)", - inet_ntoa(*ip), vni, ifp->name, ifp->ifindex); + "Uninstall %pI4 from flood list for VNI %u intf %s(%u)", + ip, vni, ifp->name, ifp->ifindex); SET_IPADDR_V4(&addr); addr.ipaddr_v4 = *ip; @@ -3773,11 +3762,9 @@ static void kernel_dplane_log_detail(struct zebra_dplane_ctx *ctx) case DPLANE_OP_ROUTE_INSTALL: case DPLANE_OP_ROUTE_UPDATE: case DPLANE_OP_ROUTE_DELETE: - prefix2str(dplane_ctx_get_dest(ctx), buf, sizeof(buf)); - - zlog_debug("%u:%s Dplane route update ctx %p op %s", - dplane_ctx_get_vrf(ctx), buf, ctx, - dplane_op2str(dplane_ctx_get_op(ctx))); + zlog_debug("%u:%pFX Dplane route update ctx %p op %s", + dplane_ctx_get_vrf(ctx), dplane_ctx_get_dest(ctx), + ctx, dplane_op2str(dplane_ctx_get_op(ctx))); break; case DPLANE_OP_NH_INSTALL: @@ -3804,11 +3791,10 @@ static void kernel_dplane_log_detail(struct zebra_dplane_ctx *ctx) case DPLANE_OP_ADDR_INSTALL: case DPLANE_OP_ADDR_UNINSTALL: - prefix2str(dplane_ctx_get_intf_addr(ctx), buf, sizeof(buf)); - - zlog_debug("Dplane intf %s, idx %u, addr %s", + zlog_debug("Dplane intf %s, idx %u, addr %pFX", dplane_op2str(dplane_ctx_get_op(ctx)), - dplane_ctx_get_ifindex(ctx), buf); + dplane_ctx_get_ifindex(ctx), + dplane_ctx_get_intf_addr(ctx)); break; case DPLANE_OP_MAC_INSTALL: |
