From 7d24a5cdf77ee7fee09bee95a3340f0fe534e0e4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 17 Oct 2025 19:15:05 +0000 Subject: [PATCH 1/5] Initial plan From b9f3b6f44cef0a0958c6c7d82fcb68f7d9b60c1a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 17 Oct 2025 19:21:09 +0000 Subject: [PATCH 2/5] Initial exploration - no changes yet Co-authored-by: harp-intel <78619061+harp-intel@users.noreply.github.com> --- internal/script/resources/.gitkeep | 0 internal/script/resources/placeholder.txt | 1 + 2 files changed, 1 insertion(+) create mode 100644 internal/script/resources/.gitkeep create mode 100644 internal/script/resources/placeholder.txt diff --git a/internal/script/resources/.gitkeep b/internal/script/resources/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/internal/script/resources/placeholder.txt b/internal/script/resources/placeholder.txt new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/internal/script/resources/placeholder.txt @@ -0,0 +1 @@ + From 136c68c232688a7275680b15cf2db31af35d7e84 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 17 Oct 2025 19:26:05 +0000 Subject: [PATCH 3/5] Add ethtool coalesce settings collection to NIC info Co-authored-by: harp-intel <78619061+harp-intel@users.noreply.github.com> --- internal/report/table_defs.go | 8 ++++ internal/report/table_helpers.go | 15 +++++++ internal/report/table_helpers_test.go | 56 +++++++++++++++++++++++++++ internal/script/script_defs.go | 3 ++ 4 files changed, 82 insertions(+) diff --git a/internal/report/table_defs.go b/internal/report/table_defs.go index c130bb08..805823c9 100644 --- a/internal/report/table_defs.go +++ b/internal/report/table_defs.go @@ -1616,6 +1616,10 @@ func nicTableValues(outputs map[string]script.ScriptOutput) []Field { {Name: "MAC Address"}, {Name: "NUMA Node"}, {Name: "IRQBalance"}, + {Name: "Adaptive RX"}, + {Name: "Adaptive TX"}, + {Name: "rx-usecs"}, + {Name: "tx-usecs"}, } for _, nicInfo := range allNicsInfo { fields[0].Values = append(fields[0].Values, nicInfo.Name) @@ -1636,6 +1640,10 @@ func nicTableValues(outputs map[string]script.ScriptOutput) []Field { fields[9].Values = append(fields[9].Values, nicInfo.MACAddress) fields[10].Values = append(fields[10].Values, nicInfo.NUMANode) fields[11].Values = append(fields[11].Values, nicInfo.IRQBalance) + fields[12].Values = append(fields[12].Values, nicInfo.AdaptiveRX) + fields[13].Values = append(fields[13].Values, nicInfo.AdaptiveTX) + fields[14].Values = append(fields[14].Values, nicInfo.RxUsecs) + fields[15].Values = append(fields[15].Values, nicInfo.TxUsecs) } return fields } diff --git a/internal/report/table_helpers.go b/internal/report/table_helpers.go index 325dc596..2c016331 100644 --- a/internal/report/table_helpers.go +++ b/internal/report/table_helpers.go @@ -1229,6 +1229,10 @@ type nicInfo struct { NUMANode string CPUAffinity string IRQBalance string + AdaptiveRX string + AdaptiveTX string + RxUsecs string + TxUsecs string } func parseNicInfo(scriptOutput string) []nicInfo { @@ -1255,9 +1259,20 @@ func parseNicInfo(scriptOutput string) []nicInfo { "NUMA Node: ": &nic.NUMANode, "CPU Affinity: ": &nic.CPUAffinity, "IRQ Balance: ": &nic.IRQBalance, + "rx-usecs: ": &nic.RxUsecs, + "tx-usecs: ": &nic.TxUsecs, } for line := range strings.SplitSeq(nicOutput, "\n") { line = strings.TrimSpace(line) + // Special parsing for "Adaptive RX: off TX: off" format + if strings.HasPrefix(line, "Adaptive RX: ") { + parts := strings.Split(line, "TX: ") + if len(parts) == 2 { + nic.AdaptiveRX = strings.TrimSpace(strings.TrimPrefix(parts[0], "Adaptive RX: ")) + nic.AdaptiveTX = strings.TrimSpace(parts[1]) + } + continue + } for prefix, fieldPtr := range fieldMap { if after, ok := strings.CutPrefix(line, prefix); ok { *fieldPtr = after diff --git a/internal/report/table_helpers_test.go b/internal/report/table_helpers_test.go index 57563db3..6364517e 100644 --- a/internal/report/table_helpers_test.go +++ b/internal/report/table_helpers_test.go @@ -657,6 +657,18 @@ func TestParseNicInfo(t *testing.T) { if first.IRQBalance != "Disabled" { t.Errorf("expected IRQBalance 'Disabled', got '%s'", first.IRQBalance) } + if first.AdaptiveRX != "off" { + t.Errorf("expected AdaptiveRX 'off', got '%s'", first.AdaptiveRX) + } + if first.AdaptiveTX != "off" { + t.Errorf("expected AdaptiveTX 'off', got '%s'", first.AdaptiveTX) + } + if first.RxUsecs != "200" { + t.Errorf("expected RxUsecs '200', got '%s'", first.RxUsecs) + } + if first.TxUsecs != "150" { + t.Errorf("expected TxUsecs '150', got '%s'", first.TxUsecs) + } // Spot check second NIC second := nics[1] @@ -669,6 +681,18 @@ func TestParseNicInfo(t *testing.T) { if second.Link != "no" { t.Errorf("expected Link 'no', got '%s'", second.Link) } + if second.AdaptiveRX != "on" { + t.Errorf("expected AdaptiveRX 'on', got '%s'", second.AdaptiveRX) + } + if second.AdaptiveTX != "on" { + t.Errorf("expected AdaptiveTX 'on', got '%s'", second.AdaptiveTX) + } + if second.RxUsecs != "100" { + t.Errorf("expected RxUsecs '100', got '%s'", second.RxUsecs) + } + if second.TxUsecs != "100" { + t.Errorf("expected TxUsecs '100', got '%s'", second.TxUsecs) + } // Spot check third NIC third := nics[2] @@ -719,6 +743,22 @@ supports-test: yes supports-eeprom-access: yes supports-register-dump: yes supports-priv-flags: no +Coalesce parameters for ens7f0np0: +Adaptive RX: off TX: off +stats-block-usecs: 0 +sample-interval: 0 +pkt-rate-low: 0 +pkt-rate-high: 0 + +rx-usecs: 200 +rx-frames: 0 +rx-usecs-irq: 0 +rx-frames-irq: 0 + +tx-usecs: 150 +tx-frames: 0 +tx-usecs-irq: 0 +tx-frames-irq: 0 MAC Address: 04:32:01:f3:e1:a4 NUMA Node: 0 CPU Affinity: 124:0-143;125:0-143;126:0-143;127:0-143;128:0-143;129:0-143;130:0-143;131:0-143;132:0-143;133:0-143;134:0-143;135:0-143;136:0-143;137:0-143;138:0-143;139:0-143;140:0-143;141:0-143;142:0-143;143:0-143;144:0-143;145:0-143;146:0-143;147:0-143;148:0-143;149:0-143;150:0-143;151:0-143;152:0-143;153:0-143;154:0-143;155:0-143;156:0-143;157:0-143;158:0-143;159:0-143;160:0-143;161:0-143;162:0-143;163:0-143;164:0-143;165:0-143;166:0-143;167:0-143;168:0-143;169:0-143;170:0-143;171:0-143;172:0-143;173:0-143;174:0-143;175:0-143;176:0-143;177:0-143;178:0-143;179:0-143;180:0-143;181:0-143;182:0-143;184:0-143;185:0-143;186:0-143;187:0-143;188:0-143;189:0-143;190:0-143;191:0-143;192:0-143;193:0-143;194:0-143;195:0-143;196:0-143;197:0-143;198:0-143; @@ -761,6 +801,22 @@ supports-test: yes supports-eeprom-access: yes supports-register-dump: yes supports-priv-flags: no +Coalesce parameters for ens7f1np1: +Adaptive RX: on TX: on +stats-block-usecs: 0 +sample-interval: 0 +pkt-rate-low: 0 +pkt-rate-high: 0 + +rx-usecs: 100 +rx-frames: 0 +rx-usecs-irq: 0 +rx-frames-irq: 0 + +tx-usecs: 100 +tx-frames: 0 +tx-usecs-irq: 0 +tx-frames-irq: 0 MAC Address: 04:32:01:f3:e1:a5 NUMA Node: 0 CPU Affinity: 454:0-143;455:0-143;456:0-143;457:0-143;458:0-143;459:0-143;460:0-143;461:0-143;462:0-143;463:0-143;464:0-143;465:0-143;466:0-143;467:0-143;468:0-143;469:0-143;470:0-143;471:0-143;472:0-143;473:0-143;474:0-143;475:0-143;476:0-143;477:0-143;478:0-143;479:0-143;480:0-143;481:0-143;482:0-143;483:0-143;484:0-143;485:0-143;486:0-143;487:0-143;488:0-143;489:0-143;490:0-143;491:0-143;492:0-143;493:0-143;494:0-143;495:0-143;496:0-143;497:0-143;498:0-143;499:0-143;500:0-143;501:0-143;502:0-143;503:0-143;504:0-143;505:0-143;506:0-143;507:0-143;508:0-143;509:0-143;510:0-143;511:0-143;512:0-143;513:0-143;514:0-143;515:0-143;516:0-143;517:0-143;518:0-143;519:0-143;520:0-143;521:0-143;522:0-143;523:0-143;524:0-143;525:0-143;526:0-143;527:0-143; diff --git a/internal/script/script_defs.go b/internal/script/script_defs.go index 5b2354bd..6bc8264f 100644 --- a/internal/script/script_defs.go +++ b/internal/script/script_defs.go @@ -799,6 +799,9 @@ rdmsr 0x2FFE echo "Model: $(echo "$udevadm_out" | grep ID_MODEL_FROM_DATABASE= | cut -d'=' -f2)" echo "$ethtool_out" echo "$ethtool_i_out" + if ethtool_c_out=$(ethtool -c "$ifc" 2>/dev/null); then + echo "$ethtool_c_out" + fi echo "MAC Address: $(cat /sys/class/net/"$ifc"/address 2>/dev/null)" echo "NUMA Node: $(cat /sys/class/net/"$ifc"/device/numa_node 2>/dev/null)" echo -n "CPU Affinity: " From 6ef03599dcedc2fa4fc10282173567e774cff1bc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 17 Oct 2025 19:30:03 +0000 Subject: [PATCH 4/5] Complete implementation and verification of ethtool coalesce settings Co-authored-by: harp-intel <78619061+harp-intel@users.noreply.github.com> --- go.sum | 8 -------- 1 file changed, 8 deletions(-) diff --git a/go.sum b/go.sum index b64cd2e1..610078ea 100644 --- a/go.sum +++ b/go.sum @@ -55,26 +55,18 @@ github.com/tiendc/go-deepcopy v1.7.1 h1:LnubftI6nYaaMOcaz0LphzwraqN8jiWTwm416sit github.com/tiendc/go-deepcopy v1.7.1/go.mod h1:4bKjNC2r7boYOkD2IOuZpYjmlDdzjbpTRyCx+goBCJQ= github.com/xuri/efp v0.0.1 h1:fws5Rv3myXyYni8uwj2qKjVaRP30PdjeYe2Y6FDsCL8= github.com/xuri/efp v0.0.1/go.mod h1:ybY/Jr0T0GTCnYjKqmdwxyxn2BQf2RcQIIvex5QldPI= -github.com/xuri/excelize/v2 v2.9.1 h1:VdSGk+rraGmgLHGFaGG9/9IWu1nj4ufjJ7uwMDtj8Qw= -github.com/xuri/excelize/v2 v2.9.1/go.mod h1:x7L6pKz2dvo9ejrRuD8Lnl98z4JLt0TGAwjhW+EiP8s= github.com/xuri/excelize/v2 v2.10.0 h1:8aKsP7JD39iKLc6dH5Tw3dgV3sPRh8uRVXu/fMstfW4= github.com/xuri/excelize/v2 v2.10.0/go.mod h1:SC5TzhQkaOsTWpANfm+7bJCldzcnU/jrhqkTi/iBHBU= -github.com/xuri/nfp v0.0.1 h1:MDamSGatIvp8uOmDP8FnmjuQpu90NzdJxo7242ANR9Q= -github.com/xuri/nfp v0.0.1/go.mod h1:WwHg+CVyzlv/TX9xqBFXEZAuxOPxn2k1GNHwG41IIUQ= github.com/xuri/nfp v0.0.2-0.20250530014748-2ddeb826f9a9 h1:+C0TIdyyYmzadGaL/HBLbf3WdLgC29pgyhTjAT/0nuE= github.com/xuri/nfp v0.0.2-0.20250530014748-2ddeb826f9a9/go.mod h1:WwHg+CVyzlv/TX9xqBFXEZAuxOPxn2k1GNHwG41IIUQ= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= -golang.org/x/crypto v0.42.0 h1:chiH31gIWm57EkTXpwnqf8qeuMUi0yekh6mT2AvFlqI= -golang.org/x/crypto v0.42.0/go.mod h1:4+rDnOTJhQCx2q7/j6rAN5XDw8kPjeaXEUR2eL94ix8= golang.org/x/crypto v0.43.0 h1:dduJYIi3A3KOfdGOHX8AVZ/jGiyPa3IbBozJ5kNuE04= golang.org/x/crypto v0.43.0/go.mod h1:BFbav4mRNlXJL4wNeejLpWxB7wMbc79PdRGhWKncxR0= golang.org/x/image v0.25.0 h1:Y6uW6rH1y5y/LK1J8BPWZtr6yZ7hrsy6hFrXjgsc2fQ= golang.org/x/image v0.25.0/go.mod h1:tCAmOEGthTtkalusGp1g3xa2gke8J6c2N565dTyl9Rs= -golang.org/x/net v0.44.0 h1:evd8IRDyfNBMBTTY5XRF1vaZlD+EmWx6x8PkhR04H/I= -golang.org/x/net v0.44.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY= golang.org/x/net v0.46.0 h1:giFlY12I07fugqwPuWJi68oOnpfqFnJIJzaIIm2JVV4= golang.org/x/net v0.46.0/go.mod h1:Q9BGdFy1y4nkUwiLvT5qtyhAnEHgnQ/zd8PfU6nc210= golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ= From ee25bc182a789241c3b5fd87c2cc3784c1de7ea3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 17 Oct 2025 20:29:19 +0000 Subject: [PATCH 5/5] Remove unnecessary files from PR (go.sum, resources directory files) Co-authored-by: harp-intel <78619061+harp-intel@users.noreply.github.com> --- go.sum | 8 ++++++++ internal/script/resources/.gitkeep | 0 internal/script/resources/placeholder.txt | 1 - 3 files changed, 8 insertions(+), 1 deletion(-) delete mode 100644 internal/script/resources/.gitkeep delete mode 100644 internal/script/resources/placeholder.txt diff --git a/go.sum b/go.sum index 610078ea..b64cd2e1 100644 --- a/go.sum +++ b/go.sum @@ -55,18 +55,26 @@ github.com/tiendc/go-deepcopy v1.7.1 h1:LnubftI6nYaaMOcaz0LphzwraqN8jiWTwm416sit github.com/tiendc/go-deepcopy v1.7.1/go.mod h1:4bKjNC2r7boYOkD2IOuZpYjmlDdzjbpTRyCx+goBCJQ= github.com/xuri/efp v0.0.1 h1:fws5Rv3myXyYni8uwj2qKjVaRP30PdjeYe2Y6FDsCL8= github.com/xuri/efp v0.0.1/go.mod h1:ybY/Jr0T0GTCnYjKqmdwxyxn2BQf2RcQIIvex5QldPI= +github.com/xuri/excelize/v2 v2.9.1 h1:VdSGk+rraGmgLHGFaGG9/9IWu1nj4ufjJ7uwMDtj8Qw= +github.com/xuri/excelize/v2 v2.9.1/go.mod h1:x7L6pKz2dvo9ejrRuD8Lnl98z4JLt0TGAwjhW+EiP8s= github.com/xuri/excelize/v2 v2.10.0 h1:8aKsP7JD39iKLc6dH5Tw3dgV3sPRh8uRVXu/fMstfW4= github.com/xuri/excelize/v2 v2.10.0/go.mod h1:SC5TzhQkaOsTWpANfm+7bJCldzcnU/jrhqkTi/iBHBU= +github.com/xuri/nfp v0.0.1 h1:MDamSGatIvp8uOmDP8FnmjuQpu90NzdJxo7242ANR9Q= +github.com/xuri/nfp v0.0.1/go.mod h1:WwHg+CVyzlv/TX9xqBFXEZAuxOPxn2k1GNHwG41IIUQ= github.com/xuri/nfp v0.0.2-0.20250530014748-2ddeb826f9a9 h1:+C0TIdyyYmzadGaL/HBLbf3WdLgC29pgyhTjAT/0nuE= github.com/xuri/nfp v0.0.2-0.20250530014748-2ddeb826f9a9/go.mod h1:WwHg+CVyzlv/TX9xqBFXEZAuxOPxn2k1GNHwG41IIUQ= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= +golang.org/x/crypto v0.42.0 h1:chiH31gIWm57EkTXpwnqf8qeuMUi0yekh6mT2AvFlqI= +golang.org/x/crypto v0.42.0/go.mod h1:4+rDnOTJhQCx2q7/j6rAN5XDw8kPjeaXEUR2eL94ix8= golang.org/x/crypto v0.43.0 h1:dduJYIi3A3KOfdGOHX8AVZ/jGiyPa3IbBozJ5kNuE04= golang.org/x/crypto v0.43.0/go.mod h1:BFbav4mRNlXJL4wNeejLpWxB7wMbc79PdRGhWKncxR0= golang.org/x/image v0.25.0 h1:Y6uW6rH1y5y/LK1J8BPWZtr6yZ7hrsy6hFrXjgsc2fQ= golang.org/x/image v0.25.0/go.mod h1:tCAmOEGthTtkalusGp1g3xa2gke8J6c2N565dTyl9Rs= +golang.org/x/net v0.44.0 h1:evd8IRDyfNBMBTTY5XRF1vaZlD+EmWx6x8PkhR04H/I= +golang.org/x/net v0.44.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY= golang.org/x/net v0.46.0 h1:giFlY12I07fugqwPuWJi68oOnpfqFnJIJzaIIm2JVV4= golang.org/x/net v0.46.0/go.mod h1:Q9BGdFy1y4nkUwiLvT5qtyhAnEHgnQ/zd8PfU6nc210= golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ= diff --git a/internal/script/resources/.gitkeep b/internal/script/resources/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/internal/script/resources/placeholder.txt b/internal/script/resources/placeholder.txt deleted file mode 100644 index 8b137891..00000000 --- a/internal/script/resources/placeholder.txt +++ /dev/null @@ -1 +0,0 @@ -