Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
281053d6
Commit
281053d6
authored
Dec 28, 2016
by
Kubernetes Submit Queue
Committed by
GitHub
Dec 28, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #38155 from freehan/cleanup-txqueue
Automatic merge from submit-queue (batch tested with PRs 39218, 38155) clean up logic that configs TX queue length fix: #25143
parents
3a2492f4
ff6cdeb9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
34 deletions
+0
-34
BUILD
pkg/kubelet/network/kubenet/BUILD
+0
-1
kubenet_linux.go
pkg/kubelet/network/kubenet/kubenet_linux.go
+0
-33
No files found.
pkg/kubelet/network/kubenet/BUILD
View file @
281053d6
...
...
@@ -31,7 +31,6 @@ go_library(
"//vendor:github.com/containernetworking/cni/pkg/types",
"//vendor:github.com/golang/glog",
"//vendor:github.com/vishvananda/netlink",
"//vendor:github.com/vishvananda/netlink/nl",
],
)
...
...
pkg/kubelet/network/kubenet/kubenet_linux.go
View file @
281053d6
...
...
@@ -33,7 +33,6 @@ import (
cnitypes
"github.com/containernetworking/cni/pkg/types"
"github.com/golang/glog"
"github.com/vishvananda/netlink"
"github.com/vishvananda/netlink/nl"
"k8s.io/kubernetes/pkg/api/v1"
"k8s.io/kubernetes/pkg/apis/componentconfig"
kubecontainer
"k8s.io/kubernetes/pkg/kubelet/container"
...
...
@@ -296,37 +295,6 @@ func (plugin *kubenetNetworkPlugin) clearBridgeAddressesExcept(keep *net.IPNet)
}
}
// ensureBridgeTxQueueLen() ensures that the bridge interface's TX queue
// length is greater than zero. Due to a CNI <= 0.3.0 'bridge' plugin bug,
// the bridge is initially created with a TX queue length of 0, which gets
// used as the packet limit for FIFO traffic shapers, which drops packets.
// TODO: remove when we can depend on a fixed CNI
func
(
plugin
*
kubenetNetworkPlugin
)
ensureBridgeTxQueueLen
()
{
bridge
,
err
:=
netlink
.
LinkByName
(
BridgeName
)
if
err
!=
nil
{
return
}
if
bridge
.
Attrs
()
.
TxQLen
>
0
{
return
}
req
:=
nl
.
NewNetlinkRequest
(
syscall
.
RTM_NEWLINK
,
syscall
.
NLM_F_ACK
)
msg
:=
nl
.
NewIfInfomsg
(
syscall
.
AF_UNSPEC
)
req
.
AddData
(
msg
)
nameData
:=
nl
.
NewRtAttr
(
syscall
.
IFLA_IFNAME
,
nl
.
ZeroTerminated
(
BridgeName
))
req
.
AddData
(
nameData
)
qlen
:=
nl
.
NewRtAttr
(
syscall
.
IFLA_TXQLEN
,
nl
.
Uint32Attr
(
1000
))
req
.
AddData
(
qlen
)
_
,
err
=
req
.
Execute
(
syscall
.
NETLINK_ROUTE
,
0
)
if
err
!=
nil
{
glog
.
V
(
5
)
.
Infof
(
"Failed to set bridge tx queue length: %v"
,
err
)
}
}
func
(
plugin
*
kubenetNetworkPlugin
)
Name
()
string
{
return
KubenetPluginName
}
...
...
@@ -789,7 +757,6 @@ func (plugin *kubenetNetworkPlugin) delContainerFromNetwork(config *libcni.Netwo
func
(
plugin
*
kubenetNetworkPlugin
)
shaper
()
bandwidth
.
BandwidthShaper
{
if
plugin
.
bandwidthShaper
==
nil
{
plugin
.
bandwidthShaper
=
bandwidth
.
NewTCShaper
(
BridgeName
)
plugin
.
ensureBridgeTxQueueLen
()
plugin
.
bandwidthShaper
.
ReconcileInterface
()
}
return
plugin
.
bandwidthShaper
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment