Skip to content

Commit 2560bc0

Browse files
authored
Merge pull request #1796 from hj-johannes-lee/PR-2024-003
QAT: make plugin read trimmed heartbeat status
2 parents 11cfd47 + ea6d52d commit 2560bc0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/qat_plugin/dpdkdrv/dpdkdrv.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ func getDeviceHealthiness(device string, lookup map[string]string) string {
416416

417417
// If status reads "-1", the device is considered bad:
418418
// https://github.com/torvalds/linux/blob/v6.6-rc5/Documentation/ABI/testing/debugfs-driver-qat
419-
if data, err := os.ReadFile(hbStatusFile); err == nil && string(data) == "-1" {
419+
if data, err := os.ReadFile(hbStatusFile); err == nil && strings.Split(string(data), "\n")[0] == "-1" {
420420
healthiness = pluginapi.Unhealthy
421421
}
422422

0 commit comments

Comments
 (0)