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

Function parseRdmaKV

cgroup2/utils.go:386–410  ·  view source on GitHub ↗
(raw string, entry *stats.RdmaEntry)

Source from the content-addressed store, hash-verified

384}
385
386func parseRdmaKV(raw string, entry *stats.RdmaEntry) {
387 var value uint64
388 var err error
389
390 k, v, found := strings.Cut(raw, "=")
391 if !found {
392 return
393 }
394
395 if v == "max" {
396 value = math.MaxUint32
397 } else {
398 value, err = parseUint(v, 10, 32)
399 if err != nil {
400 return
401 }
402 }
403
404 switch k {
405 case "hca_handle":
406 entry.HcaHandles = uint32(value)
407 case "hca_object":
408 entry.HcaObjects = uint32(value)
409 }
410}
411
412func toRdmaEntry(strEntries []string) []*stats.RdmaEntry {
413 var rdmaEntries []*stats.RdmaEntry

Callers 1

toRdmaEntryFunction · 0.70

Calls 1

parseUintFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…