diff options
| author | Anuradha Karuppiah <anuradhak@nvidia.com> | 2022-01-01 09:18:33 -0800 | 
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2022-06-27 07:56:55 -0400 | 
| commit | 36c3b29675300b5683a97f1e3796a1f6d1778d88 (patch) | |
| tree | 77f3b125cc4eafdac2c7ff8445e421ae485b1965 /zebra/debug.c | |
| parent | 0c57fcc731b78949b26f7f12e13b7d725db362f5 (diff) | |
zebra: infastructure for the new dataplane plugin
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
Diffstat (limited to 'zebra/debug.c')
| -rw-r--r-- | zebra/debug.c | 40 | 
1 files changed, 40 insertions, 0 deletions
diff --git a/zebra/debug.c b/zebra/debug.c index 98e25af857..69aaed33ac 100644 --- a/zebra/debug.c +++ b/zebra/debug.c @@ -38,6 +38,7 @@ unsigned long zebra_debug_mpls;  unsigned long zebra_debug_vxlan;  unsigned long zebra_debug_pw;  unsigned long zebra_debug_dplane; +unsigned long zebra_debug_dplane_dpdk;  unsigned long zebra_debug_mlag;  unsigned long zebra_debug_nexthop;  unsigned long zebra_debug_evpn_mh; @@ -108,6 +109,11 @@ DEFUN_NOSH (show_debugging_zebra,  		vty_out(vty, "  Zebra detailed dataplane debugging is on\n");  	else if (IS_ZEBRA_DEBUG_DPLANE)  		vty_out(vty, "  Zebra dataplane debugging is on\n"); +	if (IS_ZEBRA_DEBUG_DPLANE_DPDK_DETAIL) +		vty_out(vty, +			"  Zebra detailed dpdk dataplane debugging is on\n"); +	else if (IS_ZEBRA_DEBUG_DPLANE_DPDK) +		vty_out(vty, "  Zebra dataplane dpdk debugging is on\n");  	if (IS_ZEBRA_DEBUG_MLAG)  		vty_out(vty, "  Zebra mlag debugging is on\n");  	if (IS_ZEBRA_DEBUG_NHG_DETAIL) @@ -317,6 +323,29 @@ DEFUN (debug_zebra_dplane,  	return CMD_SUCCESS;  } +DEFPY(debug_zebra_dplane_dpdk, debug_zebra_dplane_dpdk_cmd, +      "[no$no] debug zebra dplane dpdk [detailed$detail]", +      NO_STR DEBUG_STR +      "Zebra configuration\n" +      "Debug zebra dataplane events\n" +      "Debug zebra DPDK offload events\n" +      "Detailed debug information\n") +{ +	if (no) { +		UNSET_FLAG(zebra_debug_dplane_dpdk, ZEBRA_DEBUG_DPLANE_DPDK); +		UNSET_FLAG(zebra_debug_dplane_dpdk, +			   ZEBRA_DEBUG_DPLANE_DPDK_DETAIL); +	} else { +		SET_FLAG(zebra_debug_dplane_dpdk, ZEBRA_DEBUG_DPLANE_DPDK); + +		if (detail) +			SET_FLAG(zebra_debug_dplane, +				 ZEBRA_DEBUG_DPLANE_DPDK_DETAIL); +	} + +	return CMD_SUCCESS; +} +  DEFUN (debug_zebra_pbr,         debug_zebra_pbr_cmd,         "debug zebra pbr", @@ -698,6 +727,14 @@ static int config_write_debug(struct vty *vty)  		write++;  	} +	if (CHECK_FLAG(zebra_debug_dplane, ZEBRA_DEBUG_DPLANE_DPDK_DETAIL)) { +		vty_out(vty, "debug zebra dplane dpdk detailed\n"); +		write++; +	} else if (CHECK_FLAG(zebra_debug_dplane, ZEBRA_DEBUG_DPLANE_DPDK)) { +		vty_out(vty, "debug zebra dplane dpdk\n"); +		write++; +	} +  	if (CHECK_FLAG(zebra_debug_nexthop, ZEBRA_DEBUG_NHG_DETAILED)) {  		vty_out(vty, "debug zebra nexthop detail\n");  		write++; @@ -730,6 +767,7 @@ void zebra_debug_init(void)  	zebra_debug_vxlan = 0;  	zebra_debug_pw = 0;  	zebra_debug_dplane = 0; +	zebra_debug_dplane_dpdk = 0;  	zebra_debug_mlag = 0;  	zebra_debug_evpn_mh = 0;  	zebra_debug_nht = 0; @@ -758,6 +796,7 @@ void zebra_debug_init(void)  	install_element(ENABLE_NODE, &debug_zebra_nexthop_cmd);  	install_element(ENABLE_NODE, &debug_zebra_pbr_cmd);  	install_element(ENABLE_NODE, &debug_zebra_neigh_cmd); +	install_element(ENABLE_NODE, &debug_zebra_dplane_dpdk_cmd);  	install_element(ENABLE_NODE, &no_debug_zebra_events_cmd);  	install_element(ENABLE_NODE, &no_debug_zebra_nht_cmd);  	install_element(ENABLE_NODE, &no_debug_zebra_mpls_cmd); @@ -786,6 +825,7 @@ void zebra_debug_init(void)  	install_element(CONFIG_NODE, &debug_zebra_rib_cmd);  	install_element(CONFIG_NODE, &debug_zebra_fpm_cmd);  	install_element(CONFIG_NODE, &debug_zebra_dplane_cmd); +	install_element(CONFIG_NODE, &debug_zebra_dplane_dpdk_cmd);  	install_element(CONFIG_NODE, &debug_zebra_nexthop_cmd);  	install_element(CONFIG_NODE, &debug_zebra_pbr_cmd);  	install_element(CONFIG_NODE, &debug_zebra_neigh_cmd);  | 
