MCPcopy Create free account
hub / github.com/containerd/cgroups / toRdmaEntry

Function toRdmaEntry

cgroup2/utils.go:412–429  ·  view source on GitHub ↗
(strEntries []string)

Source from the content-addressed store, hash-verified

410}
411
412func toRdmaEntry(strEntries []string) []*stats.RdmaEntry {
413 var rdmaEntries []*stats.RdmaEntry
414 for i := range strEntries {
415 parts := strings.Fields(strEntries[i])
416 switch len(parts) {
417 case 3:
418 entry := new(stats.RdmaEntry)
419 entry.Device = parts[0]
420 parseRdmaKV(parts[1], entry)
421 parseRdmaKV(parts[2], entry)
422
423 rdmaEntries = append(rdmaEntries, entry)
424 default:
425 continue
426 }
427 }
428 return rdmaEntries
429}
430
431// isUnitExists returns true if the error is that a systemd unit already exists.
432func isUnitExists(err error) bool {

Callers 1

rdmaStatsFunction · 0.70

Calls 1

parseRdmaKVFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…