diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2024-10-04 09:38:25 -0400 | 
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2024-10-07 20:36:45 -0400 | 
| commit | f50b1f7c226753c1f4c0ccfeeb78271106924cd8 (patch) | |
| tree | f879e9779bd90deb9f9c000401d4a911f2ac036c /zebra/zebra_rib.c | |
| parent | c10e4d336bd7a7997cdc5e0e28ca2f4b59cf9f0a (diff) | |
zebra: Move pw status settting until after we get results
Currently the pw code sets the status of the pw for install
and uninstall immediately when notifying the dplane.  This
is incorrect in that we do not actually know the status at
this point in time.  When we get the result is when to set
the status.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'zebra/zebra_rib.c')
| -rw-r--r-- | zebra/zebra_rib.c | 25 | 
1 files changed, 1 insertions, 24 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 2d2be4fc78..8ebc193fba 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -4851,29 +4851,6 @@ void rib_close_table(struct route_table *table)  }  /* - * Handler for async dataplane results after a pseudowire installation - */ -static void handle_pw_result(struct zebra_dplane_ctx *ctx) -{ -	struct zebra_pw *pw; -	struct zebra_vrf *vrf; - -	/* The pseudowire code assumes success - we act on an error -	 * result for installation attempts here. -	 */ -	if (dplane_ctx_get_op(ctx) != DPLANE_OP_PW_INSTALL) -		return; - -	if (dplane_ctx_get_status(ctx) != ZEBRA_DPLANE_REQUEST_SUCCESS) { -		vrf = zebra_vrf_lookup_by_id(dplane_ctx_get_vrf(ctx)); -		pw = zebra_pw_find(vrf, dplane_ctx_get_ifname(ctx)); -		if (pw) -			zebra_pw_install_failure(pw, -						 dplane_ctx_get_pw_status(ctx)); -	} -} - -/*   * Handle results from the dataplane system. Dequeue update context   * structs, dispatch to appropriate internal handlers.   */ @@ -4979,7 +4956,7 @@ static void rib_process_dplane_results(struct event *thread)  			case DPLANE_OP_PW_INSTALL:  			case DPLANE_OP_PW_UNINSTALL: -				handle_pw_result(ctx); +				zebra_pw_handle_dplane_results(ctx);  				break;  			case DPLANE_OP_SYS_ROUTE_ADD:  | 
