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

Add MTU to the plugin config #676

Merged
merged 1 commit into from
Oct 28, 2019
Merged

Add MTU to the plugin config #676

merged 1 commit into from
Oct 28, 2019

Conversation

mogren
Copy link
Contributor

@mogren mogren commented Oct 24, 2019

Issue #665

Description of changes:

  • The plugin needs to get the MTU from the config file
  • Add documentation of log level config.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@mogren mogren added this to the v1.6 milestone Oct 24, 2019
@mogren mogren force-pushed the set-mtu-eth0 branch 3 times, most recently from 16f7b42 to 3e13f7c Compare October 24, 2019 04:28
@mogren
Copy link
Contributor Author

mogren commented Oct 24, 2019

With AWS_VPC_ENI_MTU="1500"

> ifconfig | grep mtu
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
eth2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
eth3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
veth36109221769: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
veth01c9b2465d9: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
veth05d88c0bccc: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
veth07249681a7b: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
.
.
.

Without setting the environment variable

> ifconfig | grep mtu
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9001
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9001
eth2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9001
eth3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9001
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
veth02b26604dc0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9001
veth0909d6b58ea: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9001
veth0df9d65f2fc: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9001
veth0f233f9a231: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9001
.
.
.

README.md Outdated Show resolved Hide resolved
pkg/networkutils/network.go Outdated Show resolved Hide resolved
@mogren mogren force-pushed the set-mtu-eth0 branch 2 times, most recently from 2daee65 to 80b3df3 Compare October 28, 2019 05:43
@mogren mogren requested a review from jaypipes October 28, 2019 05:59
@@ -67,6 +69,9 @@ type NetConf struct {
// veth device name. It should be no more than four characters, and
// defaults to 'eni'.
VethPrefix string `json:"vethPrefix"`

// MTU for eth0
Mtu string `json:"mtu"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Something I noticed... but golang naming practices generally encourage acronyms to be capitalized when exported, so this really should be "MTU", not "Mtu", like "CNIVersion" is capitalized above...

See more here: https://github.com/golang/go/wiki/CodeReviewComments#initialisms

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree, should be all upper case.

Copy link
Contributor

@jaypipes jaypipes left a comment

Choose a reason for hiding this comment

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

👍

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

Successfully merging this pull request may close these issues.

2 participants