-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
zebra: changes for code maintainability #15480
Conversation
these changes are for improving the code maintainability and readability Signed-off-by: sri-mohan1 <[email protected]>
205b4aa
to
c7b4069
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took a quick look, and clang-format has many disagreements. Can you check that?
@@ -175,8 +175,7 @@ void zebra_evpn_install_neigh_hash(struct hash_bucket *bucket, void *ctxt) | |||
n = (struct zebra_neigh *)bucket->data; | |||
|
|||
if (CHECK_FLAG(n->flags, ZEBRA_NEIGH_REMOTE)) | |||
zebra_evpn_rem_neigh_install(wctx->zevpn, n, | |||
false /*was_static*/); | |||
zebra_evpn_rem_neigh_install(wctx->zevpn, n, false /*was_static*/); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-format disagrees?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @mjstapp , Thanks for your time in reviewing the changes.
In many places the clang-format is not proper, for example in the above code snippet the params can be includuded in the same line but it got devided and giving in multiple lines. Am just trying to correct this only on the places where can be corrected, remaining all other places am keeping as it is. thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the issue will be that we're using clang-format and our config file for it as a reference for now. Diverging from it, other than for a couple of well-known patterns such as cli definition blocks, is going to be confusing.
old_static = zebra_evpn_mac_is_static(mac); | ||
++mac->sync_neigh_cnt; | ||
new_static = zebra_evpn_mac_is_static(mac); | ||
if (IS_ZEBRA_DEBUG_EVPN_MH_NEIGH) | ||
zlog_debug( | ||
"sync-neigh ref mac vni %u ip %pIA mac %pEA ref %d", | ||
n->zevpn->vni, &n->ip, &n->emac, | ||
mac->sync_neigh_cnt); | ||
n->zevpn->vni, &n->ip, &n->emac, mac->sync_neigh_cnt); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-format disagrees?
ci:rerun |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
ci:rerun |
Please stop re-running CI on these changes - we can't merge these changes until clang-format is clean (in general) |
Changes may not be useful. |
these changes are for improving the code maintainability and readability