if (IS_ZEBRA_DEBUG_KERNEL)
zlog_debug("%s: can't find zns id %u", __func__, ns_id);
- goto done;
+ return;
}
ifp = if_lookup_by_index_per_ns(zns, ifindex);
"%s: can't find ifp at nsid %u index %d",
__func__, ns_id, ifindex);
- goto done;
+ return;
}
}
case DPLANE_OP_GRE_SET:
break; /* should never hit here */
}
-done:
- dplane_ctx_fini(&ctx);
}
/* Dump if address information to vty. */
break;
} /* Switch */
-
- dplane_ctx_fini(&ctx);
}
/*
/* Look for zebra LSP object */
zvrf = vrf_info_lookup(VRF_DEFAULT);
if (zvrf == NULL)
- goto done;
+ return;
lsp_table = zvrf->lsp_table;
if (is_debug)
zlog_debug("dplane LSP notif: in-label %u not found",
dplane_ctx_get_in_label(ctx));
- goto done;
+ return;
}
/*
UNSET_FLAG(lsp->flags, LSP_FLAG_INSTALLED);
clear_nhlfe_installed(lsp);
}
-
-done:
- dplane_ctx_fini(&ctx);
}
/*
if (rn)
route_unlock_node(rn);
-
- /* Return context to dataplane module */
- dplane_ctx_fini(&ctx);
}
/*
done:
if (rn)
route_unlock_node(rn);
-
- /* Return context to dataplane module */
- dplane_ctx_fini(&ctx);
}
/*
/*
* Handler for async dataplane results after a pseudowire installation
*/
-static int handle_pw_result(struct zebra_dplane_ctx *ctx)
+static void handle_pw_result(struct zebra_dplane_ctx *ctx)
{
struct zebra_pw *pw;
struct zebra_vrf *vrf;
* result for installation attempts here.
*/
if (dplane_ctx_get_op(ctx) != DPLANE_OP_PW_INSTALL)
- goto done;
+ return;
if (dplane_ctx_get_status(ctx) != ZEBRA_DPLANE_REQUEST_SUCCESS) {
vrf = zebra_vrf_lookup_by_id(dplane_ctx_get_vrf(ctx));
zebra_pw_install_failure(pw,
dplane_ctx_get_pw_status(ctx));
}
-
-done:
- dplane_ctx_fini(&ctx);
-
- return 0;
}
-
/*
* Handle results from the dataplane system. Dequeue update context
* structs, dispatch to appropriate internal handlers.
case DPLANE_OP_ROUTE_INSTALL:
case DPLANE_OP_ROUTE_UPDATE:
case DPLANE_OP_ROUTE_DELETE:
- {
/* Bit of special case for route updates
* that were generated by async notifications:
* we don't want to continue processing these
*/
if (dplane_ctx_get_notif_provider(ctx) == 0)
rib_process_result(ctx);
- else
- dplane_ctx_fini(&ctx);
- }
- break;
+ break;
case DPLANE_OP_ROUTE_NOTIFY:
rib_process_dplane_notify(ctx);
case DPLANE_OP_LSP_INSTALL:
case DPLANE_OP_LSP_UPDATE:
case DPLANE_OP_LSP_DELETE:
- {
/* Bit of special case for LSP updates
* that were generated by async notifications:
* we don't want to continue processing these.
*/
if (dplane_ctx_get_notif_provider(ctx) == 0)
zebra_mpls_lsp_dplane_result(ctx);
- else
- dplane_ctx_fini(&ctx);
- }
- break;
+ break;
case DPLANE_OP_LSP_NOTIFY:
zebra_mpls_process_dplane_notify(ctx);
case DPLANE_OP_SYS_ROUTE_ADD:
case DPLANE_OP_SYS_ROUTE_DELETE:
- /* No further processing in zebra for these. */
- dplane_ctx_fini(&ctx);
break;
case DPLANE_OP_MAC_INSTALL:
case DPLANE_OP_NEIGH_TABLE_UPDATE:
case DPLANE_OP_GRE_SET:
case DPLANE_OP_NONE:
- /* Don't expect this: just return the struct? */
- dplane_ctx_fini(&ctx);
break;
} /* Dispatch by op code */
+ dplane_ctx_fini(&ctx);
ctx = dplane_ctx_dequeue(&ctxlist);
}