Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bgpd: CLI Changes #17553

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

bgpd: add documentation for EVPN type-5 per-prefix command

abdedc5
Select commit
Loading
Failed to load commit list.
Open

bgpd: CLI Changes #17553

bgpd: add documentation for EVPN type-5 per-prefix command
abdedc5
Select commit
Loading
Failed to load commit list.
frrbot / frrbot completed Dec 4, 2024 in 7s

Style and/or linter errors found

Style and/or linter errors found

Details

Thanks for your contribution to FRR!

Click for style suggestions

diff --git a/bgpd/bgp_evpn_vty.c b/bgpd/bgp_evpn_vty.c
index 8866a5b5a..7c68c7217 100644
--- a/bgpd/bgp_evpn_vty.c
+++ b/bgpd/bgp_evpn_vty.c
@@ -2837,10 +2837,8 @@ static void evpn_show_route_rd_macip(struct vty *vty, struct bgp *bgp,
  * (vty handler). By definition, only matching type-5 route will be
  * displayed.
  */
-static void evpn_show_route_rd_prefix(struct vty *vty, struct bgp *bgp,
-				      struct prefix_rd *prd,
-				      struct prefix *ip_prefix,
-				      json_object *json)
+static void evpn_show_route_rd_prefix(struct vty *vty, struct bgp *bgp, struct prefix_rd *prd,
+				      struct prefix *ip_prefix, json_object *json)
 {
 	struct prefix_evpn p;
 	struct bgp_dest *dest;
@@ -2858,28 +2856,26 @@ static void evpn_show_route_rd_prefix(struct vty *vty, struct bgp *bgp,
 	build_type5_prefix_from_ip_prefix(&p, ip_prefix);
 
 	/* See if route exists. */
-	dest = bgp_safi_node_lookup(bgp->rib[afi][safi], safi,
-				 (struct prefix *)&p, prd);
+	dest = bgp_safi_node_lookup(bgp->rib[afi][safi], safi, (struct prefix *)&p, prd);
 	if (!dest || !bgp_dest_has_bgp_path_info_data(dest)) {
 		if (!json)
 			vty_out(vty, "%% Network not in table\n");
 		return;
 	}
 
-	prefix2str((struct prefix_evpn *)&p, prefix_str,
-			   sizeof(prefix_str));
+	prefix2str((struct prefix_evpn *)&p, prefix_str, sizeof(prefix_str));
 
 	/* Prefix and num paths displayed once per prefix. */
-	route_vty_out_detail_header(vty, bgp, dest, bgp_dest_get_prefix(dest), prd,
-				    afi, safi, json, false, false);
+	route_vty_out_detail_header(vty, bgp, dest, bgp_dest_get_prefix(dest), prd, afi, safi, json,
+				    false, false);
 
 	if (json)
 		json_paths = json_object_new_array();
 
 	/* Display each path for this prefix. */
 	for (pi = bgp_dest_get_bgp_path_info(dest); pi; pi = pi->next) {
-		route_vty_out_detail(vty, bgp, dest, bgp_dest_get_prefix(dest), pi,
-				     afi, safi, RPKI_NOT_BEING_USED, json_paths);
+		route_vty_out_detail(vty, bgp, dest, bgp_dest_get_prefix(dest), pi, afi, safi,
+				     RPKI_NOT_BEING_USED, json_paths);
 		path_cnt++;
 	}
 
@@ -2888,8 +2884,7 @@ static void evpn_show_route_rd_prefix(struct vty *vty, struct bgp *bgp,
 			json_object_object_add(json, "paths", json_paths);
 		json_object_int_add(json, "numPaths", path_cnt);
 	} else {
-		vty_out(vty, "\nDisplayed %u paths for requested prefix\n",
-			path_cnt);
+		vty_out(vty, "\nDisplayed %u paths for requested prefix\n", path_cnt);
 	}
 }
 
@@ -5236,8 +5231,7 @@ DEFUN(show_bgp_l2vpn_evpn_route_rd_prefix,
 	evpn_show_route_rd_prefix(vty, bgp, &prd, &ip_prefix, json);
 
 	if (uj) {
-		vty_out(vty, "%s\n", json_object_to_json_string_ext(
-					     json, JSON_C_TO_STRING_PRETTY));
+		vty_out(vty, "%s\n", json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));
 		json_object_free(json);
 	}
 
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index b72cf51b5..609b84952 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -13229,9 +13229,8 @@ static void bgp_show_neighbor_graceful_restart_capability_per_afi_safi(
 			 */
 			if (CHECK_FLAG(peer->flags,
 				       PEER_FLAG_GRACEFUL_RESTART)) {
-				json_object_int_add(
-					json_timer, "selectionDeferralTimer",
-					peer->bgp->select_defer_time);
+				json_object_int_add(json_timer, "selectionDeferralTimer",
+						    peer->bgp->select_defer_time);
 			}
 
 			if (peer->bgp->gr_info[afi][safi].t_select_deferral !=

To apply the style suggestions:

curl https://gist.githubusercontent.com/polychaeta/b85d1fe290da7887f2b5d7546a9f8590/raw/2442db863c65abeeecec719cfcc1a693c8a21d33/style.diff | git apply -

If you are a new contributor to FRR, please see our contributing guidelines.

After making changes, you do not need to create a new PR. You should perform an amend or interactive rebase followed by a force push.