-
Notifications
You must be signed in to change notification settings - Fork 791
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
Fix inadvertent txqueuelen being set to zero #1100
Conversation
d376c8d
to
4ffccfd
Compare
Been trying to sort out what's up with the failing |
Thanks for the PR. Have you seen #1097? Are these two PRs duplicate or complementary? |
@squeed The second issue #1097 describes is somewhat related, but it misses the mark on setting it to zero meaning that the kernel will pick a default. This can be illustrated as such: $ ip link add dev vm1 type veth
$ ip link show vm1
... snip snip snip ...
20: vm1@vm2: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 76:8b:12:5d:e9:c0 brd ff:ff:ff:ff:ff:ff Note the $ ip link add dev vm1 txqueuelen 0 type veth
$ ip link show vm1
24: vm1@veth0: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN mode DEFAULT group default
link/ether 6a:19:4e:0b:3a:5e brd ff:ff:ff:ff:ff:ff Note the missing What I did notice on our end when we worked around this issue, was that we saw less tx packet drops. Now I can't remember the specifics on whether that was on |
(@LionelJouin found the cause of the flake, he should have a fix soon) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Mind if I squash this in to a single commit?
3da6c95
to
a73af81
Compare
Rebased to pick up SBR fixes. |
TxQLen was unintentionally set to 0 due to a struct literal. Signed-off-by: Gudmundur Bjarni Olafsson <gudmundur.bjarni@gmail.com>
a73af81
to
8831990
Compare
@squeed Took care of the squashing for you. Reworded the commit message for a single commit as well. |
When diagnosing networking issues, I noticed that
txqueuelen
onveth
pairs andtap
devices was set to zero. In investigating the issue, I found that most usages ofnetlink.LinkAttrs
in this repository uses the struct literal, which in thenetlink
docs is advised against unlessTxQLen
is explicitly set.When using the
ip
command directly without specifyingtxqueuelen
, Linux will automatically to 1000:This change goes through every single usage of
netlink.LinkAttrs{
and replaces it with thenetlink.NewLinkAttrs
constructor, and then overrides the individual fields in the struct.I even noticed that in the
bridge
plugin, this is somewhat called out when using the literal. I've replaced this explicitly in d376c8d though.