Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Conversation

@amshinde
Copy link
Contributor

@amshinde amshinde commented Feb 6, 2017

The mtu field is optional.

src/net.c Outdated
return 0;
}

static int hyper_set_interface_mtu(struct rtnl_handle *rth,
Copy link
Member

Choose a reason for hiding this comment

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

This function duplicates a lot with hyper_set_interface_name(). Can you please make a common version for both of them?

src/net.c Outdated
req.n.nlmsg_flags = NLM_F_REQUEST;
req.n.nlmsg_type = RTM_SETLINK;
req.i.ifi_family = AF_UNSPEC;
req.i.ifi_index = ifindex;
Copy link
Member

Choose a reason for hiding this comment

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

Need to set ifi_change to 0xFFFFFFFF as shown in man(3) rtnetlink? Looks like another reason to merge this with hyper_set_interface_name().

src/parse.c Outdated
dbg_pr(stdout, "net mask is %s\n", ipaddr_oldf->mask);
} else if (json_token_streq(json, &toks[i], "mtu")) {
iface->mtu = (json_token_int(json, &toks[++i]));
fprintf(stdout, "mtu is %d\n", iface->mtu);
Copy link
Contributor

Choose a reason for hiding this comment

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

please use dbg_pr to replace fprintf

Copy link
Contributor Author

Choose a reason for hiding this comment

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

whats the convention? should the fprintfs to stderr added in net.c also be replaced by dbg_pr?

Copy link
Contributor

Choose a reason for hiding this comment

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

travis-ci doesn't display too much outputs in job log page, we want to reduce the logs of hyperstart.

stderr case is ok. dbg_pr is only used for debug message.

Thanks!

@amshinde amshinde force-pushed the set-mtu-upstream branch 2 times, most recently from 849e05c to 37dc1eb Compare February 7, 2017 01:19
Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
@gao-feng
Copy link
Contributor

gao-feng commented Feb 7, 2017

LGTM, thanks!

@gao-feng gao-feng merged commit 8484d7e into hyperhq:master Feb 7, 2017
@gao-feng gao-feng mentioned this pull request Mar 24, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants