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

vtep: add an option to have no multicast #528

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

outscale-mgo
Copy link
Contributor

WIP: no merge now

Signed-off-by: Matthias Gatto [email protected]

@@ -388,6 +390,12 @@ static inline int vtep_encapsulate(struct vtep_state *state,
unicast = 0;
}

if (state->flags & PG_VTEP_NO_MULTICAST && !unicast) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer if (!unicast && state->flags & PG_VTEP_NO_MULTICAST)
we don't have to do this state->flags & PG_VTEP_NO_MULTICAST operation if unicast==true

@@ -795,7 +807,8 @@ static int do_add_vni(struct vtep_state *state, uint16_t edge_index,
*errp = pg_error_new("port already attached to a vni");
return -1;
}
if (unlikely(pg_is_multicast_ip(port->multicast_ip))) {
if (!(state->flags & PG_VTEP_NO_MULTICAST) &&
unlikely(pg_is_multicast_ip(port->multicast_ip))) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, i prefer unlikely(pg_is_multicast_ip(port->multicast_ip))first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants