From df55ead30283f5642673830be528daf6c7e0014f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 18 Oct 2025 14:58:28 +0000 Subject: [PATCH 1/6] Initial plan From 45e024affb02c95340df57394f195135eb1cb31b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 18 Oct 2025 15:06:52 +0000 Subject: [PATCH 2/6] Add Card/Port column to NIC table for physical card mapping Co-authored-by: harp-intel <78619061+harp-intel@users.noreply.github.com> --- internal/report/table_defs.go | 27 ++- internal/report/table_helpers.go | 75 +++++++ .../table_helpers_nic_integration_test.go | 204 ++++++++++++++++++ internal/report/table_helpers_nic_test.go | 104 +++++++++ internal/script/resources/.keep | 0 internal/script/resources/placeholder.txt | 1 + 6 files changed, 401 insertions(+), 10 deletions(-) create mode 100644 internal/report/table_helpers_nic_integration_test.go create mode 100644 internal/report/table_helpers_nic_test.go create mode 100644 internal/script/resources/.keep create mode 100644 internal/script/resources/placeholder.txt diff --git a/internal/report/table_defs.go b/internal/report/table_defs.go index 27c41954..54aa54e7 100644 --- a/internal/report/table_defs.go +++ b/internal/report/table_defs.go @@ -1610,6 +1610,7 @@ func nicTableValues(outputs map[string]script.ScriptOutput) []Field { {Name: "Speed"}, {Name: "Link"}, {Name: "Bus"}, + {Name: "Card / Port"}, {Name: "Driver"}, {Name: "Driver Version"}, {Name: "Firmware Version"}, @@ -1634,16 +1635,22 @@ func nicTableValues(outputs map[string]script.ScriptOutput) []Field { fields[3].Values = append(fields[3].Values, nicInfo.Speed) fields[4].Values = append(fields[4].Values, nicInfo.Link) fields[5].Values = append(fields[5].Values, nicInfo.Bus) - fields[6].Values = append(fields[6].Values, nicInfo.Driver) - fields[7].Values = append(fields[7].Values, nicInfo.DriverVersion) - fields[8].Values = append(fields[8].Values, nicInfo.FirmwareVersion) - 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) + // Add Card / Port column + cardPort := "" + if nicInfo.Card != "" && nicInfo.Port != "" { + cardPort = nicInfo.Card + " / " + nicInfo.Port + } + fields[6].Values = append(fields[6].Values, cardPort) + fields[7].Values = append(fields[7].Values, nicInfo.Driver) + fields[8].Values = append(fields[8].Values, nicInfo.DriverVersion) + fields[9].Values = append(fields[9].Values, nicInfo.FirmwareVersion) + fields[10].Values = append(fields[10].Values, nicInfo.MACAddress) + fields[11].Values = append(fields[11].Values, nicInfo.NUMANode) + fields[12].Values = append(fields[12].Values, nicInfo.IRQBalance) + fields[13].Values = append(fields[13].Values, nicInfo.AdaptiveRX) + fields[14].Values = append(fields[14].Values, nicInfo.AdaptiveTX) + fields[15].Values = append(fields[15].Values, nicInfo.RxUsecs) + fields[16].Values = append(fields[16].Values, nicInfo.TxUsecs) } return fields } diff --git a/internal/report/table_helpers.go b/internal/report/table_helpers.go index 2c016331..2052545e 100644 --- a/internal/report/table_helpers.go +++ b/internal/report/table_helpers.go @@ -1233,6 +1233,8 @@ type nicInfo struct { AdaptiveTX string RxUsecs string TxUsecs string + Card string + Port string } func parseNicInfo(scriptOutput string) []nicInfo { @@ -1284,9 +1286,82 @@ func parseNicInfo(scriptOutput string) []nicInfo { nic.Model = strings.TrimSpace(strings.Split(nic.Model, "(")[0]) nics = append(nics, nic) } + // Assign card and port information + assignCardAndPort(nics) return nics } +// assignCardAndPort assigns card and port numbers to NICs based on their PCI addresses +func assignCardAndPort(nics []nicInfo) { + if len(nics) == 0 { + return + } + + // Map to store card identifiers (domain:bus:device) to card numbers + cardMap := make(map[string]int) + // Map to track ports within each card + portMap := make(map[string][]int) // card identifier -> list of indices in nics slice + cardCounter := 1 + + // First pass: identify cards and group NICs by card + for i := range nics { + if nics[i].Bus == "" { + continue + } + // PCI address format: domain:bus:device.function (e.g., 0000:32:00.0) + // Extract domain:bus:device as the card identifier + parts := strings.Split(nics[i].Bus, ":") + if len(parts) != 3 { + continue + } + // Further split the last part to separate device from function + deviceFunc := strings.Split(parts[2], ".") + if len(deviceFunc) != 2 { + continue + } + // Card identifier is domain:bus:device + cardID := parts[0] + ":" + parts[1] + ":" + deviceFunc[0] + + // Assign card number if not already assigned + if _, exists := cardMap[cardID]; !exists { + cardMap[cardID] = cardCounter + cardCounter++ + } + // Add this NIC index to the card's port list + portMap[cardID] = append(portMap[cardID], i) + } + + // Second pass: assign card and port numbers + for cardID, nicIndices := range portMap { + cardNum := cardMap[cardID] + // Sort NICs within a card by their function number + sort.Slice(nicIndices, func(i, j int) bool { + // Extract function numbers + funcI := extractFunction(nics[nicIndices[i]].Bus) + funcJ := extractFunction(nics[nicIndices[j]].Bus) + return funcI < funcJ + }) + // Assign port numbers + for portNum, nicIdx := range nicIndices { + nics[nicIdx].Card = fmt.Sprintf("%d", cardNum) + nics[nicIdx].Port = fmt.Sprintf("%d", portNum+1) + } + } +} + +// extractFunction extracts the function number from a PCI address +func extractFunction(busAddr string) int { + parts := strings.Split(busAddr, ".") + if len(parts) != 2 { + return 0 + } + funcNum, err := strconv.Atoi(parts[1]) + if err != nil { + return 0 + } + return funcNum +} + type diskInfo struct { Name string Model string diff --git a/internal/report/table_helpers_nic_integration_test.go b/internal/report/table_helpers_nic_integration_test.go new file mode 100644 index 00000000..591cffe6 --- /dev/null +++ b/internal/report/table_helpers_nic_integration_test.go @@ -0,0 +1,204 @@ +package report + +// Copyright (C) 2021-2025 Intel Corporation +// SPDX-License-Identifier: BSD-3-Clause + +import ( + "testing" + + "perfspect/internal/script" +) + +func TestParseNicInfoWithCardPort(t *testing.T) { + // Sample output simulating the scenario from the issue + sampleOutput := `Interface: eth2 +Vendor ID: 8086 +Model ID: 1593 +Vendor: Intel Corporation +Model: Ethernet Controller 10G X550T +Speed: 1000Mb/s +Link detected: yes +bus-info: 0000:32:00.0 +driver: ixgbe +version: 5.1.0-k +firmware-version: 0x800009e0 +MAC Address: aa:bb:cc:dd:ee:00 +NUMA Node: 0 +CPU Affinity: +IRQ Balance: Enabled +rx-usecs: 1 +tx-usecs: 1 +Adaptive RX: off TX: off +---------------------------------------- +Interface: eth3 +Vendor ID: 8086 +Model ID: 1593 +Vendor: Intel Corporation +Model: Ethernet Controller 10G X550T +Speed: Unknown! +Link detected: no +bus-info: 0000:32:00.1 +driver: ixgbe +version: 5.1.0-k +firmware-version: 0x800009e0 +MAC Address: aa:bb:cc:dd:ee:01 +NUMA Node: 0 +CPU Affinity: +IRQ Balance: Enabled +rx-usecs: 1 +tx-usecs: 1 +Adaptive RX: off TX: off +---------------------------------------- +Interface: eth0 +Vendor ID: 8086 +Model ID: 37d2 +Vendor: Intel Corporation +Model: Ethernet Controller E810-C for QSFP +Speed: 100000Mb/s +Link detected: yes +bus-info: 0000:c0:00.0 +driver: ice +version: K_5.19.0-41-generic_5.1.9 +firmware-version: 4.40 0x8001c967 1.3534.0 +MAC Address: aa:bb:cc:dd:ee:82 +NUMA Node: 1 +CPU Affinity: +IRQ Balance: Enabled +rx-usecs: 1 +tx-usecs: 1 +Adaptive RX: off TX: off +---------------------------------------- +Interface: eth1 +Vendor ID: 8086 +Model ID: 37d2 +Vendor: Intel Corporation +Model: Ethernet Controller E810-C for QSFP +Speed: 100000Mb/s +Link detected: yes +bus-info: 0000:c0:00.1 +driver: ice +version: K_5.19.0-41-generic_5.1.9 +firmware-version: 4.40 0x8001c967 1.3534.0 +MAC Address: aa:bb:cc:dd:ee:83 +NUMA Node: 1 +CPU Affinity: +IRQ Balance: Enabled +rx-usecs: 1 +tx-usecs: 1 +Adaptive RX: off TX: off +----------------------------------------` + + nics := parseNicInfo(sampleOutput) + + if len(nics) != 4 { + t.Fatalf("Expected 4 NICs, got %d", len(nics)) + } + + // Expected card/port assignments based on the issue example + expectedCardPort := map[string]struct { + card string + port string + }{ + "eth2": {"1", "1"}, // 0000:32:00.0 + "eth3": {"1", "2"}, // 0000:32:00.1 + "eth0": {"2", "1"}, // 0000:c0:00.0 + "eth1": {"2", "2"}, // 0000:c0:00.1 + } + + for _, nic := range nics { + expected, exists := expectedCardPort[nic.Name] + if !exists { + t.Errorf("Unexpected NIC name: %s", nic.Name) + continue + } + if nic.Card != expected.card { + t.Errorf("NIC %s: expected card %s, got %s", nic.Name, expected.card, nic.Card) + } + if nic.Port != expected.port { + t.Errorf("NIC %s: expected port %s, got %s", nic.Name, expected.port, nic.Port) + } + } +} + +func TestNicTableValuesWithCardPort(t *testing.T) { + // Sample output simulating the scenario from the issue + sampleOutput := `Interface: eth2 +bus-info: 0000:32:00.0 +Vendor: Intel Corporation +Model: Ethernet Controller 10G X550T +Speed: 1000Mb/s +Link detected: yes +---------------------------------------- +Interface: eth3 +bus-info: 0000:32:00.1 +Vendor: Intel Corporation +Model: Ethernet Controller 10G X550T +Speed: Unknown! +Link detected: no +---------------------------------------- +Interface: eth0 +bus-info: 0000:c0:00.0 +Vendor: Intel Corporation +Model: Ethernet Controller E810-C for QSFP +Speed: 100000Mb/s +Link detected: yes +---------------------------------------- +Interface: eth1 +bus-info: 0000:c0:00.1 +Vendor: Intel Corporation +Model: Ethernet Controller E810-C for QSFP +Speed: 100000Mb/s +Link detected: yes +----------------------------------------` + + outputs := map[string]script.ScriptOutput{ + script.NicInfoScriptName: {Stdout: sampleOutput}, + } + + fields := nicTableValues(outputs) + + // Find the "Card / Port" field + var cardPortField Field + found := false + for _, field := range fields { + if field.Name == "Card / Port" { + cardPortField = field + found = true + break + } + } + + if !found { + t.Fatal("Card / Port field not found in NIC table") + } + + // Verify we have 4 entries + if len(cardPortField.Values) != 4 { + t.Fatalf("Expected 4 Card / Port values, got %d", len(cardPortField.Values)) + } + + // Find the Name field to match values + var nameField Field + for _, field := range fields { + if field.Name == "Name" { + nameField = field + break + } + } + + // Verify card/port assignments + expectedCardPort := map[string]string{ + "eth2": "1 / 1", + "eth3": "1 / 2", + "eth0": "2 / 1", + "eth1": "2 / 2", + } + + for i, name := range nameField.Values { + expected := expectedCardPort[name] + actual := cardPortField.Values[i] + if actual != expected { + t.Errorf("NIC %s: expected Card / Port %q, got %q", name, expected, actual) + } + } +} diff --git a/internal/report/table_helpers_nic_test.go b/internal/report/table_helpers_nic_test.go new file mode 100644 index 00000000..a5742b44 --- /dev/null +++ b/internal/report/table_helpers_nic_test.go @@ -0,0 +1,104 @@ +package report + +// Copyright (C) 2021-2025 Intel Corporation +// SPDX-License-Identifier: BSD-3-Clause + +import ( + "testing" +) + +func TestAssignCardAndPort(t *testing.T) { + tests := []struct { + name string + nics []nicInfo + expected map[string]string // map of NIC name to expected "Card / Port" + }{ + { + name: "Two cards with two ports each", + nics: []nicInfo{ + {Name: "eth2", Bus: "0000:32:00.0"}, + {Name: "eth3", Bus: "0000:32:00.1"}, + {Name: "eth0", Bus: "0000:c0:00.0"}, + {Name: "eth1", Bus: "0000:c0:00.1"}, + }, + expected: map[string]string{ + "eth2": "1 / 1", + "eth3": "1 / 2", + "eth0": "2 / 1", + "eth1": "2 / 2", + }, + }, + { + name: "Single card with four ports", + nics: []nicInfo{ + {Name: "eth0", Bus: "0000:19:00.0"}, + {Name: "eth1", Bus: "0000:19:00.1"}, + {Name: "eth2", Bus: "0000:19:00.2"}, + {Name: "eth3", Bus: "0000:19:00.3"}, + }, + expected: map[string]string{ + "eth0": "1 / 1", + "eth1": "1 / 2", + "eth2": "1 / 3", + "eth3": "1 / 4", + }, + }, + { + name: "Three different cards", + nics: []nicInfo{ + {Name: "eth0", Bus: "0000:19:00.0"}, + {Name: "eth1", Bus: "0000:1a:00.0"}, + {Name: "eth2", Bus: "0000:1b:00.0"}, + }, + expected: map[string]string{ + "eth0": "1 / 1", + "eth1": "2 / 1", + "eth2": "3 / 1", + }, + }, + { + name: "Empty bus address should not assign card/port", + nics: []nicInfo{ + {Name: "eth0", Bus: ""}, + }, + expected: map[string]string{ + "eth0": " / ", + }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + assignCardAndPort(tt.nics) + for _, nic := range tt.nics { + expected := tt.expected[nic.Name] + actual := nic.Card + " / " + nic.Port + if actual != expected { + t.Errorf("NIC %s: expected %q, got %q", nic.Name, expected, actual) + } + } + }) + } +} + +func TestExtractFunction(t *testing.T) { + tests := []struct { + busAddr string + expected int + }{ + {"0000:32:00.0", 0}, + {"0000:32:00.1", 1}, + {"0000:32:00.3", 3}, + {"invalid", 0}, + {"", 0}, + } + + for _, tt := range tests { + t.Run(tt.busAddr, func(t *testing.T) { + result := extractFunction(tt.busAddr) + if result != tt.expected { + t.Errorf("expected %d, got %d", tt.expected, result) + } + }) + } +} diff --git a/internal/script/resources/.keep b/internal/script/resources/.keep 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..48cdce85 --- /dev/null +++ b/internal/script/resources/placeholder.txt @@ -0,0 +1 @@ +placeholder From 428ae02e07940ff877b2125dd29ee8e45b38841b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 18 Oct 2025 15:09:21 +0000 Subject: [PATCH 3/6] Add .gitignore for resources placeholder file Co-authored-by: harp-intel <78619061+harp-intel@users.noreply.github.com> --- internal/script/resources/.gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 internal/script/resources/.gitignore diff --git a/internal/script/resources/.gitignore b/internal/script/resources/.gitignore new file mode 100644 index 00000000..eed293eb --- /dev/null +++ b/internal/script/resources/.gitignore @@ -0,0 +1 @@ +placeholder.txt From 8f5484c60fbb72ca54b76d5d6d7d1ff13f94d7e0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 18 Oct 2025 15:11:36 +0000 Subject: [PATCH 4/6] Complete Card/Port NIC mapping feature implementation 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 b53dc362612b739ec01b57bc218268ad09a2e780 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 19 Oct 2025 15:34:38 +0000 Subject: [PATCH 5/6] Reorder NIC table fields as requested Co-authored-by: harp-intel <78619061+harp-intel@users.noreply.github.com> --- internal/report/table_defs.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/internal/report/table_defs.go b/internal/report/table_defs.go index 54aa54e7..2050e38a 100644 --- a/internal/report/table_defs.go +++ b/internal/report/table_defs.go @@ -1607,15 +1607,15 @@ func nicTableValues(outputs map[string]script.ScriptOutput) []Field { {Name: "Name"}, {Name: "Vendor (ID)"}, {Name: "Model (ID)"}, + {Name: "MAC Address"}, {Name: "Speed"}, {Name: "Link"}, {Name: "Bus"}, {Name: "Card / Port"}, + {Name: "NUMA Node"}, {Name: "Driver"}, {Name: "Driver Version"}, {Name: "Firmware Version"}, - {Name: "MAC Address"}, - {Name: "NUMA Node"}, {Name: "IRQBalance", Description: "System level setting. Dynamically monitors system activity and spreads IRQs across available cores, aiming to balance CPU load, improve throughput, and reduce latency for interrupt-heavy workloads."}, {Name: "Adaptive RX", Description: "Enables dynamic adjustment of receive interrupt coalescing based on traffic patterns."}, {Name: "Adaptive TX", Description: "Enables dynamic adjustment of transmit interrupt coalescing based on traffic patterns."}, @@ -1632,20 +1632,20 @@ func nicTableValues(outputs map[string]script.ScriptOutput) []Field { if nicInfo.ModelID != "" { fields[2].Values[len(fields[2].Values)-1] += fmt.Sprintf(" (%s)", nicInfo.ModelID) } - fields[3].Values = append(fields[3].Values, nicInfo.Speed) - fields[4].Values = append(fields[4].Values, nicInfo.Link) - fields[5].Values = append(fields[5].Values, nicInfo.Bus) + fields[3].Values = append(fields[3].Values, nicInfo.MACAddress) + fields[4].Values = append(fields[4].Values, nicInfo.Speed) + fields[5].Values = append(fields[5].Values, nicInfo.Link) + fields[6].Values = append(fields[6].Values, nicInfo.Bus) // Add Card / Port column cardPort := "" if nicInfo.Card != "" && nicInfo.Port != "" { cardPort = nicInfo.Card + " / " + nicInfo.Port } - fields[6].Values = append(fields[6].Values, cardPort) - fields[7].Values = append(fields[7].Values, nicInfo.Driver) - fields[8].Values = append(fields[8].Values, nicInfo.DriverVersion) - fields[9].Values = append(fields[9].Values, nicInfo.FirmwareVersion) - fields[10].Values = append(fields[10].Values, nicInfo.MACAddress) - fields[11].Values = append(fields[11].Values, nicInfo.NUMANode) + fields[7].Values = append(fields[7].Values, cardPort) + fields[8].Values = append(fields[8].Values, nicInfo.NUMANode) + fields[9].Values = append(fields[9].Values, nicInfo.Driver) + fields[10].Values = append(fields[10].Values, nicInfo.DriverVersion) + fields[11].Values = append(fields[11].Values, nicInfo.FirmwareVersion) fields[12].Values = append(fields[12].Values, nicInfo.IRQBalance) fields[13].Values = append(fields[13].Values, nicInfo.AdaptiveRX) fields[14].Values = append(fields[14].Values, nicInfo.AdaptiveTX) From 8bf9a4f34ef176b94e5c67515f79e343964446ea Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 19 Oct 2025 16:01:51 +0000 Subject: [PATCH 6/6] Remove files from resources directory and revert go.sum Co-authored-by: harp-intel <78619061+harp-intel@users.noreply.github.com> --- .gitignore | 1 + go.sum | 8 ++++++++ internal/script/resources/.gitignore | 1 - internal/script/resources/.keep | 0 internal/script/resources/placeholder.txt | 1 - 5 files changed, 9 insertions(+), 2 deletions(-) delete mode 100644 internal/script/resources/.gitignore delete mode 100644 internal/script/resources/.keep delete mode 100644 internal/script/resources/placeholder.txt diff --git a/.gitignore b/.gitignore index 3a7a191d..1b3b8149 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /internal/script/resources/aarch64 /test /__debug_bin*.log +/internal/script/resources/README.md 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/.gitignore b/internal/script/resources/.gitignore deleted file mode 100644 index eed293eb..00000000 --- a/internal/script/resources/.gitignore +++ /dev/null @@ -1 +0,0 @@ -placeholder.txt diff --git a/internal/script/resources/.keep b/internal/script/resources/.keep 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 48cdce85..00000000 --- a/internal/script/resources/placeholder.txt +++ /dev/null @@ -1 +0,0 @@ -placeholder