Skip to content

Commit

Permalink
Update i40e-tune
Browse files Browse the repository at this point in the history
  • Loading branch information
strizhechenko committed Jul 17, 2017
1 parent 15463e6 commit 4c63b82
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions examples/i40e-tune
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
#!/bin/bash

# i40e driver sometimes bugs with RSS.
# interrupt counters freezes and all packet processing is doing by CPU0
# enabling and disabling RPS enables RSS, IDK why
# enabling both RPS and RSS is bad idea, so we disable it later
# don't use this script periodically, it can cause packet drops.
# only required for system startup.


hex_all_cpus() {
python -c "print hex(int('1' * $(nproc), 2))" | sed 's/^0x//g'
}
# i40e driver sometimes bugs with RSS. Interrupt counters freezes
# and all packet processing is doing by CPU0. Enabling and disabling
# RPS enables RSS, IDK why. Enabling both RPS and RSS is bad idea,
# so we disable it later don't use this script periodically, it can
# cause packet drops. Only required for system startup.

i40e_tune() {
local dev="$1"
local all_cpus_mask
all_cpus_mask="$(hex_all_cpus)"
autorps "$dev"
rss-ladder "$dev"
autorps --cpu-mask=0 "$dev"
Expand Down

0 comments on commit 4c63b82

Please sign in to comment.