diff options
author | Daniil Baturin <daniil@vyos.io> | 2020-10-01 12:21:35 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-01 12:21:35 +0700 |
commit | e5f9a1084ac8c62f710064dac7f3945834ee1a88 (patch) | |
tree | 126ae326a89918913828c74a902813358fd55297 | |
parent | a57f75313cf66d6870041ff0fbbda5e67917f0ad (diff) | |
parent | 0adc41a62b6d532da7c4b47cb5da920d1ed39664 (diff) | |
download | vyatta-cfg-system-e5f9a1084ac8c62f710064dac7f3945834ee1a88.tar.gz vyatta-cfg-system-e5f9a1084ac8c62f710064dac7f3945834ee1a88.zip |
Merge pull request #130 from DmitriyEshenko/crux-add-rb
ethernet: T2891: Add ethernet ring-buffer CLI commands
3 files changed, 27 insertions, 0 deletions
diff --git a/templates/interfaces/ethernet/node.tag/ring-buffer/node.def b/templates/interfaces/ethernet/node.tag/ring-buffer/node.def new file mode 100644 index 00000000..4de7ae9b --- /dev/null +++ b/templates/interfaces/ethernet/node.tag/ring-buffer/node.def @@ -0,0 +1 @@ +help: Shared buffer between the device driver and NIC diff --git a/templates/interfaces/ethernet/node.tag/ring-buffer/rx/node.def b/templates/interfaces/ethernet/node.tag/ring-buffer/rx/node.def new file mode 100644 index 00000000..f55244e0 --- /dev/null +++ b/templates/interfaces/ethernet/node.tag/ring-buffer/rx/node.def @@ -0,0 +1,12 @@ +# +# Configuration template for ring-buffer options +# + +priority: 319 # Failure barrier only - no ordering constraints + +type: u32 +help: Configure RX ring buffer +syntax:expression: $VAR(@) >= 80 && $VAR(@) <= 16384; "RX ring-buffer must be between 80 and 16384" +val_help: u32:80-16384; RX ring buffer size + +update: sudo ethtool -G $VAR(../../@) rx $VAR(@) || exit 0 diff --git a/templates/interfaces/ethernet/node.tag/ring-buffer/tx/node.def b/templates/interfaces/ethernet/node.tag/ring-buffer/tx/node.def new file mode 100644 index 00000000..862f2eb7 --- /dev/null +++ b/templates/interfaces/ethernet/node.tag/ring-buffer/tx/node.def @@ -0,0 +1,14 @@ +# +# Configuration template for ring-buffer options +# + +priority: 319 # Failure barrier only - no ordering constraints + +type: u32 +help: Configure TX ring buffer +syntax:expression: $VAR(@) >= 80 && $VAR(@) <= 16384; "TX ring-buffer must be between 80 and 16384" +val_help: u32:80-16384; TX ring buffer size + +update: if ! sudo ethtool -G $VAR(../../@) tx $VAR(@) + then echo "Could not set TX ring-buffer for $VAR(../../@)"; exit 0 + fi |