Skip to content

Commit

Permalink
capitalized MTU
Browse files Browse the repository at this point in the history
  • Loading branch information
hellt committed Sep 20, 2023
1 parent 4a1d4ef commit 4c4004a
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion links/link.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
type LinkDeploymentState uint8

const (
DefaultLinkMtu = 9500
DefaultLinkMTU = 9500

LinkDeploymentStateNotDeployed = iota
LinkDeploymentStateDeployed
Expand Down
4 changes: 2 additions & 2 deletions links/link_host.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func hostLinkFromBrief(lb *LinkBriefRaw, specialEPIndex int) (*LinkHostRaw, erro

// set default link mtu if MTU is unset
if link.MTU == 0 {
link.MTU = DefaultLinkMtu
link.MTU = DefaultLinkMTU
}

return link, nil
Expand Down Expand Up @@ -84,7 +84,7 @@ func (r *LinkHostRaw) Resolve(params *ResolveParams) (Link, error) {

// set default link mtu if MTU is unset
if link.MTU == 0 {
link.MTU = DefaultLinkMtu
link.MTU = DefaultLinkMTU
}

return link, nil
Expand Down
4 changes: 2 additions & 2 deletions links/link_macvlan.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func macVlanLinkFromBrief(lb *LinkBriefRaw, specialEPIndex int) (*LinkMacVlanRaw

// set default link mtu if MTU is unset
if link.MTU == 0 {
link.MTU = DefaultLinkMtu
link.MTU = DefaultLinkMTU
}

return link, nil
Expand Down Expand Up @@ -97,7 +97,7 @@ func (r *LinkMacVlanRaw) Resolve(params *ResolveParams) (Link, error) {

// set default link mtu if MTU is unset
if link.MTU == 0 {
link.MTU = DefaultLinkMtu
link.MTU = DefaultLinkMTU
}

return link, nil
Expand Down
4 changes: 2 additions & 2 deletions links/link_mgmt-net.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (r *LinkMgmtNetRaw) Resolve(params *ResolveParams) (Link, error) {

// set default link mtu if MTU is unset
if link.MTU == 0 {
link.MTU = DefaultLinkMtu
link.MTU = DefaultLinkMTU
}

return link, nil
Expand All @@ -92,7 +92,7 @@ func mgmtNetLinkFromBrief(lb *LinkBriefRaw, specialEPIndex int) (*LinkMgmtNetRaw

// set default link mtu if MTU is unset
if link.MTU == 0 {
link.MTU = DefaultLinkMtu
link.MTU = DefaultLinkMTU
}

return link, nil
Expand Down
8 changes: 4 additions & 4 deletions links/link_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func TestUnmarshalRawLinksYaml(t *testing.T) {
NewEndpointRaw("srl2", "e1-5", ""),
},
LinkCommonParams: LinkCommonParams{
MTU: DefaultLinkMtu,
MTU: DefaultLinkMTU,
},
},
},
Expand Down Expand Up @@ -150,7 +150,7 @@ func TestUnmarshalRawLinksYaml(t *testing.T) {
HostInterface: "eth0",
Endpoint: NewEndpointRaw("srl1", "e1-1", ""),
LinkCommonParams: LinkCommonParams{
MTU: DefaultLinkMtu,
MTU: DefaultLinkMTU,
},
},
},
Expand All @@ -169,7 +169,7 @@ func TestUnmarshalRawLinksYaml(t *testing.T) {
HostInterface: "srl1-e1-1",
Endpoint: NewEndpointRaw("srl1", "e1-1", ""),
LinkCommonParams: LinkCommonParams{
MTU: DefaultLinkMtu,
MTU: DefaultLinkMTU,
},
},
},
Expand All @@ -188,7 +188,7 @@ func TestUnmarshalRawLinksYaml(t *testing.T) {
HostInterface: "srl1-e1-1",
Endpoint: NewEndpointRaw("srl1", "e1-1", ""),
LinkCommonParams: LinkCommonParams{
MTU: DefaultLinkMtu,
MTU: DefaultLinkMTU,
},
},
},
Expand Down
4 changes: 2 additions & 2 deletions links/link_veth.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (r *LinkVEthRaw) Resolve(params *ResolveParams) (Link, error) {

// set default link mtu if MTU is unset
if l.MTU == 0 {
l.MTU = DefaultLinkMtu
l.MTU = DefaultLinkMTU
}

return l, nil
Expand All @@ -85,7 +85,7 @@ func linkVEthRawFromLinkBriefRaw(lb *LinkBriefRaw) (*LinkVEthRaw, error) {

// set default link mtu if MTU is unset
if link.MTU == 0 {
link.MTU = DefaultLinkMtu
link.MTU = DefaultLinkMTU
}

return link, nil
Expand Down

0 comments on commit 4c4004a

Please sign in to comment.