diff --git a/cmd/gpu-kubelet-plugin/device_state.go b/cmd/gpu-kubelet-plugin/device_state.go index 469069104..6a2a96a0c 100644 --- a/cmd/gpu-kubelet-plugin/device_state.go +++ b/cmd/gpu-kubelet-plugin/device_state.go @@ -963,6 +963,18 @@ func (s *DeviceState) unprepareVfioDevices(ctx context.Context, devices Prepared return fmt.Errorf("error unconfiguring vfio device %q: %w", device.Vfio.Device.DeviceName, err) } } + + // Release the NVSwitch fabric partition before rebinding the GPUs to the + // nvidia driver + pciBusIDs := []string{} + for _, device := range devices { + if device.Vfio.Info != nil && device.Vfio.Info.PciBusID != "" { + pciBusIDs = append(pciBusIDs, device.Vfio.Info.PciBusID) + } + } + if err := s.deactivateFabricPartition(pciBusIDs); err != nil { + return err + } return nil } @@ -997,6 +1009,16 @@ func (s *DeviceState) discoverSiblingAllocatables(device *AllocatableDevice) err return fmt.Errorf("error adding allocatable device: %w", err) } device.Vfio.parent = gpu.Gpu + + // The GPU has just switched from the vfio-pci driver back to the nvidia + // driver and is visible to NVML again. If its Fabric Manager attributes + // could not be discovered at startup (because it was already bound to + // vfio-pci then), refresh the FM module mapping from NVML and re-attach + // the gpuModuleId/partitionN attributes to the in-memory VFIO device so + // the republished ResourceSlice carries them. + if err := s.nvdevlib.refreshFabricManagerInfo(device.Vfio); err != nil { + return fmt.Errorf("error refreshing fabric manager info for vfio device %q: %w", device.Vfio.CanonicalName(), err) + } case MigStaticDeviceType: // TODO: Implement once partitionable device is supported with PassthroughSupport feature gate. return nil @@ -1110,6 +1132,7 @@ func (s *DeviceState) applyVfioDeviceConfig(ctx context.Context, config *configa configState.containerEdits = commonEdits // Configure the vfio-pci devices. + pciBusIDs := make([]string, 0, len(results)) for _, r := range results { device := s.perGPUAllocatable.GetAllocatableDevice(r.Device) if device == nil { @@ -1119,11 +1142,83 @@ func (s *DeviceState) applyVfioDeviceConfig(ctx context.Context, config *configa if err != nil { return nil, fmt.Errorf("error configuring vfio device %q: %w", r.Device, err) } + pciBusIDs = append(pciBusIDs, device.Vfio.PciBusID) + } + + // Program the NVSwitch fabric for this set of passthrough GPUs via Fabric + // Manager. No-op on non-HGX nodes / when FM is not wired up. + if err := s.activateFabricPartition(pciBusIDs); err != nil { + return nil, err } return &configState, nil } +// fabricPartitionForPCIBusIDs resolves the FM partition formed by the given set +// of VFIO GPU PCI bus IDs. Returns ok=false (no error) when Fabric Manager is +// not wired up, when a GPU is unknown to FM, or when the set does not map to a +// single FM partition; in all of those cases partition (de)activation is +// skipped. +func (s *DeviceState) fabricPartitionForPCIBusIDs(pciBusIDs []string) (int, bool) { + fm := s.nvdevlib.fmManager + if fm == nil { + return 0, false + } + moduleIDs := make([]int, 0, len(pciBusIDs)) + for _, pci := range pciBusIDs { + moduleID, ok := fm.GetModuleIDByPCI(pci) + if !ok { + klog.Warningf("Fabric Manager: no gpuModuleId for VFIO GPU at PCI %s; skipping partition (de)activation", pci) + return 0, false + } + moduleIDs = append(moduleIDs, moduleID) + } + partitionID, ok := fm.FindPartitionByModuleIDs(moduleIDs) + if !ok { + klog.Warningf("Fabric Manager: GPU module set %v does not match any FM partition; skipping partition (de)activation", moduleIDs) + return 0, false + } + return partitionID, true +} + +// activateFabricPartition activates the FM partition formed by the given VFIO GPUs. +func (s *DeviceState) activateFabricPartition(pciBusIDs []string) error { + partitionID, ok := s.fabricPartitionForPCIBusIDs(pciBusIDs) + if !ok { + return nil + } + // Idempotency: a retried Prepare (e.g. after a later step failed) must not + // re-activate a partition this Manager already activated, which FM would + // reject as in-use. + if slices.Contains(s.nvdevlib.fmManager.ActivatedPartitions(), partitionID) { + klog.V(4).Infof("Fabric Manager: partition %d already active; skipping activation", partitionID) + return nil + } + klog.V(2).Infof("Fabric Manager: activating partition %d for %d-GPU passthrough claim", partitionID, len(pciBusIDs)) + if err := s.nvdevlib.fmManager.ActivatePartition(partitionID); err != nil { + return fmt.Errorf("activating fabric partition %d: %w", partitionID, err) + } + return nil +} + +// deactivateFabricPartition releases the FM partition formed by the given VFIO +// GPUs. +func (s *DeviceState) deactivateFabricPartition(pciBusIDs []string) error { + partitionID, ok := s.fabricPartitionForPCIBusIDs(pciBusIDs) + if !ok { + return nil + } + if !slices.Contains(s.nvdevlib.fmManager.ActivatedPartitions(), partitionID) { + klog.V(4).Infof("Fabric Manager: partition %d already inactive; skipping deactivation", partitionID) + return nil + } + klog.V(2).Infof("Fabric Manager: deactivating partition %d for %d-GPU passthrough claim", partitionID, len(pciBusIDs)) + if err := s.nvdevlib.fmManager.DeactivatePartition(partitionID); err != nil { + return fmt.Errorf("deactivating fabric partition %d: %w", partitionID, err) + } + return nil +} + // GetOpaqueDeviceConfigs returns an ordered list of the configs contained in possibleConfigs for this driver. // // Configs can either come from the resource claim itself or from the device diff --git a/cmd/gpu-kubelet-plugin/deviceinfo.go b/cmd/gpu-kubelet-plugin/deviceinfo.go index 56773dfa7..451c7a270 100644 --- a/cmd/gpu-kubelet-plugin/deviceinfo.go +++ b/cmd/gpu-kubelet-plugin/deviceinfo.go @@ -24,6 +24,7 @@ import ( resourceapi "k8s.io/api/resource/v1" "k8s.io/apimachinery/pkg/api/resource" "k8s.io/dynamic-resource-allocation/deviceattribute" + "k8s.io/klog/v2" "k8s.io/utils/ptr" ) @@ -97,6 +98,20 @@ type VfioDeviceInfo struct { iommuGroup int iommuFDEnabled bool addressableMemoryBytes uint64 + + // Fabric Manager attributes (HGX systems with NVSwitch). Populated only + // when an FM Manager is available at discovery time + // + // gpuModuleID is the per-board physical ID returned by + // nvmlDeviceGetModuleId. It corresponds to the FM partition member + // physicalId + gpuModuleID int + + // partitionsBySize maps an FM partition size (number of GPUs in the + // partition) to the partitionId of the partition of that size that + // includes this GPU. Used to publish the `partition1`/`partition2`/ + // `partition4`/`partition8` device attributes. + partitionsBySize map[int]int } // CanonicalName returns the nameused for device announcement (in ResourceSlice @@ -272,5 +287,30 @@ func (d *VfioDeviceInfo) GetDevice() resourceapi.Device { device.Attributes[d.pcieRootAttr.Name] = d.pcieRootAttr.Value } + d.addFabricManagerAttributes(device.Attributes) + return device } + +// addFabricManagerAttributes publishes the Fabric Manager-derived attributes +func (d *VfioDeviceInfo) addFabricManagerAttributes(attrs map[resourceapi.QualifiedName]resourceapi.DeviceAttribute) { + if d.gpuModuleID == 0 && len(d.partitionsBySize) == 0 { + klog.V(4).Infof("No Fabric Manager attributes for %s", d.CanonicalName()) + return + } + + klog.V(4).Infof("Adding Fabric Manager attributes for %s: gpuModuleId=%d partitionsBySize=%v", + d.CanonicalName(), d.gpuModuleID, d.partitionsBySize) + if d.gpuModuleID != 0 { + attrs["gpuModuleId"] = resourceapi.DeviceAttribute{ + IntValue: ptr.To(int64(d.gpuModuleID)), + } + } + + for size, partitionID := range d.partitionsBySize { + key := resourceapi.QualifiedName(fmt.Sprintf("partition%d", size)) + attrs[key] = resourceapi.DeviceAttribute{ + IntValue: ptr.To(int64(partitionID)), + } + } +} diff --git a/cmd/gpu-kubelet-plugin/driver.go b/cmd/gpu-kubelet-plugin/driver.go index 78c512b2f..a34ee6104 100644 --- a/cmd/gpu-kubelet-plugin/driver.go +++ b/cmd/gpu-kubelet-plugin/driver.go @@ -320,6 +320,13 @@ func (d *driver) Shutdown() error { d.state.nvdevlib.alwaysShutdown() } + // Tear down the long-lived Fabric Manager connection, if one was opened. + if d.state.nvdevlib.fmManager != nil { + if err := d.state.nvdevlib.fmManager.Close(); err != nil { + klog.Warningf("error closing Fabric Manager connection: %v", err) + } + } + if d.deviceHealthMonitor != nil { d.deviceHealthMonitor.Stop() } diff --git a/cmd/gpu-kubelet-plugin/nvlib.go b/cmd/gpu-kubelet-plugin/nvlib.go index a52ca75f7..edcfb8be0 100644 --- a/cmd/gpu-kubelet-plugin/nvlib.go +++ b/cmd/gpu-kubelet-plugin/nvlib.go @@ -34,6 +34,7 @@ import ( "github.com/NVIDIA/go-nvml/pkg/nvml" "k8s.io/dynamic-resource-allocation/deviceattribute" + "sigs.k8s.io/dra-driver-nvidia-gpu/pkg/fabricmanager" "sigs.k8s.io/dra-driver-nvidia-gpu/pkg/featuregates" ) @@ -49,6 +50,7 @@ type deviceLib struct { gpuInfosByUUID map[string]*GpuInfo gpuUUIDbyPCIBusID map[PCIBusID]string devhandleByUUID map[string]nvml.Device + fmManager *fabricmanager.Manager } func newDeviceLib(driverRoot root) (*deviceLib, error) { @@ -90,9 +92,77 @@ func newDeviceLib(driverRoot root) (*deviceLib, error) { } } + // Fabric Manager partitioning is only relevant for GPU passthrough on + // NVSwitch-based HGX nodes. When PassthroughSupport is enabled, try to + // open a long-lived connection to nv-fabricmanager so VFIO devices can be + // published with their gpuModuleId / partition attributes. Failure is + // non-fatal: on non-HGX nodes (or when FM is simply not running) we log + // and leave d.fmManager nil, and all FM-derived attributes are omitted. + if featuregates.Enabled(featuregates.PassthroughSupport) { + d.fmManager = d.tryOpenFabricManager() + } + return &d, nil } +// Fabric Manager connection environment variables and their defaults. +const ( + // fmAddressEnvvar selects the FM TCP transport and sets the host to + // connect to. When this variable is set (even to ""), TCP is used and an + // empty value falls back to defaultFMAddress. + fmAddressEnvvar = "NVIDIA_FABRICMANAGER_ADDRESS" + // fmUnixSocketEnvvar overrides the unix socket path used when TCP is not + // selected. An empty value falls back to defaultFMUnixSocket. + fmUnixSocketEnvvar = "NVIDIA_FABRICMANAGER_UNIX_SOCKET" + // fmLibraryPathEnvvar overrides the libnvfm.so path. An empty value falls + // back to defaultFMLibraryPath. + fmLibraryPathEnvvar = "NVIDIA_FABRICMANAGER_LIBRARY_PATH" + + defaultFMAddress = "127.0.0.1" + defaultFMUnixSocket = "/run/nvidia-fabricmanager/socket" + defaultFMLibraryPath = "/usr/lib/libnvfm.so" +) + +// tryOpenFabricManager attempts to build an FM Manager backed by go-nvfm. +func (l deviceLib) tryOpenFabricManager() *fabricmanager.Manager { + shutdown, ret := l.ensureNVML() + if ret != nvml.SUCCESS { + klog.Warningf("Fabric Manager: NVML unavailable, skipping FM discovery: %s", ret) + return nil + } + defer shutdown() + + libPath := defaultFMLibraryPath + if v, ok := os.LookupEnv(fmLibraryPathEnvvar); ok && v != "" { + libPath = v + } + client := fabricmanager.NewClient(libPath) + + params := fabricmanager.ConnectParams{} + if addr, ok := os.LookupEnv(fmAddressEnvvar); ok { + if addr == "" { + addr = defaultFMAddress + } + params.AddressInfo = addr + } else { + socket := defaultFMUnixSocket + if v, ok := os.LookupEnv(fmUnixSocketEnvvar); ok && v != "" { + socket = v + } + params.AddressInfo = socket + params.AddressIsUnixSocket = true + } + + fmMgr, err := fabricmanager.Open(l.nvmllib, client, params) + if err != nil { + klog.Warningf("Fabric Manager not available, FM attributes will be omitted: %v", err) + return nil + } + + klog.Infof("Fabric Manager connection established; FM partition attributes enabled") + return fmMgr +} + // prependPathListEnvvar prepends a specified list of strings to a specified envvar and returns its value. func prependPathListEnvvar(envvar string, prepend ...string) string { if len(prepend) == 0 { @@ -700,9 +770,70 @@ func (l deviceLib) getVfioDeviceInfo(idx int, device *nvpci.NvidiaPCIDevice) (*V addressableMemoryBytes: memoryBytes, } + if err := l.attachFabricManagerInfo(vfioDeviceInfo); err != nil { + return nil, fmt.Errorf("error attaching fabric manager info for %s: %w", device.Address, err) + } + return vfioDeviceInfo, nil } +// attachFabricManagerInfo populates the gpuModuleId and partitionN attributes +// on the given VFIO device from the FM Manager, if one is wired up. It is a +// no-op when fmManager is nil. +// +// A PCI bus ID known to the host but unknown to FM is treated as +// non-fatal: we log and skip the FM attributes for that GPU. +func (l deviceLib) attachFabricManagerInfo(d *VfioDeviceInfo) error { + if l.fmManager == nil { + return nil + } + moduleID, ok := l.fmManager.GetModuleIDByPCI(d.PciBusID) + if !ok { + klog.Warningf("Fabric Manager has no gpuModuleId for GPU PCI bus ID %s; publishing %s without FM attributes. "+ + "This happens when FM could not supply a PCI address for this GPU (e.g. it was already bound to vfio-pci before nv-fabricmanager started).", + d.PciBusID, d.CanonicalName()) + return nil + } + d.gpuModuleID = moduleID + + bySize, err := l.fmManager.GetPartitionsBySizeByModuleID(moduleID) + if err != nil { + return fmt.Errorf("getting partition-by-size mapping for moduleId %d: %w", moduleID, err) + } + d.partitionsBySize = bySize + return nil +} + +// refreshFabricManagerInfo refreshes the FM module mapping from NVML and +// re-attaches the FM attributes (gpuModuleId / partitionN) to the given VFIO +// device. +// +// It is used after a GPU has switched from the vfio-pci driver back to the +// nvidia driver (during unprepare). A GPU already bound to vfio-pci at plugin +// startup is invisible to NVML, so its gpuModuleId could not be discovered and +// its VFIO device was published without FM attributes. Once the GPU is back on +// the nvidia driver NVML can see it again: refresh the FM module mapping so the +// (PCI, gpuModuleId) pair is recorded, then re-attach the attributes so they +// are repopulated in the in-memory device and republished to the ResourceSlice. +// +// No-op when fmManager is nil (non-HGX nodes / FM not wired up). +func (l deviceLib) refreshFabricManagerInfo(d *VfioDeviceInfo) error { + if l.fmManager == nil { + return nil + } + + shutdown, ret := l.ensureNVML() + if ret != nvml.SUCCESS { + return fmt.Errorf("ensureNVML failed: %w", ret) + } + defer shutdown() + + if err := l.fmManager.RefreshModuleMapping(l.nvmllib); err != nil { + return fmt.Errorf("refreshing fabric manager module mapping: %w", err) + } + return l.attachFabricManagerInfo(d) +} + func (l deviceLib) getMigDevices(gpuInfo *GpuInfo) (map[string]*MigDeviceInfo, error) { if !gpuInfo.migEnabled { return nil, nil diff --git a/deployments/container/Dockerfile b/deployments/container/Dockerfile index a3c5b7ad8..683df285d 100644 --- a/deployments/container/Dockerfile +++ b/deployments/container/Dockerfile @@ -98,6 +98,21 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* \ && /bin/bash-static --version +# Fabric Manager shared library (libnvfm.so), required at runtime by the +# gpu-kubelet-plugin to talk to nv-fabricmanager on NVSwitch-based HGX nodes. +# The distroless runtime image has no package manager, so install the FM SDK +# package here and copy the resulting library into the final image below. +FROM nvcr.io/nvidia/base/ubuntu:jammy-20260217 AS fabricmanager +# Install the FM SDK and stage libnvfm.so (+ versioned soname) into an +# arch-neutral directory. The package installs into the target arch's multiarch +# dir (e.g. x86_64-linux-gnu or aarch64-linux-gnu), so we normalize the location +# here and copy with -a to preserve the symlink chain. +RUN apt-get update \ + && apt-get install -y --no-install-recommends nvidia-fabricmanager-dev-580 \ + && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives \ + && mkdir -p /fm-lib \ + && cp -a /usr/lib/*-linux-gnu/libnvfm.so* /fm-lib/ + # Pull the nvidia-cdi-hook binary out of the relevant toolkit container # (arch: TARGETPLATFORM, set via --platform). FROM ${TOOLKIT_CONTAINER_IMAGE} AS toolkit @@ -131,6 +146,11 @@ COPY LICENSE / COPY --from=bash /bin/bash-static /bin/bash +# Fabric Manager SDK shared library (and its versioned soname) so the +# gpu-kubelet-plugin can dlopen libnvfm.so at runtime. Placed in /usr/lib so the +# path is arch-neutral and resolvable via an absolute dlopen. +COPY --from=fabricmanager /fm-lib/ /usr/lib/ + COPY --from=toolkit /artifacts/rpm/usr/bin/nvidia-cdi-hook /usr/bin/nvidia-cdi-hook COPY --from=build /artifacts/compute-domain-controller /usr/bin/compute-domain-controller COPY --from=build /artifacts/compute-domain-kubelet-plugin /usr/bin/compute-domain-kubelet-plugin diff --git a/deployments/helm/dra-driver-nvidia-gpu/templates/kubeletplugin.yaml b/deployments/helm/dra-driver-nvidia-gpu/templates/kubeletplugin.yaml index f245f0ee4..e26ffeb1b 100644 --- a/deployments/helm/dra-driver-nvidia-gpu/templates/kubeletplugin.yaml +++ b/deployments/helm/dra-driver-nvidia-gpu/templates/kubeletplugin.yaml @@ -295,6 +295,8 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} volumeMounts: + - name: run-nvidia-fabricmanager + mountPath: /run/nvidia-fabricmanager - name: plugins-registry mountPath: {{ .Values.kubeletPlugin.kubeletRegistrarDirectoryPath | quote }} - name: plugins @@ -319,6 +321,10 @@ spec: {{- end }} {{- end }} volumes: + - name: run-nvidia-fabricmanager + hostPath: + path: /run/nvidia-fabricmanager + type: DirectoryOrCreate - name: plugins-registry hostPath: path: {{ .Values.kubeletPlugin.kubeletRegistrarDirectoryPath | quote }} diff --git a/go.mod b/go.mod index 96b3ca82b..e548cbaae 100644 --- a/go.mod +++ b/go.mod @@ -33,6 +33,7 @@ require ( ) require ( + github.com/NVIDIA/go-nvfm v0.0.0-20260528194329-0a8cb60d7cb1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect @@ -81,7 +82,7 @@ require ( golang.org/x/net v0.53.0 // indirect golang.org/x/oauth2 v0.34.0 // indirect golang.org/x/sync v0.20.0 // indirect - golang.org/x/sys v0.43.0 // indirect + golang.org/x/sys v0.45.0 // indirect golang.org/x/term v0.42.0 // indirect golang.org/x/text v0.36.0 // indirect golang.org/x/tools v0.44.0 // indirect @@ -96,3 +97,5 @@ require ( sigs.k8s.io/structured-merge-diff/v6 v6.3.2 // indirect sigs.k8s.io/yaml v1.6.0 // indirect ) + +replace github.com/NVIDIA/go-nvfm => github.com/varunrsekar/go-nvfm v0.0.0-20260528194329-0a8cb60d7cb1 diff --git a/go.sum b/go.sum index 25ae2dc36..37ad5f99b 100644 --- a/go.sum +++ b/go.sum @@ -165,6 +165,8 @@ github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= github.com/urfave/cli/v2 v2.27.7 h1:bH59vdhbjLv3LAvIu6gd0usJHgoTTPhCFib8qqOwXYU= github.com/urfave/cli/v2 v2.27.7/go.mod h1:CyNAG/xg+iAOg0N4MPGZqVmv2rCoP267496AOXUZjA4= +github.com/varunrsekar/go-nvfm v0.0.0-20260528194329-0a8cb60d7cb1 h1:UBoTO0/Lm6bYKAp/CGVwZBIOao6C2kftymuOxTebcuU= +github.com/varunrsekar/go-nvfm v0.0.0-20260528194329-0a8cb60d7cb1/go.mod h1:jz/LvQcib8nFWUx7JGnFDhi+hERE+PlFYK44wvl+U7M= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= @@ -209,6 +211,8 @@ golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= golang.org/x/sys v0.43.0 h1:Rlag2XtaFTxp19wS8MXlJwTvoh8ArU6ezoyFsMyCTNI= golang.org/x/sys v0.43.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= +golang.org/x/sys v0.45.0 h1:dO4czNzziLiiXplLQgBCEpCvXQ3dnkn0SdaZSYdQ+FY= +golang.org/x/sys v0.45.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/term v0.42.0 h1:UiKe+zDFmJobeJ5ggPwOshJIVt6/Ft0rcfrXZDLWAWY= golang.org/x/term v0.42.0/go.mod h1:Dq/D+snpsbazcBG5+F9Q1n2rXV8Ma+71xEjTRufARgY= golang.org/x/text v0.36.0 h1:JfKh3XmcRPqZPKevfXVpI1wXPTqbkE5f7JA92a55Yxg= diff --git a/pkg/fabricmanager/client.go b/pkg/fabricmanager/client.go new file mode 100644 index 000000000..4fe1d06e6 --- /dev/null +++ b/pkg/fabricmanager/client.go @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2026 NVIDIA CORPORATION. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package fabricmanager + +import "errors" + +var ErrUnimplemented = errors.New("fabricmanager: client backend not implemented") + +type ConnectParams struct { + // AddressInfo is ":" for TCP, or a filesystem path when + // AddressIsUnixSocket is true. Empty means use the FM SDK default. + AddressInfo string + // TimeoutMs is the connect timeout, in milliseconds. Zero uses the SDK + // default. + TimeoutMs uint32 + // AddressIsUnixSocket selects the unix-socket transport. + AddressIsUnixSocket bool +} + +// PartitionGPU describes a single GPU as reported by FM inside a fabric +// partition. The fields correspond to fmFabricPartitionGpuInfo_t. + +type PartitionGPU struct { + // PhysicalID is the GPU's physical/module ID + PhysicalID int + UUID string + PCIBusID string + NumNvLinksAvailable uint32 + MaxNumNvLinks uint32 + NvLinkLineRateMBps uint32 +} + +// Partition is a single FM-supported fabric partition +// Corresponds to fmFabricPartitionInfo_t. +type Partition struct { + ID int + IsActive bool + GPUs []PartitionGPU +} + +// GPUModuleIDs returns the PhysicalIDs/ModuleIDs of all +// GPUs in the partition, in the order FM reported them. +func (p Partition) GPUModuleIDs() []int { + ids := make([]int, len(p.GPUs)) + for i, g := range p.GPUs { + ids[i] = g.PhysicalID + } + return ids +} + +// UnsupportedPartition describes an FM-rejected partition +// Mirrors fmUnsupportedFabricPartitionInfo_t. +type UnsupportedPartition struct { + ID int + GPUPhysicalIDs []int +} + +// Client is a Go projection of the NVIDIA Fabric Manager C SDK +// (libnvidia-fabricmanager.so) +type Client interface { + Init() error + + Connect(params ConnectParams) error + + // GetSupportedFabricPartitions returns every partition FM supports on this node, including each partition's GPU members. + GetSupportedFabricPartitions() ([]Partition, error) + + // GetUnsupportedFabricPartitions returns partitions FM knows about but has marked unsupported (e.g. due to NVLink failures). + GetUnsupportedFabricPartitions() ([]UnsupportedPartition, error) + + // ActivateFabricPartition asks FM to program the NVSwitch fabric for the given partition. Used as part of DRA allocation for GPU passthrough. + ActivateFabricPartition(partitionID int) error + + // DeactivateFabricPartition releases the NVSwitch fabric programming + // for the given partition. + DeactivateFabricPartition(partitionID int) error + + // Disconnect closes the connection to nv-fabricmanager (fmDisconnect). + Disconnect() error + + // Shutdown unloads/shuts down the FM library (fmLibShutdown). + Shutdown() error +} diff --git a/pkg/fabricmanager/client_nvfm.go b/pkg/fabricmanager/client_nvfm.go new file mode 100644 index 000000000..911253044 --- /dev/null +++ b/pkg/fabricmanager/client_nvfm.go @@ -0,0 +1,199 @@ +/* + * Copyright (c) 2026 NVIDIA CORPORATION. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package fabricmanager + +import ( + "fmt" + + "github.com/NVIDIA/go-nvfm/pkg/nvfm" +) + +// nvfmClient is a Client backed by NVIDIA's go-nvfm bindings, which wrap the +// Fabric Manager C SDK (libnvfm.so / libnvidia-fabricmanager.so) loaded at +// runtime via dlopen. +type nvfmClient struct { + lib nvfm.Interface + handle nvfm.Handle +} + +// NewClient returns a Client backed by go-nvfm. libraryPath optionally points +// at a specific libnvfm.so; an empty string uses the default library name and +// relies on the dynamic loader's search path. +func NewClient(libraryPath string) Client { + var opts []nvfm.LibraryOption + if libraryPath != "" { + opts = append(opts, nvfm.WithLibraryPath(libraryPath)) + } + return &nvfmClient{lib: nvfm.New(opts...)} +} + +func (c *nvfmClient) Init() error { + return toError(c.lib.Init(), "fmLibInit") +} + +func (c *nvfmClient) Connect(params ConnectParams) error { + opts := []nvfm.ConnectOption{} + if params.AddressInfo != "" { + if params.AddressIsUnixSocket { + opts = append(opts, nvfm.WithUnixSocket(params.AddressInfo)) + } else { + opts = append(opts, nvfm.WithAddress(params.AddressInfo)) + } + } + if params.TimeoutMs != 0 { + opts = append(opts, nvfm.WithTimeoutMs(params.TimeoutMs)) + } + + handle, ret := c.lib.Connect(opts...) + if err := toError(ret, "fmConnect"); err != nil { + return err + } + c.handle = handle + return nil +} + +func (c *nvfmClient) Disconnect() error { + if c.handle == nil { + return nil + } + err := toError(c.handle.Disconnect(), "fmDisconnect") + c.handle = nil + return err +} + +func (c *nvfmClient) Shutdown() error { + return toError(c.lib.Shutdown(), "fmLibShutdown") +} + +func (c *nvfmClient) GetSupportedFabricPartitions() ([]Partition, error) { + if c.handle == nil { + return nil, errNotConnected + } + list, ret := c.handle.GetSupportedFabricPartitions() + if err := toError(ret, "fmGetSupportedFabricPartitions"); err != nil { + return nil, err + } + return toPartitions(list), nil +} + +func (c *nvfmClient) GetUnsupportedFabricPartitions() ([]UnsupportedPartition, error) { + if c.handle == nil { + return nil, errNotConnected + } + list, ret := c.handle.GetUnsupportedFabricPartitions() + if err := toError(ret, "fmGetUnsupportedFabricPartitions"); err != nil { + return nil, err + } + return toUnsupportedPartitions(list), nil +} + +func (c *nvfmClient) ActivateFabricPartition(partitionID int) error { + if c.handle == nil { + return errNotConnected + } + return toError( + c.handle.ActivateFabricPartition(nvfm.FabricPartitionId(partitionID)), + "fmActivateFabricPartition", + ) +} + +func (c *nvfmClient) DeactivateFabricPartition(partitionID int) error { + if c.handle == nil { + return errNotConnected + } + return toError( + c.handle.DeactivateFabricPartition(nvfm.FabricPartitionId(partitionID)), + "fmDeactivateFabricPartition", + ) +} + +var errNotConnected = fmt.Errorf("fabricmanager: not connected (call Connect first)") + +// toError converts an nvfm.Return into an error, returning nil on SUCCESS. +func toError(ret nvfm.Return, op string) error { + if ret == nvfm.SUCCESS { + return nil + } + return fmt.Errorf("%s: %s", op, ret) +} + +// clamp returns the smaller of n (a count reported by FM) and the static +// length of the backing array, guarding against malformed counts. +func clamp(n uint32, max int) int { + if int(n) > max { + return max + } + return int(n) +} + +func toPartitions(list nvfm.FabricPartitionList) []Partition { + count := clamp(list.NumPartitions, len(list.PartitionInfo)) + out := make([]Partition, 0, count) + for i := 0; i < count; i++ { + p := list.PartitionInfo[i] + numGPUs := clamp(p.NumGpus, len(p.GpuInfo)) + gpus := make([]PartitionGPU, 0, numGPUs) + for j := 0; j < numGPUs; j++ { + g := p.GpuInfo[j] + gpus = append(gpus, PartitionGPU{ + PhysicalID: int(g.PhysicalId), + UUID: int8ToString(g.Uuid[:]), + PCIBusID: int8ToString(g.PciBusId[:]), + NumNvLinksAvailable: g.NumNvLinksAvailable, + MaxNumNvLinks: g.MaxNumNvLinks, + NvLinkLineRateMBps: g.NvlinkLineRateMBps, + }) + } + out = append(out, Partition{ + ID: int(p.PartitionId), + IsActive: p.IsActive != 0, + GPUs: gpus, + }) + } + return out +} + +func toUnsupportedPartitions(list nvfm.UnsupportedFabricPartitionList) []UnsupportedPartition { + count := clamp(list.NumPartitions, len(list.PartitionInfo)) + out := make([]UnsupportedPartition, 0, count) + for i := 0; i < count; i++ { + p := list.PartitionInfo[i] + numGPUs := clamp(p.NumGpus, len(p.GpuPhysicalIds)) + ids := make([]int, 0, numGPUs) + for j := 0; j < numGPUs; j++ { + ids = append(ids, int(p.GpuPhysicalIds[j])) + } + out = append(out, UnsupportedPartition{ + ID: int(p.PartitionId), + GPUPhysicalIDs: ids, + }) + } + return out +} + +// int8ToString converts a NUL-terminated C char array (represented as []int8 +// by cgo) into a Go string. +func int8ToString(b []int8) string { + buf := make([]byte, 0, len(b)) + for _, c := range b { + if c == 0 { + break + } + buf = append(buf, byte(c)) + } + return string(buf) +} diff --git a/pkg/fabricmanager/client_stub.go b/pkg/fabricmanager/client_stub.go new file mode 100644 index 000000000..c92592dfb --- /dev/null +++ b/pkg/fabricmanager/client_stub.go @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2026 NVIDIA CORPORATION. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package fabricmanager + +// stubClient is a placeholder Client. It exists so that this package compiles +// and is usable for unit tests / dry-runs without the cgo-backed FM SDK +// (libnvfm.so) on the build host. +// +// All partition query/activation methods return ErrUnimplemented; +// Init/Connect/Disconnect/Shutdown are no-ops so a caller's defer chain is +// harmless. Callers (e.g. Manager.Open) should treat ErrUnimplemented as "FM +// not available on this node" and skip publishing FM-derived attributes. +// +// The production backend is NewClient (client_nvfm.go), which wraps NVIDIA's +// go-nvfm bindings. From the Manager's perspective nothing changes: it always +// programs against the Client interface. +type stubClient struct{} + +// NewStubClient returns a no-op FM client whose partition queries always fail +// with ErrUnimplemented. +func NewStubClient() Client { + return &stubClient{} +} + +func (*stubClient) Init() error { return nil } +func (*stubClient) Connect(ConnectParams) error { return nil } +func (*stubClient) Disconnect() error { return nil } +func (*stubClient) Shutdown() error { return nil } + +func (*stubClient) GetSupportedFabricPartitions() ([]Partition, error) { + return nil, ErrUnimplemented +} + +func (*stubClient) GetUnsupportedFabricPartitions() ([]UnsupportedPartition, error) { + return nil, ErrUnimplemented +} + +func (*stubClient) ActivateFabricPartition(int) error { return ErrUnimplemented } +func (*stubClient) DeactivateFabricPartition(int) error { return ErrUnimplemented } diff --git a/pkg/fabricmanager/manager.go b/pkg/fabricmanager/manager.go new file mode 100644 index 000000000..b7f2ab0ef --- /dev/null +++ b/pkg/fabricmanager/manager.go @@ -0,0 +1,543 @@ +/* + * Copyright (c) 2026 NVIDIA CORPORATION. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package fabricmanager + +import ( + "fmt" + "sort" + "strings" + "sync" + + "github.com/NVIDIA/go-nvml/pkg/nvml" + "golang.org/x/sys/unix" + "k8s.io/klog/v2" +) + +// Manager is the in-memory view this package exposes to the rest of the DRA +// driver. It owns: +// +// - a PCI bus ID <-> gpuModuleId map populated by walking every visible GPU +// - the list of FM-supported fabric partitions discovered through a Client +// - a long-lived connection to nv-fabricmanager +type Manager struct { + mu sync.RWMutex + + client Client + opened bool + + gpuModuleIDByPCI map[string]int + pciByGpuModuleID map[int]string + + partitionsByID map[int]Partition + + // activated tracks the set of partitions Activate has been called on + // (and Deactivate has not yet undone). + activated map[int]struct{} +} + +// NVMLDeviceLister is the minimal subset of nvml.Interface required to build +// the gpuModuleId <-> PCI bus ID mapping. +type NVMLDeviceLister interface { + DeviceGetCount() (int, nvml.Return) + DeviceGetHandleByIndex(int) (nvml.Device, nvml.Return) +} + +// Open builds a Manager and leaves a long-lived FM connection in place so the +// caller can subsequently activate and deactivate partitions. It: +// +// 1. Walks every GPU visible to NVML and records (PCI bus ID, gpuModuleId). +// 2. Calls Init+Connect on the FM client. +// 3. Calls GetSupportedFabricPartitions, augments the (PCI bus ID, +// gpuModuleId) map with any GPUs only FM can see (e.g. GPUs already bound +// to vfio-pci for passthrough, invisible to NVML), and records the FM-supported partitions. +// + +func Open(lib NVMLDeviceLister, client Client, params ConnectParams) (*Manager, error) { + if lib == nil { + return nil, fmt.Errorf("fabricmanager: nil NVML interface") + } + if client == nil { + return nil, fmt.Errorf("fabricmanager: nil FM client") + } + + m := &Manager{ + client: client, + gpuModuleIDByPCI: make(map[string]int), + pciByGpuModuleID: make(map[int]string), + partitionsByID: make(map[int]Partition), + activated: make(map[int]struct{}), + } + + if err := m.pciIdToGpuModuleIdMap(lib); err != nil { + return nil, fmt.Errorf("fabricmanager: pciIdToGpuModuleIdMap: %w", err) + } + + if err := client.Init(); err != nil { + return nil, fmt.Errorf("fabricmanager: fmLibInit: %w", err) + } + if err := client.Connect(params); err != nil { + _ = client.Shutdown() + return nil, fmt.Errorf("fabricmanager: fmConnect(%q): %w", params.AddressInfo, err) + } + + partitions, err := client.GetSupportedFabricPartitions() + if err != nil { + _ = client.Disconnect() + _ = client.Shutdown() + return nil, fmt.Errorf("fabricmanager: fmGetSupportedFabricPartitions: %w", err) + } + + if err := m.recordsPartitions(partitions); err != nil { + _ = client.Disconnect() + _ = client.Shutdown() + return nil, err + } + + // Seed activated set from any partitions FM already reports as active + // (e.g. after a DRA driver restart with FM still running). + for _, p := range partitions { + if p.IsActive { + m.activated[p.ID] = struct{}{} + } + } + + m.opened = true + return m, nil +} + +// Close tears down the Manager's FM connection. +func (m *Manager) Close() error { + m.mu.Lock() + defer m.mu.Unlock() + + if !m.opened { + return nil + } + m.opened = false + client := m.client + + var firstErr error + if err := client.Disconnect(); err != nil { + firstErr = fmt.Errorf("fabricmanager: fmDisconnect: %w", err) + } + if err := client.Shutdown(); err != nil && firstErr == nil { + firstErr = fmt.Errorf("fabricmanager: fmLibShutdown: %w", err) + } + return firstErr +} + +// walkPCIModuleMapping walks every NVML-visible GPU and returns freshly built +// gpuModuleId <-> PCI bus ID maps. Duplicate moduleIds or PCI bus IDs among the +// visible GPUs are reported as errors. GPUs bound to vfio-pci are invisible to +// NVML and therefore absent from the returned maps. +func walkPCIModuleMapping(lib NVMLDeviceLister) (map[string]int, map[int]string, error) { + count, ret := lib.DeviceGetCount() + if ret != nvml.SUCCESS { + return nil, nil, fmt.Errorf("fabricmanager: NVML DeviceGetCount: %v", ret) + } + + gpuModuleIDByPCI := make(map[string]int, count) + pciByGpuModuleID := make(map[int]string, count) + + for i := 0; i < count; i++ { + dev, ret := lib.DeviceGetHandleByIndex(i) + if ret != nvml.SUCCESS { + return nil, nil, fmt.Errorf("fabricmanager: NVML DeviceGetHandleByIndex(%d): %v", i, ret) + } + + moduleID, ret := dev.GetModuleId() + if ret != nvml.SUCCESS { + return nil, nil, fmt.Errorf("fabricmanager: NVML GetModuleId for device %d: %v", i, ret) + } + + pciInfo, ret := dev.GetPciInfo() + if ret != nvml.SUCCESS { + return nil, nil, fmt.Errorf("fabricmanager: NVML GetPciInfo for device %d: %v", i, ret) + } + pciBusID := normalizePCIBusID(unix.ByteSliceToString(pciInfo.BusId[:])) + if pciBusID == "" { + return nil, nil, fmt.Errorf("fabricmanager: empty PCI bus ID for device %d (moduleId=%d)", i, moduleID) + } + + if existing, ok := pciByGpuModuleID[moduleID]; ok { + return nil, nil, fmt.Errorf("fabricmanager: duplicate gpuModuleId %d for PCI bus IDs %q and %q", + moduleID, existing, pciBusID) + } + if existing, ok := gpuModuleIDByPCI[pciBusID]; ok { + return nil, nil, fmt.Errorf("fabricmanager: duplicate PCI bus ID %q for gpuModuleIds %d and %d", + pciBusID, existing, moduleID) + } + gpuModuleIDByPCI[pciBusID] = moduleID + pciByGpuModuleID[moduleID] = pciBusID + } + return gpuModuleIDByPCI, pciByGpuModuleID, nil +} + +// pciIdToGpuModuleIdMap populates the gpuModuleId <-> PCI bus ID maps by walking +// every NVML-visible GPU. The maps are replaced atomically so concurrent +// readers always see a consistent snapshot. +func (m *Manager) pciIdToGpuModuleIdMap(lib NVMLDeviceLister) error { + gpuModuleIDByPCI, pciByGpuModuleID, err := walkPCIModuleMapping(lib) + if err != nil { + return err + } + + m.mu.Lock() + defer m.mu.Unlock() + m.gpuModuleIDByPCI = gpuModuleIDByPCI + m.pciByGpuModuleID = pciByGpuModuleID + return nil +} + +// RefreshModuleMapping re-walks every NVML-visible GPU and merges any newly +// discovered (PCI bus ID, gpuModuleId) entries into the existing maps. +// +// This is used after a GPU is rebound from the vfio-pci driver back to the +// nvidia driver. At Open() such a GPU was bound to vfio-pci -- hence invisible +// to NVML and absent from the maps -- so its VFIO device was published without +// gpuModuleId/partitionN attributes. Once it is back on the nvidia driver it +// becomes visible to NVML and its (PCI, gpuModuleId) pair can finally be +// recorded. +func (m *Manager) RefreshModuleMapping(lib NVMLDeviceLister) error { + if err := m.checkOpen(); err != nil { + return err + } + + gpuModuleIDByPCI, _, err := walkPCIModuleMapping(lib) + if err != nil { + return err + } + + m.mu.Lock() + defer m.mu.Unlock() + for pciBusID, moduleID := range gpuModuleIDByPCI { + // If the freshly observed (PCI, gpuModuleId) pair conflicts with an existing + // entry, overwrite it with the NVML value and prune the now-stale + // reverse mapping so both maps stay consistent. + if existing, ok := m.gpuModuleIDByPCI[pciBusID]; ok && existing != moduleID { + klog.Warningf("fabricmanager: PCI bus ID %q was mapped to gpuModuleId %d but NVML now reports %d; updating", + pciBusID, existing, moduleID) + delete(m.pciByGpuModuleID, existing) + } + if existing, ok := m.pciByGpuModuleID[moduleID]; ok && existing != pciBusID { + klog.Warningf("fabricmanager: gpuModuleId %d was mapped to PCI bus ID %q but NVML now reports %q; updating", + moduleID, existing, pciBusID) + delete(m.gpuModuleIDByPCI, existing) + } + m.gpuModuleIDByPCI[pciBusID] = moduleID + m.pciByGpuModuleID[moduleID] = pciBusID + klog.V(2).Infof("fabricmanager: recorded GPU module mapping after rebind to nvidia driver: PCI=%s gpuModuleId=%d", + pciBusID, moduleID) + } + return nil +} + +// recordsPartitions records the FM-supplied partitions, validating that every +// gpuModuleId referenced by FM corresponds to a GPU present in the module map. +func (m *Manager) recordsPartitions(parts []Partition) error { + m.mu.Lock() + defer m.mu.Unlock() + + byID := make(map[int]Partition, len(parts)) + pciByGpuModuleID := m.pciByGpuModuleID + + for _, p := range parts { + if _, dup := byID[p.ID]; dup { + return fmt.Errorf("fabricmanager: FM returned duplicate partitionId %d", p.ID) + } + if len(p.GPUs) == 0 { + return fmt.Errorf("fabricmanager: partition %d has no GPUs", p.ID) + } + seen := make(map[int]struct{}, len(p.GPUs)) + for _, g := range p.GPUs { + if _, dup := seen[g.PhysicalID]; dup { + return fmt.Errorf("fabricmanager: partition %d references gpuModuleId %d twice", + p.ID, g.PhysicalID) + } + seen[g.PhysicalID] = struct{}{} + if _, known := pciByGpuModuleID[g.PhysicalID]; !known { + klog.Warningf("fabricmanager: gpuModuleId %d referenced by FM has no resolvable PCI bus ID and will be published without FM attributes", g.PhysicalID) + } + } + byID[p.ID] = p + } + m.partitionsByID = byID + return nil +} + +// GetModuleIDByPCI returns the gpuModuleId associated with the given PCI bus +// ID, or false if no GPU on the node matches. Lookup is case-insensitive and +// tolerates both the 4-digit ("0000:3b:00.0") and 8-digit ("00000000:3B:00.0") +// PCI domain forms. +func (m *Manager) GetModuleIDByPCI(pciBusID string) (int, bool) { + key := normalizePCIBusID(pciBusID) + m.mu.RLock() + defer m.mu.RUnlock() + id, ok := m.gpuModuleIDByPCI[key] + return id, ok +} + +// GetPCIByModuleID returns the PCI bus ID associated with the given +// gpuModuleId, or false if no GPU on the node matches. +func (m *Manager) GetPCIByModuleID(moduleID int) (string, bool) { + m.mu.RLock() + defer m.mu.RUnlock() + pci, ok := m.pciByGpuModuleID[moduleID] + return pci, ok +} + +// GetPartition returns the FM partition info for the given partitionId, or +// false if no such partition was reported by FM. +func (m *Manager) GetPartition(partitionID int) (Partition, bool) { + m.mu.RLock() + defer m.mu.RUnlock() + p, ok := m.partitionsByID[partitionID] + return p, ok +} + +// Partitions returns every FM-supported partition, sorted ascending by id. +func (m *Manager) Partitions() []Partition { + m.mu.RLock() + ids := make([]int, 0, len(m.partitionsByID)) + for id := range m.partitionsByID { + ids = append(ids, id) + } + out := make([]Partition, 0, len(ids)) + sort.Ints(ids) + for _, id := range ids { + out = append(out, m.partitionsByID[id]) + } + m.mu.RUnlock() + return out +} + +// GetPartitionsByPCI returns all partitionIds that include the GPU identified +// by the given PCI bus ID. Sorted ascending. Returns (nil, false) if the PCI +// bus ID is unknown to NVML. +func (m *Manager) GetPartitionsByPCI(pciBusID string) ([]int, bool) { + moduleID, ok := m.GetModuleIDByPCI(pciBusID) + if !ok { + return nil, false + } + return m.GetPartitionsByModuleID(moduleID), true +} + +// GetPartitionsByModuleID returns all partitionIds that include the given +// gpuModuleId. Sorted ascending. Returns an empty (non-nil) slice if no +// partitions reference the module. +func (m *Manager) GetPartitionsByModuleID(moduleID int) []int { + m.mu.RLock() + defer m.mu.RUnlock() + + var ids []int + for _, p := range m.partitionsByID { + for _, g := range p.GPUs { + if g.PhysicalID == moduleID { + ids = append(ids, p.ID) + break + } + } + } + sort.Ints(ids) + if ids == nil { + ids = []int{} + } + return ids +} + +// GetPartitionsBySizeByModuleID returns a map keyed by partition size (number +// of GPUs in the partition) to the partitionId of the partition of that size +// that includes the given gpuModuleId. e.g.: +// +// gpuModuleId: 1 +// partition1: 8 +// partition2: 4 +// partition4: 2 +// partition8: 1 +// +// On a well-formed node FM produces exactly one partition per +// (size, GPU) pair; if more than one is found this method returns an error +func (m *Manager) GetPartitionsBySizeByModuleID(moduleID int) (map[int]int, error) { + m.mu.RLock() + defer m.mu.RUnlock() + + out := make(map[int]int) + for _, p := range m.partitionsByID { + size := len(p.GPUs) + for _, g := range p.GPUs { + if g.PhysicalID == moduleID { + if existing, dup := out[size]; dup { + return nil, fmt.Errorf( + "fabricmanager: gpuModuleId %d appears in two partitions of size %d (%d and %d)", + moduleID, size, existing, p.ID) + } + out[size] = p.ID + break + } + } + } + return out, nil +} + +func (m *Manager) GetPartitionsBySizeByPCI(pciBusID string) (map[int]int, bool, error) { + moduleID, ok := m.GetModuleIDByPCI(pciBusID) + if !ok { + return nil, false, nil + } + out, err := m.GetPartitionsBySizeByModuleID(moduleID) + return out, true, err +} + +// FindPartitionByModuleIDs returns the partitionId of the FM partition whose +// GPU member set is exactly equal to the given set of gpuModuleIds, or +// (0, false) if no partition matches +func (m *Manager) FindPartitionByModuleIDs(moduleIDs []int) (int, bool) { + if len(moduleIDs) == 0 { + return 0, false + } + want := make(map[int]struct{}, len(moduleIDs)) + for _, id := range moduleIDs { + want[id] = struct{}{} + } + if len(want) != len(moduleIDs) { + return 0, false + } + + m.mu.RLock() + defer m.mu.RUnlock() + for _, p := range m.partitionsByID { + if len(p.GPUs) != len(want) { + continue + } + match := true + for _, g := range p.GPUs { + if _, ok := want[g.PhysicalID]; !ok { + match = false + break + } + } + if match { + return p.ID, true + } + } + return 0, false +} + +// ActivatePartition asks Fabric Manager to program the NVSwitch fabric for +// the given partition. +func (m *Manager) ActivatePartition(partitionID int) error { + if err := m.checkOpenPartition(partitionID); err != nil { + return err + } + if err := m.client.ActivateFabricPartition(partitionID); err != nil { + return fmt.Errorf("fabricmanager: fmActivateFabricPartition(%d): %w", partitionID, err) + } + m.markActivated(partitionID, true) + return nil +} + +// DeactivatePartition releases an activated partition. It should be called +// when the corresponding DRA claim is released +func (m *Manager) DeactivatePartition(partitionID int) error { + if err := m.checkOpenPartition(partitionID); err != nil { + return err + } + if err := m.client.DeactivateFabricPartition(partitionID); err != nil { + return fmt.Errorf("fabricmanager: fmDeactivateFabricPartition(%d): %w", partitionID, err) + } + m.markActivated(partitionID, false) + return nil +} + +// ActivatedPartitions returns the set of partition IDs the Manager has +// observed activated (either reported active by FM at Open time or activated +// by this Manager since). Sorted ascending. +func (m *Manager) ActivatedPartitions() []int { + m.mu.RLock() + defer m.mu.RUnlock() + ids := make([]int, 0, len(m.activated)) + for id := range m.activated { + ids = append(ids, id) + } + sort.Ints(ids) + return ids +} + +// UnsupportedPartitions returns partitions FM has marked unsupported (e.g. +// because of NVLink failures). On HGX-H100 and later this is always empty. +func (m *Manager) UnsupportedPartitions() ([]UnsupportedPartition, error) { + if err := m.checkOpen(); err != nil { + return nil, err + } + parts, err := m.client.GetUnsupportedFabricPartitions() + if err != nil { + return nil, fmt.Errorf("fabricmanager: fmGetUnsupportedFabricPartitions: %w", err) + } + return parts, nil +} + +func (m *Manager) checkOpen() error { + m.mu.RLock() + defer m.mu.RUnlock() + if !m.opened { + return fmt.Errorf("fabricmanager: manager is closed") + } + return nil +} + +func (m *Manager) checkOpenPartition(partitionID int) error { + if err := m.checkOpen(); err != nil { + return err + } + if _, ok := m.GetPartition(partitionID); !ok { + return fmt.Errorf("fabricmanager: unknown partitionId %d", partitionID) + } + return nil +} + +func (m *Manager) markActivated(partitionID int, active bool) { + m.mu.Lock() + if active { + m.activated[partitionID] = struct{}{} + } else { + delete(m.activated, partitionID) + } + if p, ok := m.partitionsByID[partitionID]; ok { + p.IsActive = active + m.partitionsByID[partitionID] = p + } + m.mu.Unlock() +} + +// normalizePCIBusID canonicalize to upper-case with an 8-digit domain. Inputs without a +// domain segment ("3b:00.0") or otherwise unparseable are returned upper-cased +// and trimmed without further mangling so callers still see a stable key. +func normalizePCIBusID(s string) string { + s = strings.ToUpper(strings.TrimSpace(s)) + parts := strings.SplitN(s, ":", 2) + if len(parts) != 2 { + return s + } + domain, rest := parts[0], parts[1] + switch { + case len(domain) < 8: + domain = strings.Repeat("0", 8-len(domain)) + domain + case len(domain) > 8: + domain = domain[len(domain)-8:] + } + return domain + ":" + rest +} diff --git a/pkg/fabricmanager/manager_test.go b/pkg/fabricmanager/manager_test.go new file mode 100644 index 000000000..27982027f --- /dev/null +++ b/pkg/fabricmanager/manager_test.go @@ -0,0 +1,744 @@ +/* + * Copyright (c) 2026 NVIDIA CORPORATION. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package fabricmanager + +import ( + "errors" + "reflect" + "testing" + + "github.com/NVIDIA/go-nvml/pkg/nvml" +) + +// fakeDevice is a minimal stand-in for nvml.Device that only implements the +// methods Manager.pciIdToGpuModuleIdMap calls. Other methods of the embedded +// nvml.Device interface remain nil and will panic if invoked, which is the +// desired behavior for unexpected production calls in a test. +type fakeDevice struct { + nvml.Device + moduleID int + pciBusID string + getModRet nvml.Return + getPciRet nvml.Return +} + +func (f *fakeDevice) GetModuleId() (int, nvml.Return) { + ret := f.getModRet + if ret == 0 { + ret = nvml.SUCCESS + } + return f.moduleID, ret +} + +func (f *fakeDevice) GetPciInfo() (nvml.PciInfo, nvml.Return) { + var info nvml.PciInfo + copy(info.BusId[:], f.pciBusID) + ret := f.getPciRet + if ret == 0 { + ret = nvml.SUCCESS + } + return info, ret +} + +type fakeLib struct { + devices []*fakeDevice + getCountRet nvml.Return +} + +func (l *fakeLib) DeviceGetCount() (int, nvml.Return) { + ret := l.getCountRet + if ret == 0 { + ret = nvml.SUCCESS + } + return len(l.devices), ret +} + +func (l *fakeLib) DeviceGetHandleByIndex(idx int) (nvml.Device, nvml.Return) { + if idx < 0 || idx >= len(l.devices) { + return nil, nvml.ERROR_INVALID_ARGUMENT + } + return l.devices[idx], nvml.SUCCESS +} + +func newFakeLib(gpus ...fakeDevice) *fakeLib { + devs := make([]*fakeDevice, len(gpus)) + for i := range gpus { + g := gpus[i] + devs[i] = &g + } + return &fakeLib{devices: devs} +} + +// fakeClient is an in-memory FM client used to drive the Manager. It +// records lifecycle calls so we can assert correct ordering, and lets +// individual methods be made to fail. +type fakeClient struct { + partitions []Partition + unsupported []UnsupportedPartition + + initErr error + connectErr error + listErr error + listUnsupErr error + disconnErr error + shutdownErr error + activateErr error + deactivateErr error + + calls []string + + activated []int // partitions Activate was called on (in order) + deactivated []int // partitions Deactivate was called on +} + +func (c *fakeClient) Init() error { + c.calls = append(c.calls, "init") + return c.initErr +} +func (c *fakeClient) Connect(ConnectParams) error { + c.calls = append(c.calls, "connect") + return c.connectErr +} +func (c *fakeClient) Disconnect() error { + c.calls = append(c.calls, "disconnect") + return c.disconnErr +} +func (c *fakeClient) Shutdown() error { + c.calls = append(c.calls, "shutdown") + return c.shutdownErr +} +func (c *fakeClient) GetSupportedFabricPartitions() ([]Partition, error) { + c.calls = append(c.calls, "list") + if c.listErr != nil { + return nil, c.listErr + } + return c.partitions, nil +} +func (c *fakeClient) GetUnsupportedFabricPartitions() ([]UnsupportedPartition, error) { + c.calls = append(c.calls, "list-unsupported") + if c.listUnsupErr != nil { + return nil, c.listUnsupErr + } + return c.unsupported, nil +} +func (c *fakeClient) ActivateFabricPartition(id int) error { + c.calls = append(c.calls, "activate") + if c.activateErr != nil { + return c.activateErr + } + c.activated = append(c.activated, id) + return nil +} +func (c *fakeClient) DeactivateFabricPartition(id int) error { + c.calls = append(c.calls, "deactivate") + if c.deactivateErr != nil { + return c.deactivateErr + } + c.deactivated = append(c.deactivated, id) + return nil +} + +// designDocPartitions returns the example partitions from §"Fabric Manager +// advertised by GPUs" of the design doc. +func designDocPartitions() []Partition { + return []Partition{ + {ID: 1, GPUs: gpus(1, 2, 3, 4, 5, 6, 7, 8)}, + {ID: 2, GPUs: gpus(1, 2, 5, 6)}, + {ID: 3, GPUs: gpus(3, 4, 7, 8)}, + {ID: 4, GPUs: gpus(1, 3)}, + {ID: 8, GPUs: gpus(1)}, + } +} + +func gpus(ids ...int) []PartitionGPU { + out := make([]PartitionGPU, len(ids)) + for i, id := range ids { + out[i] = PartitionGPU{PhysicalID: id} + } + return out +} + +// eightGPUNode returns an NVML mock with 8 GPUs whose moduleIds are 1..8 and +// whose PCI bus IDs follow the canonical 8-digit-domain form NVML reports. +func eightGPUNode() *fakeLib { + return newFakeLib( + fakeDevice{moduleID: 1, pciBusID: "00000000:3B:00.0"}, + fakeDevice{moduleID: 2, pciBusID: "00000000:5C:00.0"}, + fakeDevice{moduleID: 3, pciBusID: "00000000:9D:00.0"}, + fakeDevice{moduleID: 4, pciBusID: "00000000:BE:00.0"}, + fakeDevice{moduleID: 5, pciBusID: "00000000:CF:00.0"}, + fakeDevice{moduleID: 6, pciBusID: "00000000:E0:00.0"}, + fakeDevice{moduleID: 7, pciBusID: "00000000:F1:00.0"}, + fakeDevice{moduleID: 8, pciBusID: "00000000:F2:00.0"}, + ) +} + +func TestPartitionGPUModuleIDs(t *testing.T) { + p := Partition{GPUs: gpus(3, 7, 2)} + if got, want := p.GPUModuleIDs(), []int{3, 7, 2}; !reflect.DeepEqual(got, want) { + t.Errorf("GPUModuleIDs = %v, want %v", got, want) + } +} + +func TestOpenLifecycle(t *testing.T) { + client := &fakeClient{partitions: designDocPartitions()} + + m, err := Open(eightGPUNode(), client, ConnectParams{AddressInfo: "127.0.0.1:6666"}) + if err != nil { + t.Fatalf("Open: %v", err) + } + if m == nil { + t.Fatal("nil manager") + } + + // Open keeps the connection alive so the caller can later activate / + // deactivate partitions. + want := []string{"init", "connect", "list"} + if !reflect.DeepEqual(client.calls, want) { + t.Errorf("after Open, client call order = %v, want %v", client.calls, want) + } + + if err := m.Close(); err != nil { + t.Fatalf("Close: %v", err) + } + want = []string{"init", "connect", "list", "disconnect", "shutdown"} + if !reflect.DeepEqual(client.calls, want) { + t.Errorf("after Close, client call order = %v, want %v", client.calls, want) + } + + // Close is idempotent. + if err := m.Close(); err != nil { + t.Errorf("second Close: %v", err) + } + if !reflect.DeepEqual(client.calls, want) { + t.Errorf("Close should be idempotent; calls = %v", client.calls) + } +} + +func TestDiscoverLookups(t *testing.T) { + client := &fakeClient{partitions: designDocPartitions()} + m, err := Open(eightGPUNode(), client, ConnectParams{}) + if err != nil { + t.Fatalf("Open: %v", err) + } + + for _, pci := range []string{"00000000:3B:00.0", "0000:3b:00.0", "00000000:3b:00.0"} { + id, ok := m.GetModuleIDByPCI(pci) + if !ok || id != 1 { + t.Errorf("GetModuleIDByPCI(%q) = (%d, %v), want (1, true)", pci, id, ok) + } + } + if _, ok := m.GetModuleIDByPCI("00000000:FF:00.0"); ok { + t.Errorf("GetModuleIDByPCI for unknown PCI returned ok=true") + } + + pci, ok := m.GetPCIByModuleID(2) + if !ok || pci != "00000000:5C:00.0" { + t.Errorf("GetPCIByModuleID(2) = (%q, %v), want (00000000:5C:00.0, true)", pci, ok) + } + if _, ok := m.GetPCIByModuleID(99); ok { + t.Errorf("GetPCIByModuleID(99) returned ok=true") + } + + // GPU at module 1 belongs to partitions 1, 2, 4, 8. + parts, ok := m.GetPartitionsByPCI("00000000:3B:00.0") + if !ok { + t.Fatalf("GetPartitionsByPCI ok=false") + } + if want := []int{1, 2, 4, 8}; !reflect.DeepEqual(parts, want) { + t.Errorf("GetPartitionsByPCI = %v, want %v", parts, want) + } + + // GPU module 3 belongs to partitions 1, 3, 4. + parts = m.GetPartitionsByModuleID(3) + if want := []int{1, 3, 4}; !reflect.DeepEqual(parts, want) { + t.Errorf("GetPartitionsByModuleID(3) = %v, want %v", parts, want) + } + + // GPU module 6 belongs only to partitions 1, 2. + parts = m.GetPartitionsByModuleID(6) + if want := []int{1, 2}; !reflect.DeepEqual(parts, want) { + t.Errorf("GetPartitionsByModuleID(6) = %v, want %v", parts, want) + } + + if p, ok := m.GetPartition(2); !ok || !reflect.DeepEqual(p.GPUModuleIDs(), []int{1, 2, 5, 6}) { + t.Errorf("GetPartition(2) = (%+v, %v)", p, ok) + } + if _, ok := m.GetPartition(999); ok { + t.Errorf("GetPartition(999) returned ok=true") + } + + // Partitions() returns all, sorted by id. + all := m.Partitions() + gotIDs := make([]int, len(all)) + for i, p := range all { + gotIDs[i] = p.ID + } + if want := []int{1, 2, 3, 4, 8}; !reflect.DeepEqual(gotIDs, want) { + t.Errorf("Partitions() ids = %v, want %v", gotIDs, want) + } +} + +// TestDiscoverFMPartitionReferencesGPUUnknownToNVML covers FM reporting a +// gpuModuleId that NVML cannot resolve to a PCI bus ID (e.g. a GPU bound to +// vfio-pci before nv-fabricmanager started, for which FM supplies no usable +// PCI). Open must not fail: the partition is recorded and the GPU is simply +// published without FM attributes until it is rebound to the nvidia driver and +// the module mapping is refreshed. +func TestDiscoverFMPartitionReferencesGPUUnknownToNVML(t *testing.T) { + client := &fakeClient{partitions: []Partition{ + {ID: 1, GPUs: gpus(1, 2, 99)}, // 99 not present in NVML + }} + m, err := Open(eightGPUNode(), client, ConnectParams{}) + if err != nil { + t.Fatalf("Open should tolerate an unresolvable gpuModuleId: %v", err) + } + defer m.Close() + + if _, ok := m.GetPCIByModuleID(99); ok { + t.Errorf("gpuModuleId 99 unexpectedly resolvable") + } + // The partition is still recorded despite the unresolvable member. + if _, ok := m.GetPartition(1); !ok { + t.Errorf("partition 1 not recorded") + } +} + +// TestRefreshModuleMappingAfterRebind covers a GPU bound to vfio-pci at Open +// time: NVML cannot enumerate it and FM cannot supply a usable PCI bus ID, so +// it is unresolvable. Once it is rebound from vfio-pci to the nvidia driver it +// becomes visible to NVML, and RefreshModuleMapping records its (PCI, +// gpuModuleId) pair so its FM attributes can be published. +func TestRefreshModuleMappingAfterRebind(t *testing.T) { + // At Open, NVML sees only modules 1 and 2; module 3 is bound to vfio-pci + // and therefore invisible to NVML. FM reports all three across its + // partitions but supplies no PCI bus ID for the passthrough GPU. + libAtOpen := newFakeLib( + fakeDevice{moduleID: 1, pciBusID: "00000000:3B:00.0"}, + fakeDevice{moduleID: 2, pciBusID: "00000000:5C:00.0"}, + ) + client := &fakeClient{partitions: []Partition{ + {ID: 1, GPUs: gpus(1, 2, 3)}, + {ID: 2, GPUs: gpus(3)}, + }} + + m, err := Open(libAtOpen, client, ConnectParams{}) + if err != nil { + t.Fatalf("Open with passthrough GPU: %v", err) + } + defer m.Close() + + // Before the rebind the passthrough GPU is not resolvable. + if _, ok := m.GetModuleIDByPCI("00000000:9D:00.0"); ok { + t.Errorf("module 3 unexpectedly resolvable before rebind") + } + + // The GPU is rebound from vfio-pci to the nvidia driver and becomes + // visible to NVML. Refreshing records its (PCI, moduleId) pair. + libAfterRebind := newFakeLib( + fakeDevice{moduleID: 1, pciBusID: "00000000:3B:00.0"}, + fakeDevice{moduleID: 2, pciBusID: "00000000:5C:00.0"}, + fakeDevice{moduleID: 3, pciBusID: "0000:9d:00.0"}, // lower-case 4-digit form + ) + if err := m.RefreshModuleMapping(libAfterRebind); err != nil { + t.Fatalf("RefreshModuleMapping: %v", err) + } + + // The (formerly) passthrough GPU is now resolvable in both directions, + // normalized to the canonical 8-digit-domain upper-case form. + if id, ok := m.GetModuleIDByPCI("00000000:9D:00.0"); !ok || id != 3 { + t.Errorf("GetModuleIDByPCI(passthrough) after refresh = (%d, %v), want (3, true)", id, ok) + } + if pciID, ok := m.GetPCIByModuleID(3); !ok || pciID != "00000000:9D:00.0" { + t.Errorf("GetPCIByModuleID(3) after refresh = (%q, %v), want (00000000:9D:00.0, true)", pciID, ok) + } + // NVML-visible GPUs still resolve as before. + if id, ok := m.GetModuleIDByPCI("00000000:3B:00.0"); !ok || id != 1 { + t.Errorf("GetModuleIDByPCI(nvml) = (%d, %v), want (1, true)", id, ok) + } + // The partitions for the GPU were recorded from FM at Open already. + if parts := m.GetPartitionsByModuleID(3); !reflect.DeepEqual(parts, []int{1, 2}) { + t.Errorf("GetPartitionsByModuleID(3) = %v, want [1 2]", parts) + } +} + +// TestRefreshModuleMappingRetainsVfioBoundEntries verifies that a refresh +// merges newly visible GPUs without dropping entries for GPUs that are still +// bound to vfio-pci (invisible to NVML). Those entries are still needed to +// deactivate the GPUs' fabric partitions on a later unprepare. +func TestRefreshModuleMappingRetainsVfioBoundEntries(t *testing.T) { + // All three GPUs are visible at Open. + m, err := Open(newFakeLib( + fakeDevice{moduleID: 1, pciBusID: "00000000:3B:00.0"}, + fakeDevice{moduleID: 2, pciBusID: "00000000:5C:00.0"}, + fakeDevice{moduleID: 3, pciBusID: "00000000:9D:00.0"}, + ), &fakeClient{partitions: []Partition{{ID: 1, GPUs: gpus(1, 2, 3)}}}, ConnectParams{}) + if err != nil { + t.Fatalf("Open: %v", err) + } + defer m.Close() + + // Modules 2 and 3 are now bound to vfio-pci; only module 1 stays visible. + if err := m.RefreshModuleMapping(newFakeLib( + fakeDevice{moduleID: 1, pciBusID: "00000000:3B:00.0"}, + )); err != nil { + t.Fatalf("RefreshModuleMapping: %v", err) + } + + for mod, pci := range map[int]string{ + 1: "00000000:3B:00.0", + 2: "00000000:5C:00.0", + 3: "00000000:9D:00.0", + } { + if got, ok := m.GetPCIByModuleID(mod); !ok || got != pci { + t.Errorf("GetPCIByModuleID(%d) = (%q, %v), want (%q, true)", mod, got, ok, pci) + } + } +} + +// TestDiscoverAllGPUsInPassthrough covers a node where every GPU is bound to +// vfio-pci, so NVML enumerates zero devices (a count of 0 is not an NVML +// error). Open must still succeed (FM partitions are recorded); the GPUs are +// simply unresolvable until they are rebound to the nvidia driver and the +// module mapping is refreshed. +func TestDiscoverAllGPUsInPassthrough(t *testing.T) { + lib := newFakeLib() // NVML sees nothing. + client := &fakeClient{partitions: []Partition{ + {ID: 1, GPUs: gpus(1, 2)}, + {ID: 8, GPUs: gpus(1)}, + }} + + m, err := Open(lib, client, ConnectParams{}) + if err != nil { + t.Fatalf("Open with all GPUs in passthrough: %v", err) + } + defer m.Close() + + // No GPU is resolvable yet (none visible to NVML, FM supplies no PCI). + if _, ok := m.GetPCIByModuleID(1); ok { + t.Errorf("module 1 unexpectedly resolvable before rebind") + } + // Partitions are still recorded. + if parts := m.GetPartitionsByModuleID(1); !reflect.DeepEqual(parts, []int{1, 8}) { + t.Errorf("GetPartitionsByModuleID(1) = %v, want [1 8]", parts) + } + + // After all GPUs are rebound to the nvidia driver they become resolvable. + if err := m.RefreshModuleMapping(newFakeLib( + fakeDevice{moduleID: 1, pciBusID: "00000000:3B:00.0"}, + fakeDevice{moduleID: 2, pciBusID: "00000000:5C:00.0"}, + )); err != nil { + t.Fatalf("RefreshModuleMapping: %v", err) + } + for mod, want := range map[int]string{1: "00000000:3B:00.0", 2: "00000000:5C:00.0"} { + if got, ok := m.GetPCIByModuleID(mod); !ok || got != want { + t.Errorf("GetPCIByModuleID(%d) = (%q, %v), want (%q, true)", mod, got, ok, want) + } + } +} + +func TestDiscoverFMDuplicatePartitionID(t *testing.T) { + client := &fakeClient{partitions: []Partition{ + {ID: 1, GPUs: gpus(1)}, + {ID: 1, GPUs: gpus(2)}, + }} + if _, err := Open(eightGPUNode(), client, ConnectParams{}); err == nil { + t.Errorf("expected error for duplicate partitionId, got nil") + } +} + +func TestDiscoverFMEmptyPartition(t *testing.T) { + client := &fakeClient{partitions: []Partition{ + {ID: 1, GPUs: nil}, + }} + if _, err := Open(eightGPUNode(), client, ConnectParams{}); err == nil { + t.Errorf("expected error for empty partition, got nil") + } +} + +func TestDiscoverNVMLDuplicateModuleID(t *testing.T) { + lib := newFakeLib( + fakeDevice{moduleID: 1, pciBusID: "00000000:3B:00.0"}, + fakeDevice{moduleID: 1, pciBusID: "00000000:5C:00.0"}, + ) + client := &fakeClient{partitions: designDocPartitions()} + if _, err := Open(lib, client, ConnectParams{}); err == nil { + t.Errorf("expected error for duplicate moduleId from NVML, got nil") + } +} + +func TestDiscoverNVMLFailure(t *testing.T) { + lib := &fakeLib{getCountRet: nvml.ERROR_UNKNOWN} + client := &fakeClient{partitions: designDocPartitions()} + if _, err := Open(lib, client, ConnectParams{}); err == nil { + t.Errorf("expected error from NVML DeviceGetCount, got nil") + } +} + +func TestDiscoverClientErrors(t *testing.T) { + cases := []struct { + name string + mutate func(*fakeClient) + wantCall string + }{ + { + name: "init fails", + mutate: func(c *fakeClient) { c.initErr = errors.New("boom") }, + wantCall: "init", + }, + { + name: "connect fails", + mutate: func(c *fakeClient) { c.connectErr = errors.New("boom") }, + wantCall: "connect", + }, + { + name: "list fails", + mutate: func(c *fakeClient) { c.listErr = errors.New("boom") }, + wantCall: "list", + }, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + client := &fakeClient{partitions: designDocPartitions()} + tc.mutate(client) + if _, err := Open(eightGPUNode(), client, ConnectParams{}); err == nil { + t.Errorf("expected error, got nil") + } + // We must have at least reached the failing call. + found := false + for _, c := range client.calls { + if c == tc.wantCall { + found = true + break + } + } + if !found { + t.Errorf("expected client to reach %q, calls=%v", tc.wantCall, client.calls) + } + }) + } +} + +func TestDiscoverNilArgs(t *testing.T) { + if _, err := Open(nil, &fakeClient{}, ConnectParams{}); err == nil { + t.Errorf("expected error for nil NVML interface") + } + if _, err := Open(eightGPUNode(), nil, ConnectParams{}); err == nil { + t.Errorf("expected error for nil FM client") + } +} + +func TestGetPartitionsBySizeByModuleID(t *testing.T) { + client := &fakeClient{partitions: designDocPartitions()} + m, err := Open(eightGPUNode(), client, ConnectParams{}) + if err != nil { + t.Fatalf("Open: %v", err) + } + defer m.Close() + + // Module 1 is in: partition 1 (size 8), 2 (size 4), 4 (size 2), 8 (size 1). + got, err := m.GetPartitionsBySizeByModuleID(1) + if err != nil { + t.Fatalf("GetPartitionsBySizeByModuleID(1): %v", err) + } + want := map[int]int{8: 1, 4: 2, 2: 4, 1: 8} + if !reflect.DeepEqual(got, want) { + t.Errorf("size->partitionId for module 1 = %v, want %v", got, want) + } + + // Same via PCI lookup. + gotByPCI, ok, err := m.GetPartitionsBySizeByPCI("00000000:3B:00.0") + if err != nil || !ok { + t.Fatalf("GetPartitionsBySizeByPCI(known): ok=%v err=%v", ok, err) + } + if !reflect.DeepEqual(gotByPCI, want) { + t.Errorf("size->partitionId via PCI = %v, want %v", gotByPCI, want) + } + + // Unknown PCI returns ok=false, no error. + got2, ok, err := m.GetPartitionsBySizeByPCI("00000000:FF:00.0") + if got2 != nil || ok || err != nil { + t.Errorf("unknown PCI lookup: got=%v ok=%v err=%v", got2, ok, err) + } +} + +func TestGetPartitionsBySizeAmbiguous(t *testing.T) { + // Two partitions of the same size both containing module 1. + parts := []Partition{ + {ID: 10, GPUs: gpus(1, 2)}, + {ID: 11, GPUs: gpus(1, 3)}, + } + client := &fakeClient{partitions: parts} + m, err := Open(eightGPUNode(), client, ConnectParams{}) + if err != nil { + t.Fatalf("Open: %v", err) + } + defer m.Close() + + if _, err := m.GetPartitionsBySizeByModuleID(1); err == nil { + t.Errorf("expected error for ambiguous size mapping") + } +} + +func TestActivateDeactivate(t *testing.T) { + client := &fakeClient{partitions: designDocPartitions()} + m, err := Open(eightGPUNode(), client, ConnectParams{}) + if err != nil { + t.Fatalf("Open: %v", err) + } + defer m.Close() + + if err := m.ActivatePartition(2); err != nil { + t.Fatalf("ActivatePartition(2): %v", err) + } + if err := m.ActivatePartition(8); err != nil { + t.Fatalf("ActivatePartition(8): %v", err) + } + + if got := m.ActivatedPartitions(); !reflect.DeepEqual(got, []int{2, 8}) { + t.Errorf("ActivatedPartitions = %v, want [2 8]", got) + } + if !reflect.DeepEqual(client.activated, []int{2, 8}) { + t.Errorf("client.activated = %v, want [2 8]", client.activated) + } + if p, _ := m.GetPartition(2); !p.IsActive { + t.Errorf("expected partition 2 IsActive=true, got partition=%+v", p) + } + + if err := m.ActivatePartition(999); err == nil { + t.Errorf("expected error activating unknown partition") + } + + if err := m.DeactivatePartition(2); err != nil { + t.Fatalf("DeactivatePartition(2): %v", err) + } + if got := m.ActivatedPartitions(); !reflect.DeepEqual(got, []int{8}) { + t.Errorf("after deactivate, ActivatedPartitions = %v, want [8]", got) + } + if p, _ := m.GetPartition(2); p.IsActive { + t.Errorf("expected partition 2 IsActive=false after deactivate") + } +} + +func TestActivateInheritedFromFM(t *testing.T) { + parts := designDocPartitions() + parts[1].IsActive = true // partition 2 already active per FM + client := &fakeClient{partitions: parts} + + m, err := Open(eightGPUNode(), client, ConnectParams{}) + if err != nil { + t.Fatalf("Open: %v", err) + } + defer m.Close() + + if got := m.ActivatedPartitions(); !reflect.DeepEqual(got, []int{2}) { + t.Errorf("expected activated set seeded from FM = [2], got %v", got) + } +} + +func TestUnsupportedPartitions(t *testing.T) { + client := &fakeClient{ + partitions: designDocPartitions(), + unsupported: []UnsupportedPartition{ + {ID: 99, GPUPhysicalIDs: []int{1, 2}}, + }, + } + m, err := Open(eightGPUNode(), client, ConnectParams{}) + if err != nil { + t.Fatalf("Open: %v", err) + } + defer m.Close() + + unsup, err := m.UnsupportedPartitions() + if err != nil { + t.Fatalf("UnsupportedPartitions: %v", err) + } + if len(unsup) != 1 || unsup[0].ID != 99 { + t.Errorf("UnsupportedPartitions = %+v", unsup) + } +} + +func TestOperationsOnClosedManager(t *testing.T) { + client := &fakeClient{partitions: designDocPartitions()} + m, err := Open(eightGPUNode(), client, ConnectParams{}) + if err != nil { + t.Fatal(err) + } + if err := m.Close(); err != nil { + t.Fatal(err) + } + + if err := m.ActivatePartition(2); err == nil { + t.Errorf("expected error activating on closed manager") + } + if err := m.DeactivatePartition(2); err == nil { + t.Errorf("expected error deactivating on closed manager") + } + if _, err := m.UnsupportedPartitions(); err == nil { + t.Errorf("expected error fetching unsupported on closed manager") + } + if err := m.RefreshModuleMapping(eightGPUNode()); err == nil { + t.Errorf("expected error refreshing module mapping on closed manager") + } +} + +func TestActivatePartitionFMError(t *testing.T) { + client := &fakeClient{ + partitions: designDocPartitions(), + activateErr: errors.New("FM_ST_IN_USE"), + } + m, err := Open(eightGPUNode(), client, ConnectParams{}) + if err != nil { + t.Fatal(err) + } + defer m.Close() + + if err := m.ActivatePartition(2); err == nil { + t.Errorf("expected activation error, got nil") + } + if got := m.ActivatedPartitions(); len(got) != 0 { + t.Errorf("expected no activated partitions on failure, got %v", got) + } +} + +func TestStubClient(t *testing.T) { + c := NewStubClient() + if err := c.Init(); err != nil { + t.Errorf("stub Init: %v", err) + } + if err := c.Connect(ConnectParams{}); err != nil { + t.Errorf("stub Connect: %v", err) + } + if _, err := c.GetSupportedFabricPartitions(); !errors.Is(err, ErrUnimplemented) { + t.Errorf("stub GetSupportedFabricPartitions err = %v, want ErrUnimplemented", err) + } + if _, err := c.GetUnsupportedFabricPartitions(); !errors.Is(err, ErrUnimplemented) { + t.Errorf("stub GetUnsupportedFabricPartitions err = %v, want ErrUnimplemented", err) + } + if err := c.ActivateFabricPartition(1); !errors.Is(err, ErrUnimplemented) { + t.Errorf("stub ActivateFabricPartition err = %v, want ErrUnimplemented", err) + } + if err := c.DeactivateFabricPartition(1); !errors.Is(err, ErrUnimplemented) { + t.Errorf("stub DeactivateFabricPartition err = %v, want ErrUnimplemented", err) + } + if err := c.Disconnect(); err != nil { + t.Errorf("stub Disconnect: %v", err) + } + if err := c.Shutdown(); err != nil { + t.Errorf("stub Shutdown: %v", err) + } +} diff --git a/vendor/github.com/NVIDIA/go-nvfm/LICENSE b/vendor/github.com/NVIDIA/go-nvfm/LICENSE new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/vendor/github.com/NVIDIA/go-nvfm/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/NVIDIA/go-nvfm/pkg/dl/dl.go b/vendor/github.com/NVIDIA/go-nvfm/pkg/dl/dl.go new file mode 100644 index 000000000..80732df95 --- /dev/null +++ b/vendor/github.com/NVIDIA/go-nvfm/pkg/dl/dl.go @@ -0,0 +1,115 @@ +// Copyright (c) NVIDIA CORPORATION. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package dl + +import ( + "errors" + "fmt" + "runtime" + "unsafe" +) + +// #cgo LDFLAGS: -ldl +// #include +// #include +import "C" + +const ( + RTLD_LAZY = C.RTLD_LAZY + RTLD_NOW = C.RTLD_NOW + RTLD_GLOBAL = C.RTLD_GLOBAL + RTLD_LOCAL = C.RTLD_LOCAL + RTLD_NODELETE = C.RTLD_NODELETE + RTLD_NOLOAD = C.RTLD_NOLOAD +) + +type DynamicLibrary struct { + Name string + Flags int + handle unsafe.Pointer +} + +func New(name string, flags int) *DynamicLibrary { + return &DynamicLibrary{ + Name: name, + Flags: flags, + } +} + +func withOSLock(action func() error) error { + runtime.LockOSThread() + defer runtime.UnlockOSThread() + + return action() +} + +func dlError() error { + lastErr := C.dlerror() + if lastErr == nil { + return nil + } + return errors.New(C.GoString(lastErr)) +} + +func (dl *DynamicLibrary) Open() error { + name := C.CString(dl.Name) + defer C.free(unsafe.Pointer(name)) + + if err := withOSLock(func() error { + handle := C.dlopen(name, C.int(dl.Flags)) + if handle == nil { + return dlError() + } + dl.handle = handle + return nil + }); err != nil { + return err + } + return nil +} + +func (dl *DynamicLibrary) Close() error { + if dl.handle == nil { + return nil + } + if err := withOSLock(func() error { + if C.dlclose(dl.handle) != 0 { + return dlError() + } + dl.handle = nil + return nil + }); err != nil { + return err + } + return nil +} + +func (dl *DynamicLibrary) Lookup(symbol string) error { + sym := C.CString(symbol) + defer C.free(unsafe.Pointer(sym)) + + var pointer unsafe.Pointer + if err := withOSLock(func() error { + _ = dlError() + pointer = C.dlsym(dl.handle, sym) + if pointer == nil { + return fmt.Errorf("symbol %q not found: %w", symbol, dlError()) + } + return nil + }); err != nil { + return err + } + return nil +} diff --git a/vendor/github.com/NVIDIA/go-nvfm/pkg/dl/dl_linux.go b/vendor/github.com/NVIDIA/go-nvfm/pkg/dl/dl_linux.go new file mode 100644 index 000000000..178a53715 --- /dev/null +++ b/vendor/github.com/NVIDIA/go-nvfm/pkg/dl/dl_linux.go @@ -0,0 +1,24 @@ +// Copyright (c) NVIDIA CORPORATION. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package dl + +// #cgo LDFLAGS: -ldl +// #include +// #include +import "C" + +const ( + RTLD_DEEPBIND = C.RTLD_DEEPBIND +) diff --git a/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/api.go b/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/api.go new file mode 100644 index 000000000..1ea221dde --- /dev/null +++ b/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/api.go @@ -0,0 +1,47 @@ +// Copyright (c) NVIDIA CORPORATION. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package nvfm + +// ExtendedInterface defines extensions to the core Fabric Manager API. +type ExtendedInterface interface { + LookupSymbol(string) error +} + +type libraryOptions struct { + path string + flags int +} + +// LibraryOption configures the underlying Fabric Manager library. +type LibraryOption func(*libraryOptions) + +// WithLibraryPath sets the shared library name or path used for libnvfm. +func WithLibraryPath(path string) LibraryOption { + return func(o *libraryOptions) { + o.path = path + } +} + +// SetLibraryOptions applies options to the package-level Fabric Manager library. +// If the library is already initialized, an error is returned. +func SetLibraryOptions(opts ...LibraryOption) error { + libnvfm.Lock() + defer libnvfm.Unlock() + if libnvfm.refcount != 0 { + return errLibraryAlreadyLoaded + } + libnvfm.init(opts...) + return nil +} diff --git a/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/bindings.go b/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/bindings.go new file mode 100644 index 000000000..efca4bec9 --- /dev/null +++ b/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/bindings.go @@ -0,0 +1,29 @@ +// Copyright (c) NVIDIA CORPORATION. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package nvfm + +var ( + fmLibInitFunc = fmLibInit + fmLibShutdownFunc = fmLibShutdown + fmConnectFunc = fmConnect + fmDisconnectFunc = fmDisconnect + fmGetSupportedFabricPartitionsFunc = fmGetSupportedFabricPartitions + fmActivateFabricPartitionFunc = fmActivateFabricPartition + fmActivateFabricPartitionWithVFsFunc = fmActivateFabricPartitionWithVFs + fmDeactivateFabricPartitionFunc = fmDeactivateFabricPartition + fmSetActivatedFabricPartitionsFunc = fmSetActivatedFabricPartitions + fmGetNvlinkFailedDevicesFunc = fmGetNvlinkFailedDevices + fmGetUnsupportedFabricPartitionsFunc = fmGetUnsupportedFabricPartitions +) diff --git a/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/cgo_helpers.h b/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/cgo_helpers.h new file mode 100644 index 000000000..027779245 --- /dev/null +++ b/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/cgo_helpers.h @@ -0,0 +1,23 @@ +// Copyright (c) NVIDIA CORPORATION. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// WARNING: THIS FILE WAS AUTOMATICALLY GENERATED. +// Code generated by https://git.io/c-for-go. DO NOT EDIT. + +#include "nv_fm_agent.h" +#include +#pragma once + +#define __CGOGEN 1 + diff --git a/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/cgo_helpers_static.go b/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/cgo_helpers_static.go new file mode 100644 index 000000000..97f0d4e6d --- /dev/null +++ b/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/cgo_helpers_static.go @@ -0,0 +1,52 @@ +// Copyright (c) NVIDIA CORPORATION. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package nvfm + +import "C" + +var cgoAllocsUnknown = new(struct{}) + +func clen(n []int8) int { + for i := 0; i < len(n); i++ { + if n[i] == 0 { + return i + } + } + return len(n) +} + +func int8ArrayString(n []int8) string { + b := make([]byte, clen(n)) + for i := range b { + b[i] = byte(n[i]) + } + return string(b) +} + +func setInt8ArrayString(dst []int8, src string) { + for i := range dst { + dst[i] = 0 + } + if len(dst) == 0 { + return + } + limit := len(dst) - 1 + if len(src) < limit { + limit = len(src) + } + for i := 0; i < limit; i++ { + dst[i] = int8(src[i]) + } +} diff --git a/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/connect.go b/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/connect.go new file mode 100644 index 000000000..322a606fb --- /dev/null +++ b/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/connect.go @@ -0,0 +1,93 @@ +// Copyright (c) NVIDIA CORPORATION. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package nvfm + +const ( + defaultAddress = "127.0.0.1" + defaultTimeoutMs = 1000 +) + +type connectOptions struct { + address string + timeout uint32 + addrType uint32 + unix bool +} + +type ConnectOption func(*connectOptions) + +func WithAddress(address string) ConnectOption { + return func(o *connectOptions) { + o.address = address + o.addrType = ADDR_TYPE_INET + o.unix = false + } +} + +func WithUnixSocket(path string) ConnectOption { + return func(o *connectOptions) { + o.address = path + o.addrType = ADDR_TYPE_UNIX + o.unix = true + } +} + +func WithTimeoutMs(timeoutMs uint32) ConnectOption { + return func(o *connectOptions) { + o.timeout = timeoutMs + } +} + +// fm.Connect() +func (l *library) Connect(opts ...ConnectOption) (Handle, Return) { + params := newConnectParams(opts...) + return l.ConnectWithParams(params) +} + +// fm.ConnectWithParams() +func (l *library) ConnectWithParams(params ConnectParams) (Handle, Return) { + var handle *nvfmHandle + ret := fmConnectFunc(¶ms, &handle) + if ret != SUCCESS { + return nil, ret + } + if handle == nil { + return nil, GENERIC_ERROR + } + return &fabricManager{handle: handle}, SUCCESS +} + +func newConnectParams(opts ...ConnectOption) ConnectParams { + options := connectOptions{ + address: defaultAddress, + timeout: defaultTimeoutMs, + addrType: ADDR_TYPE_INET, + } + for _, opt := range opts { + opt(&options) + } + + params := ConnectParams{ + Version: ConnectParamsVersion, + TimeoutMs: options.timeout, + AddressIsUnixSocket: 0, + AddressType: options.addrType, + } + if options.unix { + params.AddressIsUnixSocket = 1 + } + setInt8ArrayString(params.AddressInfo[:], options.address) + return params +} diff --git a/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/const.go b/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/const.go new file mode 100644 index 000000000..46b23a2b0 --- /dev/null +++ b/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/const.go @@ -0,0 +1,96 @@ +// Copyright (c) NVIDIA CORPORATION. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// WARNING: THIS FILE WAS AUTOMATICALLY GENERATED. +// Code generated by https://git.io/c-for-go. DO NOT EDIT. + +package nvfm + +/* +#cgo linux LDFLAGS: -Wl,--export-dynamic -Wl,--unresolved-symbols=ignore-in-object-files +#cgo darwin LDFLAGS: -Wl,-undefined,dynamic_lookup +#include "nv_fm_agent.h" +#include +#include "cgo_helpers.h" +*/ +import "C" + +const ( + // MAX_STR_LENGTH as defined in nvfm/nv_fm_types.h + MAX_STR_LENGTH = 256 + // UUID_BUFFER_SIZE as defined in nvfm/nv_fm_types.h + UUID_BUFFER_SIZE = 80 + // DEVICE_PCI_BUS_ID_BUFFER_SIZE as defined in nvfm/nv_fm_types.h + DEVICE_PCI_BUS_ID_BUFFER_SIZE = 32 + // CMD_PORT_NUMBER as defined in nvfm/nv_fm_types.h + CMD_PORT_NUMBER = 6666 + // TRANSACTION_ID_BUFFER_SIZE as defined in nvfm/nv_fm_types.h + TRANSACTION_ID_BUFFER_SIZE = 40 + // MAX_NUM_GPUS as defined in nvfm/nv_fm_types.h + MAX_NUM_GPUS = 16 + // MAX_NUM_NVSWITCHES as defined in nvfm/nv_fm_types.h + MAX_NUM_NVSWITCHES = 12 + // MAX_FABRIC_PARTITIONS as defined in nvfm/nv_fm_types.h + MAX_FABRIC_PARTITIONS = 64 + // MAX_NUM_NVLINK_PORTS as defined in nvfm/nv_fm_types.h + MAX_NUM_NVLINK_PORTS = 64 +) + +// Return as declared in nvfm/nv_fm_types.h +type Return int32 + +// Return enumeration from nvfm/nv_fm_types.h +const ( + SUCCESS Return = iota + BADPARAM Return = -1 + GENERIC_ERROR Return = -2 + NOT_SUPPORTED Return = -3 + UNINITIALIZED Return = -4 + TIMEOUT Return = -5 + VERSION_MISMATCH Return = -6 + IN_USE Return = -7 + NOT_CONFIGURED Return = -8 + CONNECTION_NOT_VALID Return = -9 + NVLINK_ERROR Return = -10 + RESOURCE_BAD Return = -11 + RESOURCE_IN_USE Return = -12 + RESOURCE_NOT_IN_USE Return = -13 + RESOURCE_EXHAUSTED Return = -14 + RESOURCE_NOT_READY Return = -15 + PARTITION_EXISTS Return = -16 + PARTITION_ID_IN_USE Return = -17 + PARTITION_ID_NOT_IN_USE Return = -18 + PARTITION_NAME_IN_USE Return = -19 + PARTITION_NAME_NOT_IN_USE Return = -20 + PARTITION_ID_NAME_MISMATCH Return = -21 + NOT_READY Return = -22 + RESOURCE_USED_IN_THIS_PARTITION Return = -23 + RESOURCE_USED_IN_ANOTHER_PARTITION Return = -24 + PARTITION_MISWIRED_TRUNKS Return = -25 + PARTITION_INSUFFICIENT_TRUNKS Return = -26 + PARTITION_MISSING_SWITCHES Return = -27 + PARTITION_NETWORK_CONFIG_ERROR Return = -28 + PARTITION_ROUTE_PROGRAMMING_ERROR Return = -29 +) + +const ( + // ADDR_TYPE_UNKNOWN as declared in nvfm/nv_fm_types.h + ADDR_TYPE_UNKNOWN = iota + // ADDR_TYPE_INET as declared in nvfm/nv_fm_types.h + ADDR_TYPE_INET = 1 + // ADDR_TYPE_UNIX as declared in nvfm/nv_fm_types.h + ADDR_TYPE_UNIX = 2 + // ADDR_TYPE_VSOCK as declared in nvfm/nv_fm_types.h + ADDR_TYPE_VSOCK = 3 +) diff --git a/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/const_static.go b/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/const_static.go new file mode 100644 index 000000000..b8265f71f --- /dev/null +++ b/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/const_static.go @@ -0,0 +1,31 @@ +// Copyright (c) NVIDIA CORPORATION. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package nvfm + +import "reflect" + +func STRUCT_VERSION(data interface{}, version uint32) uint32 { + return uint32(reflect.Indirect(reflect.ValueOf(data)).Type().Size()) | (version << 24) +} + +var ( + ConnectV1ParamsVersion = STRUCT_VERSION(ConnectParams_v1{}, 1) + ConnectV2ParamsVersion = STRUCT_VERSION(ConnectParams_v2{}, 2) + ConnectParamsVersion = STRUCT_VERSION(ConnectParams{}, 2) + FabricPartitionListVersion = STRUCT_VERSION(FabricPartitionList_v2{}, 1) + ActivatedFabricPartitionListVersion = STRUCT_VERSION(ActivatedFabricPartitionList_v1{}, 1) + NvlinkFailedDevicesVersion = STRUCT_VERSION(NvlinkFailedDevices_v1{}, 1) + UnsupportedFabricPartitionListVersion = STRUCT_VERSION(UnsupportedFabricPartitionList_v1{}, 1) +) diff --git a/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/doc.go b/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/doc.go new file mode 100644 index 000000000..e0c3a89df --- /dev/null +++ b/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/doc.go @@ -0,0 +1,21 @@ +// Copyright (c) NVIDIA CORPORATION. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// WARNING: THIS FILE WAS AUTOMATICALLY GENERATED. +// Code generated by https://git.io/c-for-go. DO NOT EDIT. + +/* +Package NVFM bindings +*/ +package nvfm diff --git a/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/handle.go b/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/handle.go new file mode 100644 index 000000000..0433723b2 --- /dev/null +++ b/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/handle.go @@ -0,0 +1,85 @@ +// Copyright (c) NVIDIA CORPORATION. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package nvfm + +type fabricManager struct { + handle *nvfmHandle +} + +// fm.Disconnect() +func (fm *fabricManager) Disconnect() Return { + return fmDisconnectFunc(fm.handle) +} + +// fm.GetSupportedFabricPartitions() +func (fm *fabricManager) GetSupportedFabricPartitions() (FabricPartitionList, Return) { + var partitions FabricPartitionList + partitions.Version = FabricPartitionListVersion + ret := fmGetSupportedFabricPartitionsFunc(fm.handle, &partitions) + return partitions, ret +} + +// fm.GetUnsupportedFabricPartitions() +func (fm *fabricManager) GetUnsupportedFabricPartitions() (UnsupportedFabricPartitionList, Return) { + var partitions UnsupportedFabricPartitionList + partitions.Version = UnsupportedFabricPartitionListVersion + ret := fmGetUnsupportedFabricPartitionsFunc(fm.handle, &partitions) + return partitions, ret +} + +// fm.ActivateFabricPartition() +func (fm *fabricManager) ActivateFabricPartition(id FabricPartitionId) Return { + return fmActivateFabricPartitionFunc(fm.handle, id) +} + +// fm.ActivateFabricPartitionWithVFs() +func (fm *fabricManager) ActivateFabricPartitionWithVFs(id FabricPartitionId, vfs []PciDevice) Return { + if len(vfs) > MAX_NUM_GPUS { + return BADPARAM + } + if len(vfs) == 0 { + return fmActivateFabricPartitionWithVFsFunc(fm.handle, id, nil, 0) + } + return fmActivateFabricPartitionWithVFsFunc(fm.handle, id, &vfs[0], uint32(len(vfs))) +} + +// fm.DeactivateFabricPartition() +func (fm *fabricManager) DeactivateFabricPartition(id FabricPartitionId) Return { + return fmDeactivateFabricPartitionFunc(fm.handle, id) +} + +// fm.SetActivatedFabricPartitions() +func (fm *fabricManager) SetActivatedFabricPartitions(ids []FabricPartitionId) Return { + if len(ids) > MAX_FABRIC_PARTITIONS { + return BADPARAM + } + + list := ActivatedFabricPartitionList{ + Version: ActivatedFabricPartitionListVersion, + NumPartitions: uint32(len(ids)), + } + for i, id := range ids { + list.PartitionIds[i] = uint32(id) + } + return fmSetActivatedFabricPartitionsFunc(fm.handle, &list) +} + +// fm.GetNvlinkFailedDevices() +func (fm *fabricManager) GetNvlinkFailedDevices() (NvlinkFailedDevices, Return) { + var devices NvlinkFailedDevices + devices.Version = NvlinkFailedDevicesVersion + ret := fmGetNvlinkFailedDevicesFunc(fm.handle, &devices) + return devices, ret +} diff --git a/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/init.go b/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/init.go new file mode 100644 index 000000000..328a49d2d --- /dev/null +++ b/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/init.go @@ -0,0 +1,65 @@ +// Copyright (c) NVIDIA CORPORATION. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package nvfm + +// fm.LibInit() +func (l *library) Init() Return { + l.Lock() + defer l.Unlock() + + if l.refcount > 0 { + l.refcount++ + return SUCCESS + } + + if err := l.dl.Open(); err != nil { + return GENERIC_ERROR + } + + ret := fmLibInitFunc() + if ret != SUCCESS { + _ = l.dl.Close() + return ret + } + + l.refcount = 1 + return SUCCESS +} + +// fm.LibShutdown() +func (l *library) Shutdown() Return { + l.Lock() + defer l.Unlock() + + if l.refcount == 0 { + return UNINITIALIZED + } + if l.refcount > 1 { + l.refcount-- + return SUCCESS + } + + ret := fmLibShutdownFunc() + if ret != SUCCESS { + return ret + } + + if err := l.dl.Close(); err != nil { + return GENERIC_ERROR + } + + l.refcount = 0 + return SUCCESS +} diff --git a/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/lib.go b/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/lib.go new file mode 100644 index 000000000..439b9436a --- /dev/null +++ b/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/lib.go @@ -0,0 +1,87 @@ +// Copyright (c) NVIDIA CORPORATION. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package nvfm + +import ( + "errors" + "fmt" + "sync" + + "github.com/NVIDIA/go-nvfm/pkg/dl" +) + +const ( + defaultNvfmLibraryName = "libnvfm.so" + defaultNvfmLibraryLoadFlags = dl.RTLD_LAZY | dl.RTLD_GLOBAL +) + +var errLibraryNotLoaded = errors.New("library not loaded") +var errLibraryAlreadyLoaded = errors.New("library already loaded") + +type dynamicLibrary interface { + Lookup(string) error + Open() error + Close() error +} + +type library struct { + sync.Mutex + path string + refcount refcount + dl dynamicLibrary +} + +var _ Interface = (*library)(nil) + +var libnvfm = newLibrary() + +func New(opts ...LibraryOption) Interface { + return newLibrary(opts...) +} + +func newLibrary(opts ...LibraryOption) *library { + l := &library{} + l.init(opts...) + return l +} + +func (l *library) init(opts ...LibraryOption) { + o := libraryOptions{} + for _, opt := range opts { + opt(&o) + } + + if o.path == "" { + o.path = defaultNvfmLibraryName + } + if o.flags == 0 { + o.flags = defaultNvfmLibraryLoadFlags + } + + l.path = o.path + l.dl = dl.New(o.path, o.flags) +} + +func (l *library) Extensions() ExtendedInterface { + return l +} + +// LookupSymbol checks whether a symbol exists in the loaded Fabric Manager library. +func (l *library) LookupSymbol(name string) error { + if l == nil || l.refcount == 0 { + return fmt.Errorf("error looking up %s: %w", name, errLibraryNotLoaded) + } + return l.dl.Lookup(name) +} diff --git a/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/nv_fm_agent.h b/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/nv_fm_agent.h new file mode 100644 index 000000000..67c82b48f --- /dev/null +++ b/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/nv_fm_agent.h @@ -0,0 +1,241 @@ + +/* + * Copyright 1993-2022 NVIDIA Corporation. All rights reserved. + * + * NVIDIA CORPORATION and its licensors retain all intellectual property + * and proprietary rights in and to this software, related documentation + * and any modifications thereto. Any use, reproduction, disclosure or + * distribution of this software and related documentation without an express + * license agreement from NVIDIA CORPORATION is strictly prohibited. + * + */ +#ifndef NV_FM_AGENT_H +#define NV_FM_AGENT_H +#ifdef __cplusplus +extern "C" { +#endif +#include "nv_fm_types.h" + +#define FM_LIB_API __attribute__ ((visibility ("default"))) + +/***************************************************************************************************/ +/** @defgroup FMAPI_Admin Administrative + * + * This chapter describes the administration interfaces for Fabric Manager API interface library. + * It is the user's responsibility to call \ref fmLibInit() before calling any other methods, + * and \ref fmLibShutdown() once Fabric Manager is no longer being used. The APIs in Administrative + * module can be broken down into following categories: + * @{ + */ +/***************************************************************************************************/ +/** + * This method is used to initialize the Fabric Manager API interface library. This must be + * called before fmConnect() + * + * * @return + * - \ref FM_ST_SUCCESS if FM API interface library has been properly initialized + * - \ref FM_ST_IN_USE FM API interface library is already in initialized state + * - \ref FM_ST_GENERIC_ERROR A generic, unspecified error occurred + */ +fmReturn_t FM_LIB_API fmLibInit(void); +/** + * This method is used to shut down the Fabric Manager API interface library. Any remote connections + * established through fmConnect() will be shut down as well. + * + * @return + * - \ref FM_ST_SUCCESS if FM API interface library has been properly shut down + * - \ref FM_ST_UNINITIALIZED FM API interface library was not in initialized state + */ +fmReturn_t FM_LIB_API fmLibShutdown(void); +/** + * This method is used to connect to a running instance of Fabric Manager. Fabric Manager instance is + * started as part of system service or manually by the SysAdmin. This connection will be used by the + * APIs to exchange information to the running Fabric Manager instance. + * + * @param connectParams IN : Valid IP address for the remote host engine to connect to. + * If addressInfo is specified as x.x.x.x it will attempt to connect to the default + * port specified by FM_CMD_PORT_NUMBER + * If addressInfo is specified as x.x.x.x:yyyy it will attempt to connect to the + * port specified by yyyy + * To connect to an FM instance that was started with unix domain socket, + * fill the socket path in addressInfo member and set addressType to NV_FM_API_ADDR_TYPE_UNIX. + * To connect to an FM instance on a vsock connection fill addressInfo with `:`. + * Supported address types are listed in nvFmApiAddrTypes enumeration. + * + * For additional connection parameters. See \ref fmConnectParams_t for details. + * @param pFmHandle OUT : Fabric Manager API interface abstracted handle for subsequent API calls. + * + * @return + * - \ref FM_ST_SUCCESS successfully connected to the FM instance + * - \ref FM_ST_CONNECTION_NOT_VALID if the FM instance could not be reached + * - \ref FM_ST_UNINITIALIZED if FM interface library has not been initialized with \ref fmLibInit. + * - \ref FM_ST_BADPARAM if pFmHandle is NULL or provided IP Address/format is invalid + * - \ref FM_ST_VERSION_MISMATCH if the expected and provided versions of connectParams do not match + */ + fmReturn_t FM_LIB_API fmConnect(fmConnectParams_t *connectParams, fmHandle_t *pFmHandle); +/** + * This method is used to disconnect from a Fabric Manager instance. + * + * @param pFmHandle IN: Handle that came form \ref fmConnect + * + * @return + * - \ref FM_ST_SUCCESS if we successfully disconnected from the FM instance + * - \ref FM_ST_UNINITIALIZED if FM interface library has not been initialized with \ref fmLibInit + * - \ref FM_ST_BADPARAM if pFmHandle is not a valid handle + * - \ref FM_ST_GENERIC_ERROR if an unspecified internal error occurred + */ +fmReturn_t FM_LIB_API fmDisconnect(fmHandle_t pFmHandle); +/** @} */ // Closing for FMAPI_Admin +/******************************************************************************************************/ +/** @defgroup FMAPI_FabricPartition Fabric Partition Related APIs + * + * This chapter describes the APIs for Fabric Partition management for Shared NVSwitch and vGPU Models + * @{ + */ +/*******************************************************************************************************/ +/** + * This method is used to query all the supported fabric partitions in an NVSwitch based system. + * These fabric partitions allow users to assign specified GPUs to a guestOS as part of multitenancy + * with necessary NVLink isolation. + * + * @param pFmHandle IN: Handle that came form \ref fmConnect + * + * @param pFmFabricPartition OUT: List of currently supported fabric partition information. + * + * @return + * - \ref FM_ST_SUCCESS successfully queried the list of supported partitions + * - \ref FM_ST_UNINITIALIZED if FM interface library has not been initialized with \ref fmLibInit + * - \ref FM_ST_BADPARAM Invalid input parameters + * - \ref FM_ST_GENERIC_ERROR if an unspecified internal error occurred + * - \ref FM_ST_NOT_SUPPORTED requested feature is not supported or enabled + * - \ref FM_ST_NOT_CONFIGURED Fabric Manager instance is initializing and no data + * - \ref FM_ST_VERSION_MISMATCH if the expected and provided versions of pFmFabricPartition do not match + */ +fmReturn_t FM_LIB_API fmGetSupportedFabricPartitions(fmHandle_t pFmHandle, fmFabricPartitionList_t *pFmFabricPartition); +/** + * This method is used to activate an available fabric partition in an NVSwitch based system. + * + * @param pFmHandle IN: Handle that came form \ref fmConnect + * + * @param partitionId IN: The partition id to be activated + * + * @return + * - \ref FM_ST_SUCCESS Specified partition is activated successfully + * - \ref FM_ST_UNINITIALIZED if FM interface library has not been initialized with \ref fmLibInit + * - \ref FM_ST_BADPARAM if pFmHandle is not a valid handle or unsupported partition id + * - \ref FM_ST_GENERIC_ERROR if an unspecified internal error occurred + * - \ref FM_ST_NOT_SUPPORTED requested feature is not supported or enabled + * - \ref FM_ST_NOT_CONFIGURED Fabric Manager instance is initializing and no data + * - \ref FM_ST_IN_USE specified partition is already active + * - \ref FM_ST_NVLINK_ERROR NVLink error/training failure occurred when activating the partition + */ +fmReturn_t FM_LIB_API fmActivateFabricPartition(fmHandle_t pFmHandle, fmFabricPartitionId_t partitionId); +/** + * This method is used to activate an available fabric partition with VFs in an NVSwitch based system. + * + * @param pFmHandle IN: Handle that came form \ref fmConnect + * + * @param partitionId IN: The partition id to be activated + * + * @param vfList IN: List of VFs associated with physical GPUs in the partition. + * Please note that the order of VFs should be associated with actual physical GPUs in the partition. + * + * @param numVfs IN: Number of VFs + * + * @return + * - \ref FM_ST_SUCCESS Specified partition is activated successfully + * - \ref FM_ST_UNINITIALIZED if FM interface library has not been initialized with \ref fmLibInit + * - \ref FM_ST_BADPARAM if pFmHandle is not a valid handle or unsupported partition id + * - \ref FM_ST_GENERIC_ERROR if an unspecified internal error occurred + * - \ref FM_ST_NOT_SUPPORTED requested feature is not supported or enabled + * - \ref FM_ST_NOT_CONFIGURED Fabric Manager instance is initializing and no data + * - \ref FM_ST_IN_USE specified partition is already active + * - \ref FM_ST_NVLINK_ERROR NVLink error/training failure occurred when activating the partition + */ +fmReturn_t FM_LIB_API fmActivateFabricPartitionWithVFs(fmHandle_t pFmHandle, fmFabricPartitionId_t partitionId, fmPciDevice_t *vfList, unsigned int numVfs); +/** + * This method is used to deactivate a previously activated fabric partition in an NVSwitch based system. + * + * @param pFmHandle IN: Handle that came form \ref fmConnect + * + * @param partitionId IN: The partition id to be deactivated + * + * @return + * - \ref FM_ST_SUCCESS Specified partition is deactivated successfully + * - \ref FM_ST_UNINITIALIZED if FM interface library has not been initialized with \ref fmLibInit + * - \ref FM_ST_BADPARAM if pFmHandle is not a valid handle or unsupported partition id + * - \ref FM_ST_GENERIC_ERROR if an unspecified internal error occurred + * - \ref FM_ST_NOT_SUPPORTED requested feature is not supported or enabled + * - \ref FM_ST_NOT_CONFIGURED Fabric Manager instance is initializing and no data + * - \ref FM_ST_UNINITIALIZED specified partition is not activated + * - \ref FM_ST_NVLINK_ERROR NVLink error/training failure occurred when deactivating the partition + */ +fmReturn_t FM_LIB_API fmDeactivateFabricPartition(fmHandle_t pFmHandle, fmFabricPartitionId_t partitionId); +/** + * This method is used to set a list of currently activated fabric partitions to Fabric Manager after its restart. + * This call should be made with number of partitions as zero even if there is no active partitions + * when Fabric Manager is restarted. + * + * @param pFmHandle IN: Handle that came form \ref fmConnect + * + * @param pFmActivatedPartitionList IN: List of currently activated fabric partition. + * @return + * - \ref FM_ST_SUCCESS Fabric Manager state is updated with active partition information + * - \ref FM_ST_UNINITIALIZED if FM interface library has not been initialized with \ref fmLibInit + * - \ref FM_ST_BADPARAM A bad parameter was passed. + * - \ref FM_ST_GENERIC_ERROR if an unspecified internal error occurred + * - \ref FM_ST_NOT_SUPPORTED Requested feature is not supported or enabled + * - \ref FM_ST_NOT_CONFIGURED Fabric Manager is initializing and no data available. + * - \ref FM_ST_VERSION_MISMATCH if the expected and provided versions of pFmActivatedPartitionList do not match + */ +fmReturn_t FM_LIB_API fmSetActivatedFabricPartitions(fmHandle_t pFmHandle, fmActivatedFabricPartitionList_t *pFmActivatedPartitionList); +/** + * This method is used to query all GPUs and NVSwitches with failed NVLinks as part of Fabric Manager initialization + * + * This API is not supported when Fabric Manager is running in Shared NVSwitch + * multi-tenancy resiliency restart (--restart) mode + * + * Note: On HGX H100 8-GPU based systems, NVLinks are trained at hardware level without higher level software coordination. + * So, Fabric Manager will always return an empty failed NVLink device list for this call on those systems. + * + * @param pFmHandle IN: Handle that came form \ref fmConnect + * + * @param pFmNvlinkFailedDevices OUT: List of GPU or NVSwitch devices that have failed NVLinks + * + * @return + * - \ref FM_ST_SUCCESS successfully queried the list of devices with failed NVLinks + * - \ref FM_ST_UNINITIALIZED if FM interface library has not been initialized with \ref fmLibInit + * - \ref FM_ST_BADPARAM Invalid input parameters + * - \ref FM_ST_GENERIC_ERROR if an unspecified internal error occurred + * - \ref FM_ST_NOT_SUPPORTED requested feature is not supported or enabled + * - \ref FM_ST_NOT_CONFIGURED Fabric Manager instance is initializing and no data + * - \ref FM_ST_VERSION_MISMATCH if the expected and provided versions of pFmFabricPartition do not match + */ +fmReturn_t FM_LIB_API fmGetNvlinkFailedDevices(fmHandle_t pFmHandle, fmNvlinkFailedDevices_t *pFmNvlinkFailedDevices); +/***************************************************************************************************/ +/** + * This method is used to query all the unsupported fabric partitions when Fabric Manager is + * running in Shared NVSwitch multi-tenancy mode. + * + * @param pFmHandle IN: Handle that came form \ref fmConnect + * + * @param pFmUnupportedFabricPartition OUT: List of unsupported fabric partitions on the system. + * + * @return + * - \ref FM_ST_SUCCESS successfully queried the list of unsupported partitions + * - \ref FM_ST_UNINITIALIZED if FM interface library has not been initialized with \ref fmLibInit + * - \ref FM_ST_BADPARAM Invalid input parameters + * - \ref FM_ST_GENERIC_ERROR if an unspecified internal error occurred + * - \ref FM_ST_NOT_SUPPORTED requested feature is not supported or enabled + * - \ref FM_ST_NOT_CONFIGURED Fabric Manager instance is initializing and no data + * - \ref FM_ST_VERSION_MISMATCH if the expected and provided versions of pFmUnupportedFabricPartition do not match + */ +fmReturn_t FM_LIB_API fmGetUnsupportedFabricPartitions(fmHandle_t pFmHandle, + fmUnsupportedFabricPartitionList_t *pFmUnupportedFabricPartition); +/** @} */ // Closing for FMAPI_FabricPartition +#ifdef __cplusplus +} +#endif + +#endif /* NV_FM_AGENT_H */ + diff --git a/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/nv_fm_types.h b/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/nv_fm_types.h new file mode 100644 index 000000000..908eac846 --- /dev/null +++ b/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/nv_fm_types.h @@ -0,0 +1,312 @@ +/* + * Copyright 2018-2020 NVIDIA Corporation. All rights reserved. + * + * NVIDIA CORPORATION and its licensors retain all intellectual property + * and proprietary rights in and to this software, related documentation + * and any modifications thereto. Any use, reproduction, disclosure or + * distribution of this software and related documentation without an express + * license agreement from NVIDIA CORPORATION is strictly prohibited. + * + */ + +#ifndef NV_FM_TYPES_H +#define NV_FM_TYPES_H + +#ifdef __cplusplus +extern "C" { +#endif + +/** @defgroup FMAPI_Common Common Structures + * + * This chapter describes the common structures for Fabric Manager API interface library. + * @{ + */ + +/** + * Return values for Fabric Manager API calls. + */ +typedef enum fmReturn_enum +{ + FM_ST_SUCCESS = 0, //!< The operation was successful + FM_ST_BADPARAM = -1, //!< A supplied argument is invalid + FM_ST_GENERIC_ERROR = -2, //!< A generic, unspecified error + FM_ST_NOT_SUPPORTED = -3, //!< The requested operation/feature not supported + FM_ST_UNINITIALIZED = -4, //!< Object is in undefined state/uninitialized + FM_ST_TIMEOUT = -5, //!< Requested operation timed out or user provided timeout passed + FM_ST_VERSION_MISMATCH = -6, //!< Version mismatch between received and understood API + FM_ST_IN_USE = -7, //!< The requested operation cannot be performed because the resource is in use + FM_ST_NOT_CONFIGURED = -8, //!< Setting not configured + FM_ST_CONNECTION_NOT_VALID = -9, //!< The connection to the FM instance is not valid any longer + FM_ST_NVLINK_ERROR = -10, //!< Requested operation failed due to NVLink error + FM_ST_RESOURCE_BAD = -11, //!< Requested operation referenced a resource that does not exist + FM_ST_RESOURCE_IN_USE = -12, //!< Requested operation failed because one of the referenced resources is already in use + FM_ST_RESOURCE_NOT_IN_USE = -13, //!< Requested operation failed because one of the referenced resources is not in use + FM_ST_RESOURCE_EXHAUSTED = -14, //!< Requested operation failed because not enough of one of the resources could be allocated + FM_ST_RESOURCE_NOT_READY = -15, //!< Requested operation failed because one of the resources is not ready to be used + FM_ST_PARTITION_EXISTS = -16, //!< Partition has already been created, nothing to do + FM_ST_PARTITION_ID_IN_USE = -17, //!< Partition id already used by another partition, could not complete operation + FM_ST_PARTITION_ID_NOT_IN_USE = -18, //!< Partition id could not be found + FM_ST_PARTITION_NAME_IN_USE = -19, //!< Partition name is already used by another partition and name is supposed to be unique + FM_ST_PARTITION_NAME_NOT_IN_USE = -20, //!< Partition name is specified but the referenced partition could not be found + FM_ST_PARTITION_ID_NAME_MISMATCH = -21, //!< Valid partition id and name specified but they refer to different partitions + FM_ST_NOT_READY = -22, //!< Fabric Manager is not ready to serve GFM API requests. + FM_ST_RESOURCE_USED_IN_THIS_PARTITION = -23, //!< Resource is already in use in this partition + FM_ST_RESOURCE_USED_IN_ANOTHER_PARTITION = -24, //!< Resource is already in use in another partition + FM_ST_PARTITION_MISWIRED_TRUNKS = -25, //!< Partition has miswired trunks + FM_ST_PARTITION_INSUFFICIENT_TRUNKS = -26, //!< Partition has insufficient trunks + FM_ST_PARTITION_MISSING_SWITCHES = -27, //!< Partition has missing switches + FM_ST_PARTITION_NETWORK_CONFIG_ERROR = -28, //!< Partition has network configuration error + FM_ST_PARTITION_ROUTE_PROGRAMMING_ERROR = -29, //!< Partition has route programming error +} fmReturn_t; + +typedef void *fmHandle_t; //!< Identifier for Fabric Manager API interface Handle + +/** + * Max length of the FM string field + */ +#define FM_MAX_STR_LENGTH 256 + +/** + * Buffer size guaranteed to be large enough to hold UUID + */ +#define FM_UUID_BUFFER_SIZE 80 + +/** + * Buffer size guaranteed to be large enough for pci bus id + */ +#define FM_DEVICE_PCI_BUS_ID_BUFFER_SIZE 32 + +/** + * Creates a unique version number for each struct + */ +#define MAKE_FM_PARAM_VERSION(typeName,ver) (unsigned int)(sizeof(typeName) | ((ver)<<24)) + +/** + * Default port number used by FM interface library to exchange commands to FM instance + */ +#define FM_CMD_PORT_NUMBER 6666 + +/** + * Buffer size guaranteed to be large enough to hold transaction id + */ +#define FM_TRANSACTION_ID_BUFFER_SIZE 40 + +/** + * Connection options for fmConnect() + */ +typedef struct +{ + unsigned int version; //!< Version number. Use fmConnectParams_version + char addressInfo[FM_MAX_STR_LENGTH]; //!< IP address and port information + unsigned int timeoutMs; /*!< When attempting to connect to the running FM instance, + how long should we wait in milliseconds before giving up */ + unsigned int addressIsUnixSocket; /*!< Whether or not the passed-in address is a Unix domain socket + filename (1) or a TCP/IP address (0) */ +} fmConnectParams_v1; + +/** + * @enum nvFmApiAddrTypes + * @brief an enumeration of supported address types + */ +enum nvFmApiAddrTypes +{ + NV_FM_API_ADDR_TYPE_UNKNOWN = 0, + NV_FM_API_ADDR_TYPE_INET = 1, + NV_FM_API_ADDR_TYPE_UNIX = 2, + NV_FM_API_ADDR_TYPE_VSOCK = 3, +}; + +typedef struct +{ + unsigned int version; //!< Version number. Use fmConnectParams_version + char addressInfo[FM_MAX_STR_LENGTH]; /*!< identifier information interpreted based on addressType's value; + when addressType == NV_FM_API_ADDR_TYPE_INET addressInfo is `:`; + when addressType == NV_FM_API_ADDR_TYPE_UNIX addressInfo is ``; + when addressType == NV_FM_API_ADDR_TYPE_VSOCK addressInfo is `:` */ + unsigned int timeoutMs; /*!< When attempting to connect to the running FM instance, + how long should we wait in milliseconds before giving up */ + unsigned int addressIsUnixSocket; /*!< deprecated; use addressType instead */ + enum nvFmApiAddrTypes addressType; /*!< The type of address in addressInfo */ +} fmConnectParams_v2; + +/** + * Typedef for \ref fmConnectParams_t + */ +typedef fmConnectParams_v2 fmConnectParams_t; + +/** +* Version 1 for \ref fmConnectParams_v1 +*/ +#define fmConnectV1Params_version1 MAKE_FM_PARAM_VERSION(fmConnectParams_v1, 1) + +/** +* Version 2 for \ref fmConnectParams_v2 +*/ +#define fmConnectV2Params_version2 MAKE_FM_PARAM_VERSION(fmConnectParams_v2, 2) + +/** +* Latest version for \ref fmConnectParams_t +*/ +#define fmConnectParams_version fmConnectV2Params_version2 + +/** + * Max number of GPUs supported by FM + */ +#define FM_MAX_NUM_GPUS 16 + +/** + * Max number of NVSwitches supported by FM + */ +#define FM_MAX_NUM_NVSWITCHES 12 + +/** + * Max number of GPU/fabric partitions supported by FM + */ +#define FM_MAX_FABRIC_PARTITIONS 64 + +typedef unsigned int fmFabricPartitionId_t; //!< Identifier to hold a unique id assigned to each partitions + +/** + * Max number of ports per NVLink device supported by FM + */ +#define FM_MAX_NUM_NVLINK_PORTS 64 + +/** + * PCI Device (BDF) Information + */ +typedef struct +{ + unsigned int domain; //!< The PCI domain on which the device's bus resides, 0 to 0xffffffff + unsigned int bus; //!< The bus on which the device resides, 0 to 0xff + unsigned int device; //!< The device's id on the bus, 0 to 31 + unsigned int function; //!< The function number of the device, 0 to 7 (Non-ARI) or 0 to 255 (ARI) +} fmPciDevice_t; + +/** + * Structure to store information about a GPU belonging to fabric partition + */ +typedef struct +{ + unsigned int physicalId; //!< physical id number of the GPU, same value as GPU Module ID + char uuid[FM_UUID_BUFFER_SIZE]; //!< GPU UUID information + char pciBusId[FM_DEVICE_PCI_BUS_ID_BUFFER_SIZE]; //!< GPU PCI BDF information + unsigned int numNvLinksAvailable; /*!< Number of NVLinks available for use on this GPU, this + can be fewer than the max due to hardware availability */ + unsigned int maxNumNvLinks; /*!< Max number of NVLinks available for this GPU under normal + operation (i.e. without any degradation) */ + unsigned int nvlinkLineRateMBps; //!< Per NVLink full speed line rate in Mega bytes per second +} fmFabricPartitionGpuInfo_t; + +/** + * Structure to store information about a fabric partition + */ +typedef struct +{ + fmFabricPartitionId_t partitionId; //!< a unique id assigned to reference this partition + unsigned int isActive; //!< partition active state. 1 means active, 0 mean not active. + unsigned int numGpus; //!< number of GPUs in this partition. + fmFabricPartitionGpuInfo_t gpuInfo[FM_MAX_NUM_GPUS]; //!< detailed meta data of each GPUs assigned to this partition. +} fmFabricPartitionInfo_t; + +/** + * Structure to store information about all the supported fabric partitions + */ +typedef struct +{ + unsigned int version; //!< version number. Use fmFabricPartitionList_version + unsigned int numPartitions; /*!< total number of partitions supported, this can be fewer + than the max due to hardware availability */ + unsigned int maxNumPartitions; /*!< max number of partitions that can be supported on + this platform */ + fmFabricPartitionInfo_t partitionInfo[FM_MAX_FABRIC_PARTITIONS]; //!< detailed meta data of each partitions +} fmFabricPartitionList_v2; + +/// Typedef for \ref fmFabricPartitionList_v2 +typedef fmFabricPartitionList_v2 fmFabricPartitionList_t; +/// Version 1 for \ref fmFabricPartitionList_v2 +#define fmFabricPartitionList_version2 MAKE_FM_PARAM_VERSION(fmFabricPartitionList_v2, 1) +/// Latest version for \ref fmFabricPartitionList_v2 +#define fmFabricPartitionList_version fmFabricPartitionList_version2 + +/** + * Structure to store information about all the activated fabric partitionIds + */ +typedef struct +{ + unsigned int version; //!< version number. Use fmActivatedFabricPartitionList_version + unsigned int numPartitions; //!< number of partitions already activated + fmFabricPartitionId_t partitionIds[FM_MAX_FABRIC_PARTITIONS]; //!< partitions that are already activated +} fmActivatedFabricPartitionList_v1; + +/// Typedef for \ref fmActivatedFabricPartitionList_v1 +typedef fmActivatedFabricPartitionList_v1 fmActivatedFabricPartitionList_t; +/// Version 1 for \ref fmActivatedFabricPartitionList_v1 +#define fmActivatedFabricPartitionList_version1 MAKE_FM_PARAM_VERSION(fmActivatedFabricPartitionList_v1, 1) +/// Latest version for \ref fmActivatedFabricPartitionList_v1 +#define fmActivatedFabricPartitionList_version fmActivatedFabricPartitionList_version1 + +/** + * Structure to store information about a NVSwitch or GPU with failed NVLinks + */ +typedef struct +{ + char uuid[FM_UUID_BUFFER_SIZE]; //!< Device UUID information + char pciBusId[FM_DEVICE_PCI_BUS_ID_BUFFER_SIZE]; //!< Device PCI BDF information + unsigned int numPorts; //!< the number of ports that have failed NVLinks + unsigned int portNum[FM_MAX_NUM_NVLINK_PORTS]; //!< port number that has failed NVLinks +} fmNvlinkFailedDeviceInfo_t; + +/** + * Structure to store a list of NVSwitches and GPUs with failed NVLinks + */ +typedef struct +{ + unsigned int version; //!< version number. Use fmNvlinkFailedDevices_version + unsigned int numGpus; //!< number of GPUs with failed NVLinks + unsigned int numSwitches; //!< number of NVSwitches with failed NVLinks + fmNvlinkFailedDeviceInfo_t gpuInfo[FM_MAX_NUM_GPUS]; //!< list of GPU with failed NVLinks + fmNvlinkFailedDeviceInfo_t switchInfo[FM_MAX_NUM_NVSWITCHES];//!< list of NVSwitch with failed NVLinks +} fmNvlinkFailedDevices_v1; + +/// Typedef for \ref fmNvlinkFailedDevices_v1 +typedef fmNvlinkFailedDevices_v1 fmNvlinkFailedDevices_t; +/// Version 1 for \ref fmNvlinkFailedDevices_v1 +#define fmNvlinkFailedDevices_version1 MAKE_FM_PARAM_VERSION(fmNvlinkFailedDevices_v1, 1) +/// Latest version for \ref fmNvlinkFailedDevices_v1 +#define fmNvlinkFailedDevices_version fmNvlinkFailedDevices_version1 + +/** + * Structure to store information about a unsupported fabric partition + */ +typedef struct +{ + fmFabricPartitionId_t partitionId; //!< a unique id assigned to reference this partition + unsigned int numGpus; //!< number of GPUs in this partition + unsigned int gpuPhysicalIds[FM_MAX_NUM_GPUS]; //!< physicalId of each GPU assigned to this partition. +} fmUnsupportedFabricPartitionInfo_t; + +/** + * Structure to store information about all the unsupported fabric partitions + */ +typedef struct +{ + unsigned int version; //!< version number. Use fmFabricPartitionList_version + unsigned int numPartitions; //!< total number of unsupported partitions + fmUnsupportedFabricPartitionInfo_t partitionInfo[FM_MAX_FABRIC_PARTITIONS]; /*!< detailed information of each + unsupported partition*/ +} fmUnsupportedFabricPartitionList_v1; + +/// Typedef for \ref fmUnsupportedFabricPartitionList_v1 +typedef fmUnsupportedFabricPartitionList_v1 fmUnsupportedFabricPartitionList_t; +/// Version 1 for \ref fmUnsupportedFabricPartitionList_v1 +#define fmUnsupportedFabricPartitionList_version1 MAKE_FM_PARAM_VERSION(fmUnsupportedFabricPartitionList_v1, 1) +/// Latest version for \ref fmUnsupportedFabricPartitionList_v1 +#define fmUnsupportedFabricPartitionList_version fmUnsupportedFabricPartitionList_version1 + +/** @} */ // Closing for FMAPI_Common Common Structures +#ifdef __cplusplus +} +#endif + +#endif /* NV_FM_TYPES_H */ + diff --git a/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/nvfm.go b/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/nvfm.go new file mode 100644 index 000000000..1b5450b9d --- /dev/null +++ b/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/nvfm.go @@ -0,0 +1,146 @@ +// Copyright (c) NVIDIA CORPORATION. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// WARNING: THIS FILE WAS AUTOMATICALLY GENERATED. +// Code generated by https://git.io/c-for-go. DO NOT EDIT. + +package nvfm + +/* +#cgo linux LDFLAGS: -Wl,--export-dynamic -Wl,--unresolved-symbols=ignore-in-object-files +#cgo darwin LDFLAGS: -Wl,-undefined,dynamic_lookup +#include "nv_fm_agent.h" +#include +#include "cgo_helpers.h" +*/ +import "C" +import ( + "runtime" + "unsafe" +) + +// fmLibInit function as declared in nvfm/nv_fm_agent.h +func fmLibInit() Return { + __ret := C.fmLibInit() + __v := (Return)(__ret) + return __v +} + +// fmLibShutdown function as declared in nvfm/nv_fm_agent.h +func fmLibShutdown() Return { + __ret := C.fmLibShutdown() + __v := (Return)(__ret) + return __v +} + +// fmConnect function as declared in nvfm/nv_fm_agent.h +func fmConnect(ConnectParams *ConnectParams, PFmHandle **nvfmHandle) Return { + cConnectParams, cConnectParamsAllocMap := (*C.fmConnectParams_t)(unsafe.Pointer(ConnectParams)), cgoAllocsUnknown + cPFmHandle, cPFmHandleAllocMap := (*C.fmHandle_t)(unsafe.Pointer(PFmHandle)), cgoAllocsUnknown + __ret := C.fmConnect(cConnectParams, cPFmHandle) + runtime.KeepAlive(cPFmHandleAllocMap) + runtime.KeepAlive(cConnectParamsAllocMap) + __v := (Return)(__ret) + return __v +} + +// fmDisconnect function as declared in nvfm/nv_fm_agent.h +func fmDisconnect(PFmHandle *nvfmHandle) Return { + cPFmHandle, cPFmHandleAllocMap := (C.fmHandle_t)(unsafe.Pointer(PFmHandle)), cgoAllocsUnknown + __ret := C.fmDisconnect(cPFmHandle) + runtime.KeepAlive(cPFmHandleAllocMap) + __v := (Return)(__ret) + return __v +} + +// fmGetSupportedFabricPartitions function as declared in nvfm/nv_fm_agent.h +func fmGetSupportedFabricPartitions(PFmHandle *nvfmHandle, PFmFabricPartition *FabricPartitionList) Return { + cPFmHandle, cPFmHandleAllocMap := (C.fmHandle_t)(unsafe.Pointer(PFmHandle)), cgoAllocsUnknown + cPFmFabricPartition, cPFmFabricPartitionAllocMap := (*C.fmFabricPartitionList_t)(unsafe.Pointer(PFmFabricPartition)), cgoAllocsUnknown + __ret := C.fmGetSupportedFabricPartitions(cPFmHandle, cPFmFabricPartition) + runtime.KeepAlive(cPFmFabricPartitionAllocMap) + runtime.KeepAlive(cPFmHandleAllocMap) + __v := (Return)(__ret) + return __v +} + +// fmActivateFabricPartition function as declared in nvfm/nv_fm_agent.h +func fmActivateFabricPartition(PFmHandle *nvfmHandle, PartitionId FabricPartitionId) Return { + cPFmHandle, cPFmHandleAllocMap := (C.fmHandle_t)(unsafe.Pointer(PFmHandle)), cgoAllocsUnknown + cPartitionId, cPartitionIdAllocMap := (C.fmFabricPartitionId_t)(PartitionId), cgoAllocsUnknown + __ret := C.fmActivateFabricPartition(cPFmHandle, cPartitionId) + runtime.KeepAlive(cPartitionIdAllocMap) + runtime.KeepAlive(cPFmHandleAllocMap) + __v := (Return)(__ret) + return __v +} + +// fmActivateFabricPartitionWithVFs function as declared in nvfm/nv_fm_agent.h +func fmActivateFabricPartitionWithVFs(PFmHandle *nvfmHandle, PartitionId FabricPartitionId, VfList *PciDevice, NumVfs uint32) Return { + cPFmHandle, cPFmHandleAllocMap := (C.fmHandle_t)(unsafe.Pointer(PFmHandle)), cgoAllocsUnknown + cPartitionId, cPartitionIdAllocMap := (C.fmFabricPartitionId_t)(PartitionId), cgoAllocsUnknown + cVfList, cVfListAllocMap := (*C.fmPciDevice_t)(unsafe.Pointer(VfList)), cgoAllocsUnknown + cNumVfs, cNumVfsAllocMap := (C.uint)(NumVfs), cgoAllocsUnknown + __ret := C.fmActivateFabricPartitionWithVFs(cPFmHandle, cPartitionId, cVfList, cNumVfs) + runtime.KeepAlive(cNumVfsAllocMap) + runtime.KeepAlive(cVfListAllocMap) + runtime.KeepAlive(cPartitionIdAllocMap) + runtime.KeepAlive(cPFmHandleAllocMap) + __v := (Return)(__ret) + return __v +} + +// fmDeactivateFabricPartition function as declared in nvfm/nv_fm_agent.h +func fmDeactivateFabricPartition(PFmHandle *nvfmHandle, PartitionId FabricPartitionId) Return { + cPFmHandle, cPFmHandleAllocMap := (C.fmHandle_t)(unsafe.Pointer(PFmHandle)), cgoAllocsUnknown + cPartitionId, cPartitionIdAllocMap := (C.fmFabricPartitionId_t)(PartitionId), cgoAllocsUnknown + __ret := C.fmDeactivateFabricPartition(cPFmHandle, cPartitionId) + runtime.KeepAlive(cPartitionIdAllocMap) + runtime.KeepAlive(cPFmHandleAllocMap) + __v := (Return)(__ret) + return __v +} + +// fmSetActivatedFabricPartitions function as declared in nvfm/nv_fm_agent.h +func fmSetActivatedFabricPartitions(PFmHandle *nvfmHandle, PFmActivatedPartitionList *ActivatedFabricPartitionList) Return { + cPFmHandle, cPFmHandleAllocMap := (C.fmHandle_t)(unsafe.Pointer(PFmHandle)), cgoAllocsUnknown + cPFmActivatedPartitionList, cPFmActivatedPartitionListAllocMap := (*C.fmActivatedFabricPartitionList_t)(unsafe.Pointer(PFmActivatedPartitionList)), cgoAllocsUnknown + __ret := C.fmSetActivatedFabricPartitions(cPFmHandle, cPFmActivatedPartitionList) + runtime.KeepAlive(cPFmActivatedPartitionListAllocMap) + runtime.KeepAlive(cPFmHandleAllocMap) + __v := (Return)(__ret) + return __v +} + +// fmGetNvlinkFailedDevices function as declared in nvfm/nv_fm_agent.h +func fmGetNvlinkFailedDevices(PFmHandle *nvfmHandle, PFmNvlinkFailedDevices *NvlinkFailedDevices) Return { + cPFmHandle, cPFmHandleAllocMap := (C.fmHandle_t)(unsafe.Pointer(PFmHandle)), cgoAllocsUnknown + cPFmNvlinkFailedDevices, cPFmNvlinkFailedDevicesAllocMap := (*C.fmNvlinkFailedDevices_t)(unsafe.Pointer(PFmNvlinkFailedDevices)), cgoAllocsUnknown + __ret := C.fmGetNvlinkFailedDevices(cPFmHandle, cPFmNvlinkFailedDevices) + runtime.KeepAlive(cPFmNvlinkFailedDevicesAllocMap) + runtime.KeepAlive(cPFmHandleAllocMap) + __v := (Return)(__ret) + return __v +} + +// fmGetUnsupportedFabricPartitions function as declared in nvfm/nv_fm_agent.h +func fmGetUnsupportedFabricPartitions(PFmHandle *nvfmHandle, PFmUnupportedFabricPartition *UnsupportedFabricPartitionList) Return { + cPFmHandle, cPFmHandleAllocMap := (C.fmHandle_t)(unsafe.Pointer(PFmHandle)), cgoAllocsUnknown + cPFmUnupportedFabricPartition, cPFmUnupportedFabricPartitionAllocMap := (*C.fmUnsupportedFabricPartitionList_t)(unsafe.Pointer(PFmUnupportedFabricPartition)), cgoAllocsUnknown + __ret := C.fmGetUnsupportedFabricPartitions(cPFmHandle, cPFmUnupportedFabricPartition) + runtime.KeepAlive(cPFmUnupportedFabricPartitionAllocMap) + runtime.KeepAlive(cPFmHandleAllocMap) + __v := (Return)(__ret) + return __v +} diff --git a/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/refcount.go b/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/refcount.go new file mode 100644 index 000000000..2634d2cc4 --- /dev/null +++ b/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/refcount.go @@ -0,0 +1,29 @@ +// Copyright (c) NVIDIA CORPORATION. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package nvfm + +type refcount int + +func (r *refcount) IncOnNoError(err error) { + if err == nil { + (*r)++ + } +} + +func (r *refcount) DecOnNoError(err error) { + if err == nil && (*r) > 0 { + (*r)-- + } +} diff --git a/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/return.go b/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/return.go new file mode 100644 index 000000000..4c8d9f83b --- /dev/null +++ b/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/return.go @@ -0,0 +1,93 @@ +// Copyright (c) NVIDIA CORPORATION. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package nvfm + +import "fmt" + +// fm.ErrorString() +func (l *library) ErrorString(r Return) string { + return r.Error() +} + +func (r Return) String() string { + return r.Error() +} + +func (r Return) Error() string { + switch r { + case SUCCESS: + return "SUCCESS" + case BADPARAM: + return "BADPARAM" + case GENERIC_ERROR: + return "GENERIC_ERROR" + case NOT_SUPPORTED: + return "NOT_SUPPORTED" + case UNINITIALIZED: + return "UNINITIALIZED" + case TIMEOUT: + return "TIMEOUT" + case VERSION_MISMATCH: + return "VERSION_MISMATCH" + case IN_USE: + return "IN_USE" + case NOT_CONFIGURED: + return "NOT_CONFIGURED" + case CONNECTION_NOT_VALID: + return "CONNECTION_NOT_VALID" + case NVLINK_ERROR: + return "NVLINK_ERROR" + case RESOURCE_BAD: + return "RESOURCE_BAD" + case RESOURCE_IN_USE: + return "RESOURCE_IN_USE" + case RESOURCE_NOT_IN_USE: + return "RESOURCE_NOT_IN_USE" + case RESOURCE_EXHAUSTED: + return "RESOURCE_EXHAUSTED" + case RESOURCE_NOT_READY: + return "RESOURCE_NOT_READY" + case PARTITION_EXISTS: + return "PARTITION_EXISTS" + case PARTITION_ID_IN_USE: + return "PARTITION_ID_IN_USE" + case PARTITION_ID_NOT_IN_USE: + return "PARTITION_ID_NOT_IN_USE" + case PARTITION_NAME_IN_USE: + return "PARTITION_NAME_IN_USE" + case PARTITION_NAME_NOT_IN_USE: + return "PARTITION_NAME_NOT_IN_USE" + case PARTITION_ID_NAME_MISMATCH: + return "PARTITION_ID_NAME_MISMATCH" + case NOT_READY: + return "NOT_READY" + case RESOURCE_USED_IN_THIS_PARTITION: + return "RESOURCE_USED_IN_THIS_PARTITION" + case RESOURCE_USED_IN_ANOTHER_PARTITION: + return "RESOURCE_USED_IN_ANOTHER_PARTITION" + case PARTITION_MISWIRED_TRUNKS: + return "PARTITION_MISWIRED_TRUNKS" + case PARTITION_INSUFFICIENT_TRUNKS: + return "PARTITION_INSUFFICIENT_TRUNKS" + case PARTITION_MISSING_SWITCHES: + return "PARTITION_MISSING_SWITCHES" + case PARTITION_NETWORK_CONFIG_ERROR: + return "PARTITION_NETWORK_CONFIG_ERROR" + case PARTITION_ROUTE_PROGRAMMING_ERROR: + return "PARTITION_ROUTE_PROGRAMMING_ERROR" + default: + return fmt.Sprintf("unknown return value: %d", r) + } +} diff --git a/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/types_gen.go b/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/types_gen.go new file mode 100644 index 000000000..eade6e099 --- /dev/null +++ b/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/types_gen.go @@ -0,0 +1,123 @@ +// Code generated by cmd/cgo -godefs; DO NOT EDIT. +// cgo -godefs types.go + +package nvfm + +import "unsafe" + +type nvfmHandle unsafe.Pointer + +type ConnectParams_v1 struct { + Version uint32 + AddressInfo [256]int8 + TimeoutMs uint32 + AddressIsUnixSocket uint32 +} + +type ConnectParams_v2 struct { + Version uint32 + AddressInfo [256]int8 + TimeoutMs uint32 + AddressIsUnixSocket uint32 + AddressType uint32 +} + +type ConnectParams struct { + Version uint32 + AddressInfo [256]int8 + TimeoutMs uint32 + AddressIsUnixSocket uint32 + AddressType uint32 +} + +type FabricPartitionId uint32 + +type PciDevice struct { + Domain uint32 + Bus uint32 + Device uint32 + Function uint32 +} + +type FabricPartitionGpuInfo struct { + PhysicalId uint32 + Uuid [80]int8 + PciBusId [32]int8 + NumNvLinksAvailable uint32 + MaxNumNvLinks uint32 + NvlinkLineRateMBps uint32 +} + +type FabricPartitionInfo struct { + PartitionId uint32 + IsActive uint32 + NumGpus uint32 + GpuInfo [16]FabricPartitionGpuInfo +} + +type FabricPartitionList_v2 struct { + Version uint32 + NumPartitions uint32 + MaxNumPartitions uint32 + PartitionInfo [64]FabricPartitionInfo +} + +type FabricPartitionList struct { + Version uint32 + NumPartitions uint32 + MaxNumPartitions uint32 + PartitionInfo [64]FabricPartitionInfo +} + +type ActivatedFabricPartitionList_v1 struct { + Version uint32 + NumPartitions uint32 + PartitionIds [64]uint32 +} + +type ActivatedFabricPartitionList struct { + Version uint32 + NumPartitions uint32 + PartitionIds [64]uint32 +} + +type NvlinkFailedDeviceInfo struct { + Uuid [80]int8 + PciBusId [32]int8 + NumPorts uint32 + PortNum [64]uint32 +} + +type NvlinkFailedDevices_v1 struct { + Version uint32 + NumGpus uint32 + NumSwitches uint32 + GpuInfo [16]NvlinkFailedDeviceInfo + SwitchInfo [12]NvlinkFailedDeviceInfo +} + +type NvlinkFailedDevices struct { + Version uint32 + NumGpus uint32 + NumSwitches uint32 + GpuInfo [16]NvlinkFailedDeviceInfo + SwitchInfo [12]NvlinkFailedDeviceInfo +} + +type UnsupportedFabricPartitionInfo struct { + PartitionId uint32 + NumGpus uint32 + GpuPhysicalIds [16]uint32 +} + +type UnsupportedFabricPartitionList_v1 struct { + Version uint32 + NumPartitions uint32 + PartitionInfo [64]UnsupportedFabricPartitionInfo +} + +type UnsupportedFabricPartitionList struct { + Version uint32 + NumPartitions uint32 + PartitionInfo [64]UnsupportedFabricPartitionInfo +} diff --git a/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/zz_generated.api.go b/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/zz_generated.api.go new file mode 100644 index 000000000..cb7bdb86e --- /dev/null +++ b/vendor/github.com/NVIDIA/go-nvfm/pkg/nvfm/zz_generated.api.go @@ -0,0 +1,49 @@ +// Copyright (c) NVIDIA CORPORATION. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated Code; DO NOT EDIT. + +package nvfm + +// The variables below represent package-level methods from the library type. +var ( + Connect = libnvfm.Connect + ConnectWithParams = libnvfm.ConnectWithParams + ErrorString = libnvfm.ErrorString + Extensions = libnvfm.Extensions + Init = libnvfm.Init + Shutdown = libnvfm.Shutdown +) + +// Interface represents the interface for the library type. +type Interface interface { + Connect(opts ...ConnectOption) (Handle, Return) + ConnectWithParams(params ConnectParams) (Handle, Return) + ErrorString(r Return) string + Extensions() ExtendedInterface + Init() Return + Shutdown() Return +} + +// Handle represents the interface for the fabricManager type. +type Handle interface { + ActivateFabricPartition(id FabricPartitionId) Return + ActivateFabricPartitionWithVFs(id FabricPartitionId, vfs []PciDevice) Return + DeactivateFabricPartition(id FabricPartitionId) Return + Disconnect() Return + GetNvlinkFailedDevices() (NvlinkFailedDevices, Return) + GetSupportedFabricPartitions() (FabricPartitionList, Return) + GetUnsupportedFabricPartitions() (UnsupportedFabricPartitionList, Return) + SetActivatedFabricPartitions(ids []FabricPartitionId) Return +} diff --git a/vendor/golang.org/x/sys/unix/affinity_linux.go b/vendor/golang.org/x/sys/unix/affinity_linux.go index 3ea470387..acd6257fa 100644 --- a/vendor/golang.org/x/sys/unix/affinity_linux.go +++ b/vendor/golang.org/x/sys/unix/affinity_linux.go @@ -13,11 +13,19 @@ import ( const cpuSetSize = _CPU_SETSIZE / _NCPUBITS -// CPUSet represents a CPU affinity mask. +// CPUSet represents a bit mask of CPUs, to be used with [SchedGetaffinity], [SchedSetaffinity], +// and [SetMemPolicy]. +// +// Note this type can only represent CPU IDs 0 through 1023. +// Use [CPUSetDynamic]/[NewCPUSet] instead to avoid this limit. type CPUSet [cpuSetSize]cpuMask -func schedAffinity(trap uintptr, pid int, set *CPUSet) error { - _, _, e := RawSyscall(trap, uintptr(pid), uintptr(unsafe.Sizeof(*set)), uintptr(unsafe.Pointer(set))) +// CPUSetDynamic represents a bit mask of CPUs, to be used with [SchedGetaffinityDynamic], +// [SchedSetaffinityDynamic], and [SetMemPolicyDynamic]. Use [NewCPUSet] to allocate. +type CPUSetDynamic []cpuMask + +func schedAffinity(trap uintptr, pid int, size uintptr, ptr unsafe.Pointer) error { + _, _, e := RawSyscall(trap, uintptr(pid), uintptr(size), uintptr(ptr)) if e != 0 { return errnoErr(e) } @@ -27,13 +35,13 @@ func schedAffinity(trap uintptr, pid int, set *CPUSet) error { // SchedGetaffinity gets the CPU affinity mask of the thread specified by pid. // If pid is 0 the calling thread is used. func SchedGetaffinity(pid int, set *CPUSet) error { - return schedAffinity(SYS_SCHED_GETAFFINITY, pid, set) + return schedAffinity(SYS_SCHED_GETAFFINITY, pid, unsafe.Sizeof(*set), unsafe.Pointer(set)) } // SchedSetaffinity sets the CPU affinity mask of the thread specified by pid. // If pid is 0 the calling thread is used. func SchedSetaffinity(pid int, set *CPUSet) error { - return schedAffinity(SYS_SCHED_SETAFFINITY, pid, set) + return schedAffinity(SYS_SCHED_SETAFFINITY, pid, unsafe.Sizeof(*set), unsafe.Pointer(set)) } // Zero clears the set s, so that it contains no CPUs. @@ -45,9 +53,7 @@ func (s *CPUSet) Zero() { // will silently ignore any invalid CPU bits in [CPUSet] so this is an // efficient way of resetting the CPU affinity of a process. func (s *CPUSet) Fill() { - for i := range s { - s[i] = ^cpuMask(0) - } + cpuMaskFill(s[:]) } func cpuBitsIndex(cpu int) int { @@ -58,24 +64,27 @@ func cpuBitsMask(cpu int) cpuMask { return cpuMask(1 << (uint(cpu) % _NCPUBITS)) } -// Set adds cpu to the set s. -func (s *CPUSet) Set(cpu int) { +func cpuMaskFill(s []cpuMask) { + for i := range s { + s[i] = ^cpuMask(0) + } +} + +func cpuMaskSet(s []cpuMask, cpu int) { i := cpuBitsIndex(cpu) if i < len(s) { s[i] |= cpuBitsMask(cpu) } } -// Clear removes cpu from the set s. -func (s *CPUSet) Clear(cpu int) { +func cpuMaskClear(s []cpuMask, cpu int) { i := cpuBitsIndex(cpu) if i < len(s) { s[i] &^= cpuBitsMask(cpu) } } -// IsSet reports whether cpu is in the set s. -func (s *CPUSet) IsSet(cpu int) bool { +func cpuMaskIsSet(s []cpuMask, cpu int) bool { i := cpuBitsIndex(cpu) if i < len(s) { return s[i]&cpuBitsMask(cpu) != 0 @@ -83,11 +92,98 @@ func (s *CPUSet) IsSet(cpu int) bool { return false } -// Count returns the number of CPUs in the set s. -func (s *CPUSet) Count() int { +func cpuMaskCount(s []cpuMask) int { c := 0 for _, b := range s { c += bits.OnesCount64(uint64(b)) } return c } + +// Set adds cpu to the set s. If cpu is out of bounds for s, no action is taken. +func (s *CPUSet) Set(cpu int) { + cpuMaskSet(s[:], cpu) +} + +// Clear removes cpu from the set s. If cpu is out of bounds for s, no action is taken. +func (s *CPUSet) Clear(cpu int) { + cpuMaskClear(s[:], cpu) +} + +// IsSet reports whether cpu is in the set s. +func (s *CPUSet) IsSet(cpu int) bool { + return cpuMaskIsSet(s[:], cpu) +} + +// Count returns the number of CPUs in the set s. +func (s *CPUSet) Count() int { + return cpuMaskCount(s[:]) +} + +// NewCPUSet creates a CPU affinity mask capable of representing CPU IDs +// up to maxCPU (exclusive). +func NewCPUSet(maxCPU int) CPUSetDynamic { + numMasks := (maxCPU + _NCPUBITS - 1) / _NCPUBITS + if numMasks == 0 { + numMasks = 1 + } + return make(CPUSetDynamic, numMasks) +} + +// Zero clears the set s, so that it contains no CPUs. +func (s CPUSetDynamic) Zero() { + clear(s) +} + +// Fill adds all possible CPU bits to the set s. On Linux, [SchedSetaffinityDynamic] +// will silently ignore any invalid CPU bits in [CPUSetDynamic] so this is an +// efficient way of resetting the CPU affinity of a process. +func (s CPUSetDynamic) Fill() { + cpuMaskFill(s) +} + +// Set adds cpu to the set s. If cpu is out of bounds for s, no action is taken. +func (s CPUSetDynamic) Set(cpu int) { + cpuMaskSet(s, cpu) +} + +// Clear removes cpu from the set s. If cpu is out of bounds for s, no action is taken. +func (s CPUSetDynamic) Clear(cpu int) { + cpuMaskClear(s, cpu) +} + +// IsSet reports whether cpu is in the set s. +func (s CPUSetDynamic) IsSet(cpu int) bool { + return cpuMaskIsSet(s, cpu) +} + +// Count returns the number of CPUs in the set s. +func (s CPUSetDynamic) Count() int { + return cpuMaskCount(s) +} + +func (s CPUSetDynamic) size() uintptr { + return uintptr(len(s)) * unsafe.Sizeof(cpuMask(0)) +} + +func (s CPUSetDynamic) pointer() unsafe.Pointer { + if len(s) == 0 { + return nil + } + return unsafe.Pointer(&s[0]) +} + +// SchedGetaffinityDynamic gets the CPU affinity mask of the thread specified by pid. +// If pid is 0 the calling thread is used. +// +// If the set is smaller than the size of the affinity mask used by the kernel, +// [EINVAL] is returned. +func SchedGetaffinityDynamic(pid int, set CPUSetDynamic) error { + return schedAffinity(SYS_SCHED_GETAFFINITY, pid, set.size(), set.pointer()) +} + +// SchedSetaffinityDynamic sets the CPU affinity mask of the thread specified by pid. +// If pid is 0 the calling thread is used. +func SchedSetaffinityDynamic(pid int, set CPUSetDynamic) error { + return schedAffinity(SYS_SCHED_SETAFFINITY, pid, set.size(), set.pointer()) +} diff --git a/vendor/golang.org/x/sys/unix/mkall.sh b/vendor/golang.org/x/sys/unix/mkall.sh index d0ed61191..f6ddee1ae 100644 --- a/vendor/golang.org/x/sys/unix/mkall.sh +++ b/vendor/golang.org/x/sys/unix/mkall.sh @@ -51,7 +51,7 @@ if [[ "$GOOS" = "linux" ]]; then # Files generated through docker (use $cmd so you can Ctl-C the build or run) set -e $cmd docker build --tag generate:$GOOS $GOOS - $cmd docker run --interactive --tty --volume $(cd -- "$(dirname -- "$0")/.." && pwd):/build generate:$GOOS + $cmd docker run --rm --interactive --tty --volume $(cd -- "$(dirname -- "$0")/.." && pwd):/build generate:$GOOS exit fi diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh index fd39be4ef..fa74cfe9e 100644 --- a/vendor/golang.org/x/sys/unix/mkerrors.sh +++ b/vendor/golang.org/x/sys/unix/mkerrors.sh @@ -354,6 +354,9 @@ struct ltchars { // Renamed in v6.16, commit c6d732c38f93 ("net: ethtool: remove duplicate defines for family info") #define ETHTOOL_FAMILY_NAME ETHTOOL_GENL_NAME #define ETHTOOL_FAMILY_VERSION ETHTOOL_GENL_VERSION + +// Removed in v6.17, commit 760e6f7befba ("futex: Remove support for IMMUTABLE") +#define PR_FUTEX_HASH_GET_IMMUTABLE 3 ' includes_NetBSD=' diff --git a/vendor/golang.org/x/sys/unix/readv_unix.go b/vendor/golang.org/x/sys/unix/readv_unix.go new file mode 100644 index 000000000..38a2be937 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/readv_unix.go @@ -0,0 +1,103 @@ +// Copyright 2026 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build darwin || linux || openbsd + +package unix + +import "unsafe" + +// minIovec is the size of the small initial allocation used by +// Readv, Writev, etc. +// +// This small allocation gets stack allocated, which lets the +// common use case of len(iovs) <= minIovec avoid more expensive +// heap allocations. +const minIovec = 8 + +// appendBytes converts bs to Iovecs and appends them to vecs. +func appendBytes(vecs []Iovec, bs [][]byte) []Iovec { + for _, b := range bs { + var v Iovec + v.SetLen(len(b)) + if len(b) > 0 { + v.Base = &b[0] + } else { + v.Base = (*byte)(unsafe.Pointer(&_zero)) + } + vecs = append(vecs, v) + } + return vecs +} + +// writevRaceDetect tells the race detector that the program +// has read the first n bytes stored in iovecs. +func writevRaceDetect(iovecs []Iovec, n int) { + if !raceenabled { + return + } + for i := 0; n > 0 && i < len(iovecs); i++ { + m := min(int(iovecs[i].Len), n) + n -= m + if m > 0 { + raceReadRange(unsafe.Pointer(iovecs[i].Base), m) + } + } +} + +// readvRaceDetect tells the race detector that the program +// has written to the first n bytes stored in iovecs. +func readvRaceDetect(iovecs []Iovec, n int, err error) { + if !raceenabled { + return + } + for i := 0; n > 0 && i < len(iovecs); i++ { + m := min(int(iovecs[i].Len), n) + n -= m + if m > 0 { + raceWriteRange(unsafe.Pointer(iovecs[i].Base), m) + } + } + if err == nil { + raceAcquire(unsafe.Pointer(&ioSync)) + } +} + +func Readv(fd int, iovs [][]byte) (n int, err error) { + iovecs := make([]Iovec, 0, minIovec) + iovecs = appendBytes(iovecs, iovs) + n, err = readv(fd, iovecs) + readvRaceDetect(iovecs, n, err) + return n, err +} + +func Preadv(fd int, iovs [][]byte, offset int64) (n int, err error) { + iovecs := make([]Iovec, 0, minIovec) + iovecs = appendBytes(iovecs, iovs) + n, err = preadv(fd, iovecs, offset) + readvRaceDetect(iovecs, n, err) + return n, err +} + +func Writev(fd int, iovs [][]byte) (n int, err error) { + iovecs := make([]Iovec, 0, minIovec) + iovecs = appendBytes(iovecs, iovs) + if raceenabled { + raceReleaseMerge(unsafe.Pointer(&ioSync)) + } + n, err = writev(fd, iovecs) + writevRaceDetect(iovecs, n) + return n, err +} + +func Pwritev(fd int, iovs [][]byte, offset int64) (n int, err error) { + iovecs := make([]Iovec, 0, minIovec) + iovecs = appendBytes(iovecs, iovs) + if raceenabled { + raceReleaseMerge(unsafe.Pointer(&ioSync)) + } + n, err = pwritev(fd, iovecs, offset) + writevRaceDetect(iovecs, n) + return n, err +} diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.go b/vendor/golang.org/x/sys/unix/syscall_darwin.go index 7838ca5db..38590ca81 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin.go @@ -602,95 +602,6 @@ func Connectx(fd int, srcIf uint32, srcAddr, dstAddr Sockaddr, associd SaeAssocI return } -const minIovec = 8 - -func Readv(fd int, iovs [][]byte) (n int, err error) { - iovecs := make([]Iovec, 0, minIovec) - iovecs = appendBytes(iovecs, iovs) - n, err = readv(fd, iovecs) - readvRacedetect(iovecs, n, err) - return n, err -} - -func Preadv(fd int, iovs [][]byte, offset int64) (n int, err error) { - iovecs := make([]Iovec, 0, minIovec) - iovecs = appendBytes(iovecs, iovs) - n, err = preadv(fd, iovecs, offset) - readvRacedetect(iovecs, n, err) - return n, err -} - -func Writev(fd int, iovs [][]byte) (n int, err error) { - iovecs := make([]Iovec, 0, minIovec) - iovecs = appendBytes(iovecs, iovs) - if raceenabled { - raceReleaseMerge(unsafe.Pointer(&ioSync)) - } - n, err = writev(fd, iovecs) - writevRacedetect(iovecs, n) - return n, err -} - -func Pwritev(fd int, iovs [][]byte, offset int64) (n int, err error) { - iovecs := make([]Iovec, 0, minIovec) - iovecs = appendBytes(iovecs, iovs) - if raceenabled { - raceReleaseMerge(unsafe.Pointer(&ioSync)) - } - n, err = pwritev(fd, iovecs, offset) - writevRacedetect(iovecs, n) - return n, err -} - -func appendBytes(vecs []Iovec, bs [][]byte) []Iovec { - for _, b := range bs { - var v Iovec - v.SetLen(len(b)) - if len(b) > 0 { - v.Base = &b[0] - } else { - v.Base = (*byte)(unsafe.Pointer(&_zero)) - } - vecs = append(vecs, v) - } - return vecs -} - -func writevRacedetect(iovecs []Iovec, n int) { - if !raceenabled { - return - } - for i := 0; n > 0 && i < len(iovecs); i++ { - m := int(iovecs[i].Len) - if m > n { - m = n - } - n -= m - if m > 0 { - raceReadRange(unsafe.Pointer(iovecs[i].Base), m) - } - } -} - -func readvRacedetect(iovecs []Iovec, n int, err error) { - if !raceenabled { - return - } - for i := 0; n > 0 && i < len(iovecs); i++ { - m := int(iovecs[i].Len) - if m > n { - m = n - } - n -= m - if m > 0 { - raceWriteRange(unsafe.Pointer(iovecs[i].Base), m) - } - } - if err == nil { - raceAcquire(unsafe.Pointer(&ioSync)) - } -} - //sys connectx(fd int, endpoints *SaEndpoints, associd SaeAssocID, flags uint32, iov []Iovec, n *uintptr, connid *SaeConnID) (err error) //sys sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go index 06c0eea6f..ce4d7ab1e 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux.go @@ -2150,33 +2150,10 @@ func Signalfd(fd int, sigmask *Sigset_t, flags int) (newfd int, err error) { //sys exitThread(code int) (err error) = SYS_EXIT //sys readv(fd int, iovs []Iovec) (n int, err error) = SYS_READV //sys writev(fd int, iovs []Iovec) (n int, err error) = SYS_WRITEV -//sys preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) = SYS_PREADV -//sys pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) = SYS_PWRITEV -//sys preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) = SYS_PREADV2 -//sys pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) = SYS_PWRITEV2 - -// minIovec is the size of the small initial allocation used by -// Readv, Writev, etc. -// -// This small allocation gets stack allocated, which lets the -// common use case of len(iovs) <= minIovs avoid more expensive -// heap allocations. -const minIovec = 8 - -// appendBytes converts bs to Iovecs and appends them to vecs. -func appendBytes(vecs []Iovec, bs [][]byte) []Iovec { - for _, b := range bs { - var v Iovec - v.SetLen(len(b)) - if len(b) > 0 { - v.Base = &b[0] - } else { - v.Base = (*byte)(unsafe.Pointer(&_zero)) - } - vecs = append(vecs, v) - } - return vecs -} +//sys preadvSyscall(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) = SYS_PREADV +//sys pwritevSyscall(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) = SYS_PWRITEV +//sys preadv2Syscall(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) = SYS_PREADV2 +//sys pwritev2Syscall(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) = SYS_PWRITEV2 // offs2lohi splits offs into its low and high order bits. func offs2lohi(offs int64) (lo, hi uintptr) { @@ -2184,69 +2161,23 @@ func offs2lohi(offs int64) (lo, hi uintptr) { return uintptr(offs), uintptr(uint64(offs) >> (longBits - 1) >> 1) // two shifts to avoid false positive in vet } -func Readv(fd int, iovs [][]byte) (n int, err error) { - iovecs := make([]Iovec, 0, minIovec) - iovecs = appendBytes(iovecs, iovs) - n, err = readv(fd, iovecs) - readvRacedetect(iovecs, n, err) - return n, err -} - -func Preadv(fd int, iovs [][]byte, offset int64) (n int, err error) { - iovecs := make([]Iovec, 0, minIovec) - iovecs = appendBytes(iovecs, iovs) +func preadv(fd int, iovecs []Iovec, offset int64) (n int, err error) { lo, hi := offs2lohi(offset) - n, err = preadv(fd, iovecs, lo, hi) - readvRacedetect(iovecs, n, err) - return n, err + return preadvSyscall(fd, iovecs, lo, hi) } func Preadv2(fd int, iovs [][]byte, offset int64, flags int) (n int, err error) { iovecs := make([]Iovec, 0, minIovec) iovecs = appendBytes(iovecs, iovs) lo, hi := offs2lohi(offset) - n, err = preadv2(fd, iovecs, lo, hi, flags) - readvRacedetect(iovecs, n, err) - return n, err -} - -func readvRacedetect(iovecs []Iovec, n int, err error) { - if !raceenabled { - return - } - for i := 0; n > 0 && i < len(iovecs); i++ { - m := min(int(iovecs[i].Len), n) - n -= m - if m > 0 { - raceWriteRange(unsafe.Pointer(iovecs[i].Base), m) - } - } - if err == nil { - raceAcquire(unsafe.Pointer(&ioSync)) - } -} - -func Writev(fd int, iovs [][]byte) (n int, err error) { - iovecs := make([]Iovec, 0, minIovec) - iovecs = appendBytes(iovecs, iovs) - if raceenabled { - raceReleaseMerge(unsafe.Pointer(&ioSync)) - } - n, err = writev(fd, iovecs) - writevRacedetect(iovecs, n) + n, err = preadv2Syscall(fd, iovecs, lo, hi, flags) + readvRaceDetect(iovecs, n, err) return n, err } -func Pwritev(fd int, iovs [][]byte, offset int64) (n int, err error) { - iovecs := make([]Iovec, 0, minIovec) - iovecs = appendBytes(iovecs, iovs) - if raceenabled { - raceReleaseMerge(unsafe.Pointer(&ioSync)) - } +func pwritev(fd int, iovecs []Iovec, offset int64) (n int, err error) { lo, hi := offs2lohi(offset) - n, err = pwritev(fd, iovecs, lo, hi) - writevRacedetect(iovecs, n) - return n, err + return pwritevSyscall(fd, iovecs, lo, hi) } func Pwritev2(fd int, iovs [][]byte, offset int64, flags int) (n int, err error) { @@ -2256,24 +2187,11 @@ func Pwritev2(fd int, iovs [][]byte, offset int64, flags int) (n int, err error) raceReleaseMerge(unsafe.Pointer(&ioSync)) } lo, hi := offs2lohi(offset) - n, err = pwritev2(fd, iovecs, lo, hi, flags) - writevRacedetect(iovecs, n) + n, err = pwritev2Syscall(fd, iovecs, lo, hi, flags) + writevRaceDetect(iovecs, n) return n, err } -func writevRacedetect(iovecs []Iovec, n int) { - if !raceenabled { - return - } - for i := 0; n > 0 && i < len(iovecs); i++ { - m := min(int(iovecs[i].Len), n) - n -= m - if m > 0 { - raceReadRange(unsafe.Pointer(iovecs[i].Base), m) - } - } -} - // mmap varies by architecture; see syscall_linux_*.go. //sys munmap(addr uintptr, length uintptr) (err error) //sys mremap(oldaddr uintptr, oldlength uintptr, newlength uintptr, flags int, newaddr uintptr) (xaddr uintptr, err error) @@ -2644,8 +2562,12 @@ func SchedGetAttr(pid int, flags uint) (*SchedAttr, error) { //sys Cachestat(fd uint, crange *CachestatRange, cstat *Cachestat_t, flags uint) (err error) //sys Mseal(b []byte, flags uint) (err error) -//sys setMemPolicy(mode int, mask *CPUSet, size int) (err error) = SYS_SET_MEMPOLICY +//sys setMemPolicy(mode int, mask unsafe.Pointer, size uintptr) (err error) = SYS_SET_MEMPOLICY func SetMemPolicy(mode int, mask *CPUSet) error { - return setMemPolicy(mode, mask, _CPU_SETSIZE) + return setMemPolicy(mode, unsafe.Pointer(mask), _CPU_SETSIZE) +} + +func SetMemPolicyDynamic(mode int, mask CPUSetDynamic) error { + return setMemPolicy(mode, mask.pointer(), mask.size()) } diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go index cd2dd797f..ecf92bfa2 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go @@ -82,6 +82,9 @@ func Time(t *Time_t) (Time_t, error) { } func Utime(path string, buf *Utimbuf) error { + if buf == nil { + return Utimes(path, nil) + } tv := []Timeval{ {Sec: buf.Actime}, {Sec: buf.Modtime}, diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go index 745e5c7e6..173738077 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go @@ -113,6 +113,9 @@ func Time(t *Time_t) (Time_t, error) { } func Utime(path string, buf *Utimbuf) error { + if buf == nil { + return Utimes(path, nil) + } tv := []Timeval{ {Sec: buf.Actime}, {Sec: buf.Modtime}, diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go b/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go index dd2262a40..a3fd1d0b8 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go @@ -150,6 +150,9 @@ func Time(t *Time_t) (Time_t, error) { } func Utime(path string, buf *Utimbuf) error { + if buf == nil { + return Utimes(path, nil) + } tv := []Timeval{ {Sec: buf.Actime}, {Sec: buf.Modtime}, diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go index 8cf3670bd..fc5543c5f 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go @@ -112,6 +112,9 @@ func Time(t *Time_t) (Time_t, error) { } func Utime(path string, buf *Utimbuf) error { + if buf == nil { + return Utimes(path, nil) + } tv := []Timeval{ {Sec: buf.Actime}, {Sec: buf.Modtime}, diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd.go b/vendor/golang.org/x/sys/unix/syscall_openbsd.go index b86ded549..7b0ef8e12 100644 --- a/vendor/golang.org/x/sys/unix/syscall_openbsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd.go @@ -300,6 +300,10 @@ func Uname(uname *Utsname) error { //sys Pathconf(path string, name int) (val int, err error) //sys pread(fd int, p []byte, offset int64) (n int, err error) //sys pwrite(fd int, p []byte, offset int64) (n int, err error) +//sys readv(fd int, iovecs []Iovec) (n int, err error) +//sys writev(fd int, iovecs []Iovec) (n int, err error) +//sys preadv(fd int, iovecs []Iovec, offset int64) (n int, err error) +//sys pwritev(fd int, iovecs []Iovec, offset int64) (n int, err error) //sys read(fd int, p []byte) (n int, err error) //sys Readlink(path string, buf []byte) (n int, err error) //sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error) diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux.go b/vendor/golang.org/x/sys/unix/zerrors_linux.go index 120a7b35d..9d72a6b73 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux.go @@ -353,8 +353,10 @@ const ( AUDIT_MAC_IPSEC_EVENT = 0x587 AUDIT_MAC_MAP_ADD = 0x581 AUDIT_MAC_MAP_DEL = 0x582 + AUDIT_MAC_OBJ_CONTEXTS = 0x592 AUDIT_MAC_POLICY_LOAD = 0x57b AUDIT_MAC_STATUS = 0x57c + AUDIT_MAC_TASK_CONTEXTS = 0x591 AUDIT_MAC_UNLBL_ALLOW = 0x57e AUDIT_MAC_UNLBL_STCADD = 0x588 AUDIT_MAC_UNLBL_STCDEL = 0x589 @@ -591,8 +593,13 @@ const ( CAN_CTRLMODE_LOOPBACK = 0x1 CAN_CTRLMODE_ONE_SHOT = 0x8 CAN_CTRLMODE_PRESUME_ACK = 0x40 + CAN_CTRLMODE_RESTRICTED = 0x800 CAN_CTRLMODE_TDC_AUTO = 0x200 CAN_CTRLMODE_TDC_MANUAL = 0x400 + CAN_CTRLMODE_XL = 0x1000 + CAN_CTRLMODE_XL_TDC_AUTO = 0x2000 + CAN_CTRLMODE_XL_TDC_MANUAL = 0x4000 + CAN_CTRLMODE_XL_TMS = 0x8000 CAN_EFF_FLAG = 0x80000000 CAN_EFF_ID_BITS = 0x1d CAN_EFF_MASK = 0x1fffffff @@ -800,6 +807,8 @@ const ( DEVLINK_PORT_FN_CAP_IPSEC_PACKET = 0x8 DEVLINK_PORT_FN_CAP_MIGRATABLE = 0x2 DEVLINK_PORT_FN_CAP_ROCE = 0x1 + DEVLINK_RATE_TCS_MAX = 0x8 + DEVLINK_RATE_TC_INDEX_MAX = 0x7 DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14 DEVLINK_SUPPORTED_FLASH_OVERWRITE_SECTIONS = 0x3 DEVMEM_MAGIC = 0x454d444d @@ -1186,6 +1195,7 @@ const ( ETH_P_MPLS_UC = 0x8847 ETH_P_MRP = 0x88e3 ETH_P_MVRP = 0x88f5 + ETH_P_MXLGSW = 0x88c3 ETH_P_NCSI = 0x88f8 ETH_P_NSH = 0x894f ETH_P_PAE = 0x888e @@ -1218,6 +1228,7 @@ const ( ETH_P_WCCP = 0x883e ETH_P_X25 = 0x805 ETH_P_XDSA = 0xf8 + ETH_P_YT921X = 0x9988 ET_CORE = 0x4 ET_DYN = 0x3 ET_EXEC = 0x2 @@ -1258,6 +1269,7 @@ const ( FALLOC_FL_NO_HIDE_STALE = 0x4 FALLOC_FL_PUNCH_HOLE = 0x2 FALLOC_FL_UNSHARE_RANGE = 0x40 + FALLOC_FL_WRITE_ZEROES = 0x80 FALLOC_FL_ZERO_RANGE = 0x10 FANOTIFY_METADATA_VERSION = 0x3 FAN_ACCESS = 0x1 @@ -1477,6 +1489,7 @@ const ( GRND_INSECURE = 0x4 GRND_NONBLOCK = 0x1 GRND_RANDOM = 0x2 + GUEST_MEMFD_MAGIC = 0x474d454d HDIO_DRIVE_CMD = 0x31f HDIO_DRIVE_CMD_AEB = 0x31e HDIO_DRIVE_CMD_HDR_SIZE = 0x4 @@ -1517,6 +1530,7 @@ const ( HDIO_SET_XFER = 0x306 HDIO_TRISTATE_HWIF = 0x31b HDIO_UNREGISTER_HWIF = 0x32a + HIDIOCTL_LAST = 0xd HID_MAX_DESCRIPTOR_SIZE = 0x1000 HOSTFS_SUPER_MAGIC = 0xc0ffee HPFS_SUPER_MAGIC = 0xf995e849 @@ -1809,6 +1823,8 @@ const ( KEXEC_ARCH_X86_64 = 0x3e0000 KEXEC_CRASH_HOTPLUG_SUPPORT = 0x8 KEXEC_FILE_DEBUG = 0x8 + KEXEC_FILE_FORCE_DTB = 0x20 + KEXEC_FILE_NO_CMA = 0x10 KEXEC_FILE_NO_INITRAMFS = 0x4 KEXEC_FILE_ON_CRASH = 0x2 KEXEC_FILE_UNLOAD = 0x1 @@ -1905,6 +1921,7 @@ const ( LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON = 0x2 LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF = 0x1 LANDLOCK_RESTRICT_SELF_LOG_SUBDOMAINS_OFF = 0x4 + LANDLOCK_RESTRICT_SELF_TSYNC = 0x8 LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET = 0x1 LANDLOCK_SCOPE_SIGNAL = 0x2 LINUX_REBOOT_CMD_CAD_OFF = 0x0 @@ -2412,6 +2429,7 @@ const ( NN_PRXFPREG = "LINUX" NN_RISCV_CSR = "LINUX" NN_RISCV_TAGGED_ADDR_CTRL = "LINUX" + NN_RISCV_USER_CFI = "LINUX" NN_RISCV_VECTOR = "LINUX" NN_S390_CTRS = "LINUX" NN_S390_GS_BC = "LINUX" @@ -2493,6 +2511,7 @@ const ( NT_PRXFPREG = 0x46e62b7f NT_RISCV_CSR = 0x900 NT_RISCV_TAGGED_ADDR_CTRL = 0x902 + NT_RISCV_USER_CFI = 0x903 NT_RISCV_VECTOR = 0x901 NT_S390_CTRS = 0x304 NT_S390_GS_BC = 0x30c @@ -2515,6 +2534,7 @@ const ( NT_X86_SHSTK = 0x204 NT_X86_XSAVE_LAYOUT = 0x205 NT_X86_XSTATE = 0x202 + NULL_FS_MAGIC = 0x4e554c4c OCFS2_SUPER_MAGIC = 0x7461636f OCRNL = 0x8 OFDEL = 0x80 @@ -2594,6 +2614,7 @@ const ( PERF_ATTR_SIZE_VER6 = 0x78 PERF_ATTR_SIZE_VER7 = 0x80 PERF_ATTR_SIZE_VER8 = 0x88 + PERF_ATTR_SIZE_VER9 = 0x90 PERF_AUX_FLAG_COLLISION = 0x8 PERF_AUX_FLAG_CORESIGHT_FORMAT_CORESIGHT = 0x0 PERF_AUX_FLAG_CORESIGHT_FORMAT_RAW = 0x100 @@ -2629,6 +2650,7 @@ const ( PERF_MEM_LVLNUM_ANY_CACHE = 0xb PERF_MEM_LVLNUM_CXL = 0x9 PERF_MEM_LVLNUM_IO = 0xa + PERF_MEM_LVLNUM_L0 = 0x7 PERF_MEM_LVLNUM_L1 = 0x1 PERF_MEM_LVLNUM_L2 = 0x2 PERF_MEM_LVLNUM_L2_MHB = 0x5 @@ -2662,6 +2684,23 @@ const ( PERF_MEM_OP_PFETCH = 0x8 PERF_MEM_OP_SHIFT = 0x0 PERF_MEM_OP_STORE = 0x4 + PERF_MEM_REGION_L_NON_SHARE = 0x3 + PERF_MEM_REGION_L_SHARE = 0x2 + PERF_MEM_REGION_MEM0 = 0x8 + PERF_MEM_REGION_MEM1 = 0x9 + PERF_MEM_REGION_MEM2 = 0xa + PERF_MEM_REGION_MEM3 = 0xb + PERF_MEM_REGION_MEM4 = 0xc + PERF_MEM_REGION_MEM5 = 0xd + PERF_MEM_REGION_MEM6 = 0xe + PERF_MEM_REGION_MEM7 = 0xf + PERF_MEM_REGION_MMIO = 0x7 + PERF_MEM_REGION_NA = 0x0 + PERF_MEM_REGION_O_IO = 0x4 + PERF_MEM_REGION_O_NON_SHARE = 0x6 + PERF_MEM_REGION_O_SHARE = 0x5 + PERF_MEM_REGION_RSVD = 0x1 + PERF_MEM_REGION_SHIFT = 0x2e PERF_MEM_REMOTE_REMOTE = 0x1 PERF_MEM_REMOTE_SHIFT = 0x25 PERF_MEM_SNOOPX_FWD = 0x1 @@ -2776,6 +2815,10 @@ const ( PR_CAP_AMBIENT_IS_SET = 0x1 PR_CAP_AMBIENT_LOWER = 0x3 PR_CAP_AMBIENT_RAISE = 0x2 + PR_CFI_BRANCH_LANDING_PADS = 0x0 + PR_CFI_DISABLE = 0x2 + PR_CFI_ENABLE = 0x1 + PR_CFI_LOCK = 0x4 PR_ENDIAN_BIG = 0x0 PR_ENDIAN_LITTLE = 0x1 PR_ENDIAN_PPC_LITTLE = 0x2 @@ -2798,6 +2841,7 @@ const ( PR_FUTEX_HASH_GET_SLOTS = 0x2 PR_FUTEX_HASH_SET_SLOTS = 0x1 PR_GET_AUXV = 0x41555856 + PR_GET_CFI = 0x50 PR_GET_CHILD_SUBREAPER = 0x25 PR_GET_DUMPABLE = 0x3 PR_GET_ENDIAN = 0x13 @@ -2834,6 +2878,7 @@ const ( PR_MDWE_REFUSE_EXEC_GAIN = 0x1 PR_MPX_DISABLE_MANAGEMENT = 0x2c PR_MPX_ENABLE_MANAGEMENT = 0x2b + PR_MTE_STORE_ONLY = 0x80000 PR_MTE_TAG_MASK = 0x7fff8 PR_MTE_TAG_SHIFT = 0x3 PR_MTE_TCF_ASYNC = 0x4 @@ -2877,6 +2922,10 @@ const ( PR_RISCV_V_VSTATE_CTRL_NEXT_MASK = 0xc PR_RISCV_V_VSTATE_CTRL_OFF = 0x1 PR_RISCV_V_VSTATE_CTRL_ON = 0x2 + PR_RSEQ_SLICE_EXTENSION = 0x4f + PR_RSEQ_SLICE_EXTENSION_GET = 0x1 + PR_RSEQ_SLICE_EXTENSION_SET = 0x2 + PR_RSEQ_SLICE_EXT_ENABLE = 0x1 PR_SCHED_CORE = 0x3e PR_SCHED_CORE_CREATE = 0x1 PR_SCHED_CORE_GET = 0x0 @@ -2886,6 +2935,7 @@ const ( PR_SCHED_CORE_SCOPE_THREAD_GROUP = 0x1 PR_SCHED_CORE_SHARE_FROM = 0x3 PR_SCHED_CORE_SHARE_TO = 0x2 + PR_SET_CFI = 0x51 PR_SET_CHILD_SUBREAPER = 0x24 PR_SET_DUMPABLE = 0x4 PR_SET_ENDIAN = 0x14 @@ -2951,11 +3001,14 @@ const ( PR_SVE_SET_VL_ONEXEC = 0x40000 PR_SVE_VL_INHERIT = 0x20000 PR_SVE_VL_LEN_MASK = 0xffff + PR_SYS_DISPATCH_EXCLUSIVE_ON = 0x1 + PR_SYS_DISPATCH_INCLUSIVE_ON = 0x2 PR_SYS_DISPATCH_OFF = 0x0 PR_SYS_DISPATCH_ON = 0x1 PR_TAGGED_ADDR_ENABLE = 0x1 PR_TASK_PERF_EVENTS_DISABLE = 0x1f PR_TASK_PERF_EVENTS_ENABLE = 0x20 + PR_THP_DISABLE_EXCEPT_ADVISED = 0x2 PR_TIMER_CREATE_RESTORE_IDS = 0x4d PR_TIMER_CREATE_RESTORE_IDS_GET = 0x2 PR_TIMER_CREATE_RESTORE_IDS_OFF = 0x0 @@ -2987,8 +3040,10 @@ const ( PTP_STRICT_FLAGS = 0x8 PTP_SYS_OFFSET_EXTENDED = 0xc4c03d09 PTP_SYS_OFFSET_EXTENDED2 = 0xc4c03d12 + PTP_SYS_OFFSET_EXTENDED_CYCLES = 0xc4c03d16 PTP_SYS_OFFSET_PRECISE = 0xc0403d08 PTP_SYS_OFFSET_PRECISE2 = 0xc0403d11 + PTP_SYS_OFFSET_PRECISE_CYCLES = 0xc0403d15 PTRACE_ATTACH = 0x10 PTRACE_CONT = 0x7 PTRACE_DETACH = 0x11 @@ -3330,8 +3385,9 @@ const ( RWF_DSYNC = 0x2 RWF_HIPRI = 0x1 RWF_NOAPPEND = 0x20 + RWF_NOSIGNAL = 0x100 RWF_NOWAIT = 0x8 - RWF_SUPPORTED = 0xff + RWF_SUPPORTED = 0x1ff RWF_SYNC = 0x4 RWF_WRITE_LIFE_NOT_SET = 0x0 SCHED_BATCH = 0x3 @@ -3714,7 +3770,7 @@ const ( TASKSTATS_GENL_NAME = "TASKSTATS" TASKSTATS_GENL_VERSION = 0x1 TASKSTATS_TYPE_MAX = 0x6 - TASKSTATS_VERSION = 0x10 + TASKSTATS_VERSION = 0x11 TCIFLUSH = 0x0 TCIOFF = 0x2 TCIOFLUSH = 0x2 @@ -4052,6 +4108,7 @@ const ( XDP_FLAGS_REPLACE = 0x10 XDP_FLAGS_SKB_MODE = 0x2 XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1 + XDP_MAX_TX_SKB_BUDGET = 0x9 XDP_MMAP_OFFSETS = 0x1 XDP_OPTIONS = 0x8 XDP_OPTIONS_ZEROCOPY = 0x1 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go index 97a61fc5b..c0a8ea1de 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go @@ -159,6 +159,7 @@ const ( NFDBITS = 0x20 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_ID = 0x8008b70d NS_GET_MNTNS_ID = 0x8008b705 NS_GET_NSTYPE = 0xb703 NS_GET_OWNER_UID = 0xb704 @@ -305,6 +306,7 @@ const ( RTC_WKALM_SET = 0x4028700f SCM_DEVMEM_DMABUF = 0x4f SCM_DEVMEM_LINEAR = 0x4e + SCM_INQ = 0x54 SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -352,6 +354,7 @@ const ( SO_ERROR = 0x4 SO_INCOMING_CPU = 0x31 SO_INCOMING_NAPI_ID = 0x38 + SO_INQ = 0x54 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd SO_LOCK_FILTER = 0x2c @@ -596,6 +599,8 @@ const ( EDESTADDRREQ = syscall.Errno(0x59) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x7a) + EFSBADCRC = syscall.Errno(0x4a) + EFSCORRUPTED = syscall.Errno(0x75) EHOSTDOWN = syscall.Errno(0x70) EHOSTUNREACH = syscall.Errno(0x71) EHWPOISON = syscall.Errno(0x85) @@ -819,7 +824,7 @@ var errorList = [...]struct { {114, "EALREADY", "operation already in progress"}, {115, "EINPROGRESS", "operation now in progress"}, {116, "ESTALE", "stale file handle"}, - {117, "EUCLEAN", "structure needs cleaning"}, + {117, "EFSCORRUPTED", "structure needs cleaning"}, {118, "ENOTNAM", "not a XENIX named type file"}, {119, "ENAVAIL", "no XENIX semaphores available"}, {120, "EISNAM", "is a named type file"}, diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go index a0d6d498c..ff927c830 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go @@ -159,6 +159,7 @@ const ( NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_ID = 0x8008b70d NS_GET_MNTNS_ID = 0x8008b705 NS_GET_NSTYPE = 0xb703 NS_GET_OWNER_UID = 0xb704 @@ -306,6 +307,7 @@ const ( RTC_WKALM_SET = 0x4028700f SCM_DEVMEM_DMABUF = 0x4f SCM_DEVMEM_LINEAR = 0x4e + SCM_INQ = 0x54 SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -353,6 +355,7 @@ const ( SO_ERROR = 0x4 SO_INCOMING_CPU = 0x31 SO_INCOMING_NAPI_ID = 0x38 + SO_INQ = 0x54 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd SO_LOCK_FILTER = 0x2c @@ -596,6 +599,8 @@ const ( EDESTADDRREQ = syscall.Errno(0x59) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x7a) + EFSBADCRC = syscall.Errno(0x4a) + EFSCORRUPTED = syscall.Errno(0x75) EHOSTDOWN = syscall.Errno(0x70) EHOSTUNREACH = syscall.Errno(0x71) EHWPOISON = syscall.Errno(0x85) @@ -819,7 +824,7 @@ var errorList = [...]struct { {114, "EALREADY", "operation already in progress"}, {115, "EINPROGRESS", "operation now in progress"}, {116, "ESTALE", "stale file handle"}, - {117, "EUCLEAN", "structure needs cleaning"}, + {117, "EFSCORRUPTED", "structure needs cleaning"}, {118, "ENOTNAM", "not a XENIX named type file"}, {119, "ENAVAIL", "no XENIX semaphores available"}, {120, "EISNAM", "is a named type file"}, diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go index dd9c903f9..55294eda5 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go @@ -156,6 +156,7 @@ const ( NFDBITS = 0x20 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_ID = 0x8008b70d NS_GET_MNTNS_ID = 0x8008b705 NS_GET_NSTYPE = 0xb703 NS_GET_OWNER_UID = 0xb704 @@ -311,6 +312,7 @@ const ( RTC_WKALM_SET = 0x4028700f SCM_DEVMEM_DMABUF = 0x4f SCM_DEVMEM_LINEAR = 0x4e + SCM_INQ = 0x54 SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -358,6 +360,7 @@ const ( SO_ERROR = 0x4 SO_INCOMING_CPU = 0x31 SO_INCOMING_NAPI_ID = 0x38 + SO_INQ = 0x54 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd SO_LOCK_FILTER = 0x2c @@ -601,6 +604,8 @@ const ( EDESTADDRREQ = syscall.Errno(0x59) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x7a) + EFSBADCRC = syscall.Errno(0x4a) + EFSCORRUPTED = syscall.Errno(0x75) EHOSTDOWN = syscall.Errno(0x70) EHOSTUNREACH = syscall.Errno(0x71) EHWPOISON = syscall.Errno(0x85) @@ -824,7 +829,7 @@ var errorList = [...]struct { {114, "EALREADY", "operation already in progress"}, {115, "EINPROGRESS", "operation now in progress"}, {116, "ESTALE", "stale file handle"}, - {117, "EUCLEAN", "structure needs cleaning"}, + {117, "EFSCORRUPTED", "structure needs cleaning"}, {118, "ENOTNAM", "not a XENIX named type file"}, {119, "ENAVAIL", "no XENIX semaphores available"}, {120, "EISNAM", "is a named type file"}, diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go index 384c61ca3..5dac54c35 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go @@ -161,6 +161,7 @@ const ( NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_ID = 0x8008b70d NS_GET_MNTNS_ID = 0x8008b705 NS_GET_NSTYPE = 0xb703 NS_GET_OWNER_UID = 0xb704 @@ -304,6 +305,7 @@ const ( RTC_WKALM_SET = 0x4028700f SCM_DEVMEM_DMABUF = 0x4f SCM_DEVMEM_LINEAR = 0x4e + SCM_INQ = 0x54 SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -351,6 +353,7 @@ const ( SO_ERROR = 0x4 SO_INCOMING_CPU = 0x31 SO_INCOMING_NAPI_ID = 0x38 + SO_INQ = 0x54 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd SO_LOCK_FILTER = 0x2c @@ -598,6 +601,8 @@ const ( EDESTADDRREQ = syscall.Errno(0x59) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x7a) + EFSBADCRC = syscall.Errno(0x4a) + EFSCORRUPTED = syscall.Errno(0x75) EHOSTDOWN = syscall.Errno(0x70) EHOSTUNREACH = syscall.Errno(0x71) EHWPOISON = syscall.Errno(0x85) @@ -821,7 +826,7 @@ var errorList = [...]struct { {114, "EALREADY", "operation already in progress"}, {115, "EINPROGRESS", "operation now in progress"}, {116, "ESTALE", "stale file handle"}, - {117, "EUCLEAN", "structure needs cleaning"}, + {117, "EFSCORRUPTED", "structure needs cleaning"}, {118, "ENOTNAM", "not a XENIX named type file"}, {119, "ENAVAIL", "no XENIX semaphores available"}, {120, "EISNAM", "is a named type file"}, diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go index 6384c9831..46ac1fcb2 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go @@ -160,6 +160,7 @@ const ( NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_ID = 0x8008b70d NS_GET_MNTNS_ID = 0x8008b705 NS_GET_NSTYPE = 0xb703 NS_GET_OWNER_UID = 0xb704 @@ -298,6 +299,7 @@ const ( RTC_WKALM_SET = 0x4028700f SCM_DEVMEM_DMABUF = 0x4f SCM_DEVMEM_LINEAR = 0x4e + SCM_INQ = 0x54 SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -345,6 +347,7 @@ const ( SO_ERROR = 0x4 SO_INCOMING_CPU = 0x31 SO_INCOMING_NAPI_ID = 0x38 + SO_INQ = 0x54 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd SO_LOCK_FILTER = 0x2c @@ -588,6 +591,8 @@ const ( EDESTADDRREQ = syscall.Errno(0x59) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x7a) + EFSBADCRC = syscall.Errno(0x4a) + EFSCORRUPTED = syscall.Errno(0x75) EHOSTDOWN = syscall.Errno(0x70) EHOSTUNREACH = syscall.Errno(0x71) EHWPOISON = syscall.Errno(0x85) @@ -811,7 +816,7 @@ var errorList = [...]struct { {114, "EALREADY", "operation already in progress"}, {115, "EINPROGRESS", "operation now in progress"}, {116, "ESTALE", "stale file handle"}, - {117, "EUCLEAN", "structure needs cleaning"}, + {117, "EFSCORRUPTED", "structure needs cleaning"}, {118, "ENOTNAM", "not a XENIX named type file"}, {119, "ENAVAIL", "no XENIX semaphores available"}, {120, "EISNAM", "is a named type file"}, diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go index 553c1c6f1..b55483e8a 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go @@ -156,6 +156,7 @@ const ( NFDBITS = 0x20 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_ID = 0x4008b70d NS_GET_MNTNS_ID = 0x4008b705 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 @@ -304,6 +305,7 @@ const ( RTC_WKALM_SET = 0x8028700f SCM_DEVMEM_DMABUF = 0x4f SCM_DEVMEM_LINEAR = 0x4e + SCM_INQ = 0x54 SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -351,6 +353,7 @@ const ( SO_ERROR = 0x1007 SO_INCOMING_CPU = 0x31 SO_INCOMING_NAPI_ID = 0x38 + SO_INQ = 0x54 SO_KEEPALIVE = 0x8 SO_LINGER = 0x80 SO_LOCK_FILTER = 0x2c @@ -597,6 +600,8 @@ const ( EDESTADDRREQ = syscall.Errno(0x60) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x46d) + EFSBADCRC = syscall.Errno(0x4d) + EFSCORRUPTED = syscall.Errno(0x87) EHOSTDOWN = syscall.Errno(0x93) EHOSTUNREACH = syscall.Errno(0x94) EHWPOISON = syscall.Errno(0xa8) @@ -814,7 +819,7 @@ var errorList = [...]struct { {132, "ENOBUFS", "no buffer space available"}, {133, "EISCONN", "transport endpoint is already connected"}, {134, "ENOTCONN", "transport endpoint is not connected"}, - {135, "EUCLEAN", "structure needs cleaning"}, + {135, "EFSCORRUPTED", "structure needs cleaning"}, {137, "ENOTNAM", "not a XENIX named type file"}, {138, "ENAVAIL", "no XENIX semaphores available"}, {139, "EISNAM", "is a named type file"}, diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go index b3339f209..71890c98a 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go @@ -156,6 +156,7 @@ const ( NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_ID = 0x4008b70d NS_GET_MNTNS_ID = 0x4008b705 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 @@ -304,6 +305,7 @@ const ( RTC_WKALM_SET = 0x8028700f SCM_DEVMEM_DMABUF = 0x4f SCM_DEVMEM_LINEAR = 0x4e + SCM_INQ = 0x54 SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -351,6 +353,7 @@ const ( SO_ERROR = 0x1007 SO_INCOMING_CPU = 0x31 SO_INCOMING_NAPI_ID = 0x38 + SO_INQ = 0x54 SO_KEEPALIVE = 0x8 SO_LINGER = 0x80 SO_LOCK_FILTER = 0x2c @@ -597,6 +600,8 @@ const ( EDESTADDRREQ = syscall.Errno(0x60) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x46d) + EFSBADCRC = syscall.Errno(0x4d) + EFSCORRUPTED = syscall.Errno(0x87) EHOSTDOWN = syscall.Errno(0x93) EHOSTUNREACH = syscall.Errno(0x94) EHWPOISON = syscall.Errno(0xa8) @@ -814,7 +819,7 @@ var errorList = [...]struct { {132, "ENOBUFS", "no buffer space available"}, {133, "EISCONN", "transport endpoint is already connected"}, {134, "ENOTCONN", "transport endpoint is not connected"}, - {135, "EUCLEAN", "structure needs cleaning"}, + {135, "EFSCORRUPTED", "structure needs cleaning"}, {137, "ENOTNAM", "not a XENIX named type file"}, {138, "ENAVAIL", "no XENIX semaphores available"}, {139, "EISNAM", "is a named type file"}, diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go index 177091d2b..a78b6cc14 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go @@ -156,6 +156,7 @@ const ( NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_ID = 0x4008b70d NS_GET_MNTNS_ID = 0x4008b705 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 @@ -304,6 +305,7 @@ const ( RTC_WKALM_SET = 0x8028700f SCM_DEVMEM_DMABUF = 0x4f SCM_DEVMEM_LINEAR = 0x4e + SCM_INQ = 0x54 SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -351,6 +353,7 @@ const ( SO_ERROR = 0x1007 SO_INCOMING_CPU = 0x31 SO_INCOMING_NAPI_ID = 0x38 + SO_INQ = 0x54 SO_KEEPALIVE = 0x8 SO_LINGER = 0x80 SO_LOCK_FILTER = 0x2c @@ -597,6 +600,8 @@ const ( EDESTADDRREQ = syscall.Errno(0x60) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x46d) + EFSBADCRC = syscall.Errno(0x4d) + EFSCORRUPTED = syscall.Errno(0x87) EHOSTDOWN = syscall.Errno(0x93) EHOSTUNREACH = syscall.Errno(0x94) EHWPOISON = syscall.Errno(0xa8) @@ -814,7 +819,7 @@ var errorList = [...]struct { {132, "ENOBUFS", "no buffer space available"}, {133, "EISCONN", "transport endpoint is already connected"}, {134, "ENOTCONN", "transport endpoint is not connected"}, - {135, "EUCLEAN", "structure needs cleaning"}, + {135, "EFSCORRUPTED", "structure needs cleaning"}, {137, "ENOTNAM", "not a XENIX named type file"}, {138, "ENAVAIL", "no XENIX semaphores available"}, {139, "EISNAM", "is a named type file"}, diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go index c5abf156d..d0e38ca73 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go @@ -156,6 +156,7 @@ const ( NFDBITS = 0x20 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_ID = 0x4008b70d NS_GET_MNTNS_ID = 0x4008b705 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 @@ -304,6 +305,7 @@ const ( RTC_WKALM_SET = 0x8028700f SCM_DEVMEM_DMABUF = 0x4f SCM_DEVMEM_LINEAR = 0x4e + SCM_INQ = 0x54 SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -351,6 +353,7 @@ const ( SO_ERROR = 0x1007 SO_INCOMING_CPU = 0x31 SO_INCOMING_NAPI_ID = 0x38 + SO_INQ = 0x54 SO_KEEPALIVE = 0x8 SO_LINGER = 0x80 SO_LOCK_FILTER = 0x2c @@ -597,6 +600,8 @@ const ( EDESTADDRREQ = syscall.Errno(0x60) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x46d) + EFSBADCRC = syscall.Errno(0x4d) + EFSCORRUPTED = syscall.Errno(0x87) EHOSTDOWN = syscall.Errno(0x93) EHOSTUNREACH = syscall.Errno(0x94) EHWPOISON = syscall.Errno(0xa8) @@ -814,7 +819,7 @@ var errorList = [...]struct { {132, "ENOBUFS", "no buffer space available"}, {133, "EISCONN", "transport endpoint is already connected"}, {134, "ENOTCONN", "transport endpoint is not connected"}, - {135, "EUCLEAN", "structure needs cleaning"}, + {135, "EFSCORRUPTED", "structure needs cleaning"}, {137, "ENOTNAM", "not a XENIX named type file"}, {138, "ENAVAIL", "no XENIX semaphores available"}, {139, "EISNAM", "is a named type file"}, diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go index f1f3fadf5..c883e14c7 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go @@ -158,6 +158,7 @@ const ( NL3 = 0x300 NLDLY = 0x300 NOFLSH = 0x80000000 + NS_GET_ID = 0x4008b70d NS_GET_MNTNS_ID = 0x4008b705 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 @@ -359,6 +360,7 @@ const ( RTC_WKALM_SET = 0x8028700f SCM_DEVMEM_DMABUF = 0x4f SCM_DEVMEM_LINEAR = 0x4e + SCM_INQ = 0x54 SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -406,6 +408,7 @@ const ( SO_ERROR = 0x4 SO_INCOMING_CPU = 0x31 SO_INCOMING_NAPI_ID = 0x38 + SO_INQ = 0x54 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd SO_LOCK_FILTER = 0x2c @@ -653,6 +656,8 @@ const ( EDESTADDRREQ = syscall.Errno(0x59) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x7a) + EFSBADCRC = syscall.Errno(0x4a) + EFSCORRUPTED = syscall.Errno(0x75) EHOSTDOWN = syscall.Errno(0x70) EHOSTUNREACH = syscall.Errno(0x71) EHWPOISON = syscall.Errno(0x85) @@ -877,7 +882,7 @@ var errorList = [...]struct { {114, "EALREADY", "operation already in progress"}, {115, "EINPROGRESS", "operation now in progress"}, {116, "ESTALE", "stale file handle"}, - {117, "EUCLEAN", "structure needs cleaning"}, + {117, "EFSCORRUPTED", "structure needs cleaning"}, {118, "ENOTNAM", "not a XENIX named type file"}, {119, "ENAVAIL", "no XENIX semaphores available"}, {120, "EISNAM", "is a named type file"}, diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go index 203ad9c54..1834273d4 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go @@ -158,6 +158,7 @@ const ( NL3 = 0x300 NLDLY = 0x300 NOFLSH = 0x80000000 + NS_GET_ID = 0x4008b70d NS_GET_MNTNS_ID = 0x4008b705 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 @@ -363,6 +364,7 @@ const ( RTC_WKALM_SET = 0x8028700f SCM_DEVMEM_DMABUF = 0x4f SCM_DEVMEM_LINEAR = 0x4e + SCM_INQ = 0x54 SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -410,6 +412,7 @@ const ( SO_ERROR = 0x4 SO_INCOMING_CPU = 0x31 SO_INCOMING_NAPI_ID = 0x38 + SO_INQ = 0x54 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd SO_LOCK_FILTER = 0x2c @@ -657,6 +660,8 @@ const ( EDESTADDRREQ = syscall.Errno(0x59) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x7a) + EFSBADCRC = syscall.Errno(0x4a) + EFSCORRUPTED = syscall.Errno(0x75) EHOSTDOWN = syscall.Errno(0x70) EHOSTUNREACH = syscall.Errno(0x71) EHWPOISON = syscall.Errno(0x85) @@ -881,7 +886,7 @@ var errorList = [...]struct { {114, "EALREADY", "operation already in progress"}, {115, "EINPROGRESS", "operation now in progress"}, {116, "ESTALE", "stale file handle"}, - {117, "EUCLEAN", "structure needs cleaning"}, + {117, "EFSCORRUPTED", "structure needs cleaning"}, {118, "ENOTNAM", "not a XENIX named type file"}, {119, "ENAVAIL", "no XENIX semaphores available"}, {120, "EISNAM", "is a named type file"}, diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go index 4b9abcb21..39945dd9a 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go @@ -158,6 +158,7 @@ const ( NL3 = 0x300 NLDLY = 0x300 NOFLSH = 0x80000000 + NS_GET_ID = 0x4008b70d NS_GET_MNTNS_ID = 0x4008b705 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 @@ -363,6 +364,7 @@ const ( RTC_WKALM_SET = 0x8028700f SCM_DEVMEM_DMABUF = 0x4f SCM_DEVMEM_LINEAR = 0x4e + SCM_INQ = 0x54 SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -410,6 +412,7 @@ const ( SO_ERROR = 0x4 SO_INCOMING_CPU = 0x31 SO_INCOMING_NAPI_ID = 0x38 + SO_INQ = 0x54 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd SO_LOCK_FILTER = 0x2c @@ -657,6 +660,8 @@ const ( EDESTADDRREQ = syscall.Errno(0x59) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x7a) + EFSBADCRC = syscall.Errno(0x4a) + EFSCORRUPTED = syscall.Errno(0x75) EHOSTDOWN = syscall.Errno(0x70) EHOSTUNREACH = syscall.Errno(0x71) EHWPOISON = syscall.Errno(0x85) @@ -881,7 +886,7 @@ var errorList = [...]struct { {114, "EALREADY", "operation already in progress"}, {115, "EINPROGRESS", "operation now in progress"}, {116, "ESTALE", "stale file handle"}, - {117, "EUCLEAN", "structure needs cleaning"}, + {117, "EFSCORRUPTED", "structure needs cleaning"}, {118, "ENOTNAM", "not a XENIX named type file"}, {119, "ENAVAIL", "no XENIX semaphores available"}, {120, "EISNAM", "is a named type file"}, diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go index f87983037..bc0f37241 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go @@ -11,553 +11,569 @@ package unix import "syscall" const ( - B1000000 = 0x1008 - B115200 = 0x1002 - B1152000 = 0x1009 - B1500000 = 0x100a - B2000000 = 0x100b - B230400 = 0x1003 - B2500000 = 0x100c - B3000000 = 0x100d - B3500000 = 0x100e - B4000000 = 0x100f - B460800 = 0x1004 - B500000 = 0x1005 - B57600 = 0x1001 - B576000 = 0x1006 - B921600 = 0x1007 - BLKALIGNOFF = 0x127a - BLKBSZGET = 0x80081270 - BLKBSZSET = 0x40081271 - BLKDISCARD = 0x1277 - BLKDISCARDZEROES = 0x127c - BLKFLSBUF = 0x1261 - BLKFRAGET = 0x1265 - BLKFRASET = 0x1264 - BLKGETDISKSEQ = 0x80081280 - BLKGETSIZE = 0x1260 - BLKGETSIZE64 = 0x80081272 - BLKIOMIN = 0x1278 - BLKIOOPT = 0x1279 - BLKPBSZGET = 0x127b - BLKRAGET = 0x1263 - BLKRASET = 0x1262 - BLKROGET = 0x125e - BLKROSET = 0x125d - BLKROTATIONAL = 0x127e - BLKRRPART = 0x125f - BLKSECDISCARD = 0x127d - BLKSECTGET = 0x1267 - BLKSECTSET = 0x1266 - BLKSSZGET = 0x1268 - BLKZEROOUT = 0x127f - BOTHER = 0x1000 - BS1 = 0x2000 - BSDLY = 0x2000 - CBAUD = 0x100f - CBAUDEX = 0x1000 - CIBAUD = 0x100f0000 - CLOCAL = 0x800 - CR1 = 0x200 - CR2 = 0x400 - CR3 = 0x600 - CRDLY = 0x600 - CREAD = 0x80 - CS6 = 0x10 - CS7 = 0x20 - CS8 = 0x30 - CSIZE = 0x30 - CSTOPB = 0x40 - DM_MPATH_PROBE_PATHS = 0xfd12 - ECCGETLAYOUT = 0x81484d11 - ECCGETSTATS = 0x80104d12 - ECHOCTL = 0x200 - ECHOE = 0x10 - ECHOK = 0x20 - ECHOKE = 0x800 - ECHONL = 0x40 - ECHOPRT = 0x400 - EFD_CLOEXEC = 0x80000 - EFD_NONBLOCK = 0x800 - EPIOCGPARAMS = 0x80088a02 - EPIOCSPARAMS = 0x40088a01 - EPOLL_CLOEXEC = 0x80000 - EXTPROC = 0x10000 - FF1 = 0x8000 - FFDLY = 0x8000 - FICLONE = 0x40049409 - FICLONERANGE = 0x4020940d - FLUSHO = 0x1000 - FS_IOC_ENABLE_VERITY = 0x40806685 - FS_IOC_GETFLAGS = 0x80086601 - FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b - FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615 - FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614 - FS_IOC_SETFLAGS = 0x40086602 - FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613 - F_GETLK = 0x5 - F_GETLK64 = 0x5 - F_GETOWN = 0x9 - F_RDLCK = 0x0 - F_SETLK = 0x6 - F_SETLK64 = 0x6 - F_SETLKW = 0x7 - F_SETLKW64 = 0x7 - F_SETOWN = 0x8 - F_UNLCK = 0x2 - F_WRLCK = 0x1 - HIDIOCGRAWINFO = 0x80084803 - HIDIOCGRDESC = 0x90044802 - HIDIOCGRDESCSIZE = 0x80044801 - HIDIOCREVOKE = 0x4004480d - HUPCL = 0x400 - ICANON = 0x2 - IEXTEN = 0x8000 - IN_CLOEXEC = 0x80000 - IN_NONBLOCK = 0x800 - IOCTL_MEI_NOTIFY_GET = 0x80044803 - IOCTL_MEI_NOTIFY_SET = 0x40044802 - IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 - IPV6_FLOWINFO_MASK = 0xffffff0f - IPV6_FLOWLABEL_MASK = 0xffff0f00 - ISIG = 0x1 - IUCLC = 0x200 - IXOFF = 0x1000 - IXON = 0x400 - MAP_ANON = 0x20 - MAP_ANONYMOUS = 0x20 - MAP_DENYWRITE = 0x800 - MAP_EXECUTABLE = 0x1000 - MAP_GROWSDOWN = 0x100 - MAP_HUGETLB = 0x40000 - MAP_LOCKED = 0x2000 - MAP_NONBLOCK = 0x10000 - MAP_NORESERVE = 0x4000 - MAP_POPULATE = 0x8000 - MAP_STACK = 0x20000 - MAP_SYNC = 0x80000 - MCL_CURRENT = 0x1 - MCL_FUTURE = 0x2 - MCL_ONFAULT = 0x4 - MEMERASE = 0x40084d02 - MEMERASE64 = 0x40104d14 - MEMGETBADBLOCK = 0x40084d0b - MEMGETINFO = 0x80204d01 - MEMGETOOBSEL = 0x80c84d0a - MEMGETREGIONCOUNT = 0x80044d07 - MEMISLOCKED = 0x80084d17 - MEMLOCK = 0x40084d05 - MEMREAD = 0xc0404d1a - MEMREADOOB = 0xc0104d04 - MEMSETBADBLOCK = 0x40084d0c - MEMUNLOCK = 0x40084d06 - MEMWRITEOOB = 0xc0104d03 - MTDFILEMODE = 0x4d13 - NFDBITS = 0x40 - NLDLY = 0x100 - NOFLSH = 0x80 - NS_GET_MNTNS_ID = 0x8008b705 - NS_GET_NSTYPE = 0xb703 - NS_GET_OWNER_UID = 0xb704 - NS_GET_PARENT = 0xb702 - NS_GET_PID_FROM_PIDNS = 0x8004b706 - NS_GET_PID_IN_PIDNS = 0x8004b708 - NS_GET_TGID_FROM_PIDNS = 0x8004b707 - NS_GET_TGID_IN_PIDNS = 0x8004b709 - NS_GET_USERNS = 0xb701 - OLCUC = 0x2 - ONLCR = 0x4 - OTPERASE = 0x400c4d19 - OTPGETREGIONCOUNT = 0x40044d0e - OTPGETREGIONINFO = 0x400c4d0f - OTPLOCK = 0x800c4d10 - OTPSELECT = 0x80044d0d - O_APPEND = 0x400 - O_ASYNC = 0x2000 - O_CLOEXEC = 0x80000 - O_CREAT = 0x40 - O_DIRECT = 0x4000 - O_DIRECTORY = 0x10000 - O_DSYNC = 0x1000 - O_EXCL = 0x80 - O_FSYNC = 0x101000 - O_LARGEFILE = 0x0 - O_NDELAY = 0x800 - O_NOATIME = 0x40000 - O_NOCTTY = 0x100 - O_NOFOLLOW = 0x20000 - O_NONBLOCK = 0x800 - O_PATH = 0x200000 - O_RSYNC = 0x101000 - O_SYNC = 0x101000 - O_TMPFILE = 0x410000 - O_TRUNC = 0x200 - PARENB = 0x100 - PARODD = 0x200 - PENDIN = 0x4000 - PERF_EVENT_IOC_DISABLE = 0x2401 - PERF_EVENT_IOC_ENABLE = 0x2400 - PERF_EVENT_IOC_ID = 0x80082407 - PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b - PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409 - PERF_EVENT_IOC_PERIOD = 0x40082404 - PERF_EVENT_IOC_QUERY_BPF = 0xc008240a - PERF_EVENT_IOC_REFRESH = 0x2402 - PERF_EVENT_IOC_RESET = 0x2403 - PERF_EVENT_IOC_SET_BPF = 0x40042408 - PERF_EVENT_IOC_SET_FILTER = 0x40082406 - PERF_EVENT_IOC_SET_OUTPUT = 0x2405 - PPPIOCATTACH = 0x4004743d - PPPIOCATTCHAN = 0x40047438 - PPPIOCBRIDGECHAN = 0x40047435 - PPPIOCCONNECT = 0x4004743a - PPPIOCDETACH = 0x4004743c - PPPIOCDISCONN = 0x7439 - PPPIOCGASYNCMAP = 0x80047458 - PPPIOCGCHAN = 0x80047437 - PPPIOCGDEBUG = 0x80047441 - PPPIOCGFLAGS = 0x8004745a - PPPIOCGIDLE = 0x8010743f - PPPIOCGIDLE32 = 0x8008743f - PPPIOCGIDLE64 = 0x8010743f - PPPIOCGL2TPSTATS = 0x80487436 - PPPIOCGMRU = 0x80047453 - PPPIOCGRASYNCMAP = 0x80047455 - PPPIOCGUNIT = 0x80047456 - PPPIOCGXASYNCMAP = 0x80207450 - PPPIOCSACTIVE = 0x40107446 - PPPIOCSASYNCMAP = 0x40047457 - PPPIOCSCOMPRESS = 0x4010744d - PPPIOCSDEBUG = 0x40047440 - PPPIOCSFLAGS = 0x40047459 - PPPIOCSMAXCID = 0x40047451 - PPPIOCSMRRU = 0x4004743b - PPPIOCSMRU = 0x40047452 - PPPIOCSNPMODE = 0x4008744b - PPPIOCSPASS = 0x40107447 - PPPIOCSRASYNCMAP = 0x40047454 - PPPIOCSXASYNCMAP = 0x4020744f - PPPIOCUNBRIDGECHAN = 0x7434 - PPPIOCXFERUNIT = 0x744e - PR_SET_PTRACER_ANY = 0xffffffffffffffff - PTP_CLOCK_GETCAPS = 0x80503d01 - PTP_CLOCK_GETCAPS2 = 0x80503d0a - PTP_ENABLE_PPS = 0x40043d04 - PTP_ENABLE_PPS2 = 0x40043d0d - PTP_EXTTS_REQUEST = 0x40103d02 - PTP_EXTTS_REQUEST2 = 0x40103d0b - PTP_MASK_CLEAR_ALL = 0x3d13 - PTP_MASK_EN_SINGLE = 0x40043d14 - PTP_PEROUT_REQUEST = 0x40383d03 - PTP_PEROUT_REQUEST2 = 0x40383d0c - PTP_PIN_SETFUNC = 0x40603d07 - PTP_PIN_SETFUNC2 = 0x40603d10 - PTP_SYS_OFFSET = 0x43403d05 - PTP_SYS_OFFSET2 = 0x43403d0e - PTRACE_GETFDPIC = 0x21 - PTRACE_GETFDPIC_EXEC = 0x0 - PTRACE_GETFDPIC_INTERP = 0x1 - RLIMIT_AS = 0x9 - RLIMIT_MEMLOCK = 0x8 - RLIMIT_NOFILE = 0x7 - RLIMIT_NPROC = 0x6 - RLIMIT_RSS = 0x5 - RNDADDENTROPY = 0x40085203 - RNDADDTOENTCNT = 0x40045201 - RNDCLEARPOOL = 0x5206 - RNDGETENTCNT = 0x80045200 - RNDGETPOOL = 0x80085202 - RNDRESEEDCRNG = 0x5207 - RNDZAPENTCNT = 0x5204 - RTC_AIE_OFF = 0x7002 - RTC_AIE_ON = 0x7001 - RTC_ALM_READ = 0x80247008 - RTC_ALM_SET = 0x40247007 - RTC_EPOCH_READ = 0x8008700d - RTC_EPOCH_SET = 0x4008700e - RTC_IRQP_READ = 0x8008700b - RTC_IRQP_SET = 0x4008700c - RTC_PARAM_GET = 0x40187013 - RTC_PARAM_SET = 0x40187014 - RTC_PIE_OFF = 0x7006 - RTC_PIE_ON = 0x7005 - RTC_PLL_GET = 0x80207011 - RTC_PLL_SET = 0x40207012 - RTC_RD_TIME = 0x80247009 - RTC_SET_TIME = 0x4024700a - RTC_UIE_OFF = 0x7004 - RTC_UIE_ON = 0x7003 - RTC_VL_CLR = 0x7014 - RTC_VL_READ = 0x80047013 - RTC_WIE_OFF = 0x7010 - RTC_WIE_ON = 0x700f - RTC_WKALM_RD = 0x80287010 - RTC_WKALM_SET = 0x4028700f - SCM_DEVMEM_DMABUF = 0x4f - SCM_DEVMEM_LINEAR = 0x4e - SCM_TIMESTAMPING = 0x25 - SCM_TIMESTAMPING_OPT_STATS = 0x36 - SCM_TIMESTAMPING_PKTINFO = 0x3a - SCM_TIMESTAMPNS = 0x23 - SCM_TS_OPT_ID = 0x51 - SCM_TXTIME = 0x3d - SCM_WIFI_STATUS = 0x29 - SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103 - SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102 - SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104 - SFD_CLOEXEC = 0x80000 - SFD_NONBLOCK = 0x800 - SIOCATMARK = 0x8905 - SIOCGPGRP = 0x8904 - SIOCGSTAMPNS_NEW = 0x80108907 - SIOCGSTAMP_NEW = 0x80108906 - SIOCINQ = 0x541b - SIOCOUTQ = 0x5411 - SIOCSPGRP = 0x8902 - SOCK_CLOEXEC = 0x80000 - SOCK_DGRAM = 0x2 - SOCK_NONBLOCK = 0x800 - SOCK_STREAM = 0x1 - SOL_SOCKET = 0x1 - SO_ACCEPTCONN = 0x1e - SO_ATTACH_BPF = 0x32 - SO_ATTACH_REUSEPORT_CBPF = 0x33 - SO_ATTACH_REUSEPORT_EBPF = 0x34 - SO_BINDTODEVICE = 0x19 - SO_BINDTOIFINDEX = 0x3e - SO_BPF_EXTENSIONS = 0x30 - SO_BROADCAST = 0x6 - SO_BSDCOMPAT = 0xe - SO_BUF_LOCK = 0x48 - SO_BUSY_POLL = 0x2e - SO_BUSY_POLL_BUDGET = 0x46 - SO_CNX_ADVICE = 0x35 - SO_COOKIE = 0x39 - SO_DETACH_REUSEPORT_BPF = 0x44 - SO_DEVMEM_DMABUF = 0x4f - SO_DEVMEM_DONTNEED = 0x50 - SO_DEVMEM_LINEAR = 0x4e - SO_DOMAIN = 0x27 - SO_DONTROUTE = 0x5 - SO_ERROR = 0x4 - SO_INCOMING_CPU = 0x31 - SO_INCOMING_NAPI_ID = 0x38 - SO_KEEPALIVE = 0x9 - SO_LINGER = 0xd - SO_LOCK_FILTER = 0x2c - SO_MARK = 0x24 - SO_MAX_PACING_RATE = 0x2f - SO_MEMINFO = 0x37 - SO_NETNS_COOKIE = 0x47 - SO_NOFCS = 0x2b - SO_OOBINLINE = 0xa - SO_PASSCRED = 0x10 - SO_PASSPIDFD = 0x4c - SO_PASSRIGHTS = 0x53 - SO_PASSSEC = 0x22 - SO_PEEK_OFF = 0x2a - SO_PEERCRED = 0x11 - SO_PEERGROUPS = 0x3b - SO_PEERPIDFD = 0x4d - SO_PEERSEC = 0x1f - SO_PREFER_BUSY_POLL = 0x45 - SO_PROTOCOL = 0x26 - SO_RCVBUF = 0x8 - SO_RCVBUFFORCE = 0x21 - SO_RCVLOWAT = 0x12 - SO_RCVMARK = 0x4b - SO_RCVPRIORITY = 0x52 - SO_RCVTIMEO = 0x14 - SO_RCVTIMEO_NEW = 0x42 - SO_RCVTIMEO_OLD = 0x14 - SO_RESERVE_MEM = 0x49 - SO_REUSEADDR = 0x2 - SO_REUSEPORT = 0xf - SO_RXQ_OVFL = 0x28 - SO_SECURITY_AUTHENTICATION = 0x16 - SO_SECURITY_ENCRYPTION_NETWORK = 0x18 - SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 - SO_SELECT_ERR_QUEUE = 0x2d - SO_SNDBUF = 0x7 - SO_SNDBUFFORCE = 0x20 - SO_SNDLOWAT = 0x13 - SO_SNDTIMEO = 0x15 - SO_SNDTIMEO_NEW = 0x43 - SO_SNDTIMEO_OLD = 0x15 - SO_TIMESTAMPING = 0x25 - SO_TIMESTAMPING_NEW = 0x41 - SO_TIMESTAMPING_OLD = 0x25 - SO_TIMESTAMPNS = 0x23 - SO_TIMESTAMPNS_NEW = 0x40 - SO_TIMESTAMPNS_OLD = 0x23 - SO_TIMESTAMP_NEW = 0x3f - SO_TXREHASH = 0x4a - SO_TXTIME = 0x3d - SO_TYPE = 0x3 - SO_WIFI_STATUS = 0x29 - SO_ZEROCOPY = 0x3c - TAB1 = 0x800 - TAB2 = 0x1000 - TAB3 = 0x1800 - TABDLY = 0x1800 - TCFLSH = 0x540b - TCGETA = 0x5405 - TCGETS = 0x5401 - TCGETS2 = 0x802c542a - TCGETX = 0x5432 - TCSAFLUSH = 0x2 - TCSBRK = 0x5409 - TCSBRKP = 0x5425 - TCSETA = 0x5406 - TCSETAF = 0x5408 - TCSETAW = 0x5407 - TCSETS = 0x5402 - TCSETS2 = 0x402c542b - TCSETSF = 0x5404 - TCSETSF2 = 0x402c542d - TCSETSW = 0x5403 - TCSETSW2 = 0x402c542c - TCSETX = 0x5433 - TCSETXF = 0x5434 - TCSETXW = 0x5435 - TCXONC = 0x540a - TFD_CLOEXEC = 0x80000 - TFD_NONBLOCK = 0x800 - TIOCCBRK = 0x5428 - TIOCCONS = 0x541d - TIOCEXCL = 0x540c - TIOCGDEV = 0x80045432 - TIOCGETD = 0x5424 - TIOCGEXCL = 0x80045440 - TIOCGICOUNT = 0x545d - TIOCGISO7816 = 0x80285442 - TIOCGLCKTRMIOS = 0x5456 - TIOCGPGRP = 0x540f - TIOCGPKT = 0x80045438 - TIOCGPTLCK = 0x80045439 - TIOCGPTN = 0x80045430 - TIOCGPTPEER = 0x5441 - TIOCGRS485 = 0x542e - TIOCGSERIAL = 0x541e - TIOCGSID = 0x5429 - TIOCGSOFTCAR = 0x5419 - TIOCGWINSZ = 0x5413 - TIOCINQ = 0x541b - TIOCLINUX = 0x541c - TIOCMBIC = 0x5417 - TIOCMBIS = 0x5416 - TIOCMGET = 0x5415 - TIOCMIWAIT = 0x545c - TIOCMSET = 0x5418 - TIOCM_CAR = 0x40 - TIOCM_CD = 0x40 - TIOCM_CTS = 0x20 - TIOCM_DSR = 0x100 - TIOCM_RI = 0x80 - TIOCM_RNG = 0x80 - TIOCM_SR = 0x10 - TIOCM_ST = 0x8 - TIOCNOTTY = 0x5422 - TIOCNXCL = 0x540d - TIOCOUTQ = 0x5411 - TIOCPKT = 0x5420 - TIOCSBRK = 0x5427 - TIOCSCTTY = 0x540e - TIOCSERCONFIG = 0x5453 - TIOCSERGETLSR = 0x5459 - TIOCSERGETMULTI = 0x545a - TIOCSERGSTRUCT = 0x5458 - TIOCSERGWILD = 0x5454 - TIOCSERSETMULTI = 0x545b - TIOCSERSWILD = 0x5455 - TIOCSER_TEMT = 0x1 - TIOCSETD = 0x5423 - TIOCSIG = 0x40045436 - TIOCSISO7816 = 0xc0285443 - TIOCSLCKTRMIOS = 0x5457 - TIOCSPGRP = 0x5410 - TIOCSPTLCK = 0x40045431 - TIOCSRS485 = 0x542f - TIOCSSERIAL = 0x541f - TIOCSSOFTCAR = 0x541a - TIOCSTI = 0x5412 - TIOCSWINSZ = 0x5414 - TIOCVHANGUP = 0x5437 - TOSTOP = 0x100 - TUNATTACHFILTER = 0x401054d5 - TUNDETACHFILTER = 0x401054d6 - TUNGETDEVNETNS = 0x54e3 - TUNGETFEATURES = 0x800454cf - TUNGETFILTER = 0x801054db - TUNGETIFF = 0x800454d2 - TUNGETSNDBUF = 0x800454d3 - TUNGETVNETBE = 0x800454df - TUNGETVNETHDRSZ = 0x800454d7 - TUNGETVNETLE = 0x800454dd - TUNSETCARRIER = 0x400454e2 - TUNSETDEBUG = 0x400454c9 - TUNSETFILTEREBPF = 0x800454e1 - TUNSETGROUP = 0x400454ce - TUNSETIFF = 0x400454ca - TUNSETIFINDEX = 0x400454da - TUNSETLINK = 0x400454cd - TUNSETNOCSUM = 0x400454c8 - TUNSETOFFLOAD = 0x400454d0 - TUNSETOWNER = 0x400454cc - TUNSETPERSIST = 0x400454cb - TUNSETQUEUE = 0x400454d9 - TUNSETSNDBUF = 0x400454d4 - TUNSETSTEERINGEBPF = 0x800454e0 - TUNSETTXFILTER = 0x400454d1 - TUNSETVNETBE = 0x400454de - TUNSETVNETHDRSZ = 0x400454d8 - TUNSETVNETLE = 0x400454dc - UBI_IOCATT = 0x40186f40 - UBI_IOCDET = 0x40046f41 - UBI_IOCEBCH = 0x40044f02 - UBI_IOCEBER = 0x40044f01 - UBI_IOCEBISMAP = 0x80044f05 - UBI_IOCEBMAP = 0x40084f03 - UBI_IOCEBUNMAP = 0x40044f04 - UBI_IOCMKVOL = 0x40986f00 - UBI_IOCRMVOL = 0x40046f01 - UBI_IOCRNVOL = 0x51106f03 - UBI_IOCRPEB = 0x40046f04 - UBI_IOCRSVOL = 0x400c6f02 - UBI_IOCSETVOLPROP = 0x40104f06 - UBI_IOCSPEB = 0x40046f05 - UBI_IOCVOLCRBLK = 0x40804f07 - UBI_IOCVOLRMBLK = 0x4f08 - UBI_IOCVOLUP = 0x40084f00 - VDISCARD = 0xd - VEOF = 0x4 - VEOL = 0xb - VEOL2 = 0x10 - VMIN = 0x6 - VREPRINT = 0xc - VSTART = 0x8 - VSTOP = 0x9 - VSUSP = 0xa - VSWTC = 0x7 - VT1 = 0x4000 - VTDLY = 0x4000 - VTIME = 0x5 - VWERASE = 0xe - WDIOC_GETBOOTSTATUS = 0x80045702 - WDIOC_GETPRETIMEOUT = 0x80045709 - WDIOC_GETSTATUS = 0x80045701 - WDIOC_GETSUPPORT = 0x80285700 - WDIOC_GETTEMP = 0x80045703 - WDIOC_GETTIMELEFT = 0x8004570a - WDIOC_GETTIMEOUT = 0x80045707 - WDIOC_KEEPALIVE = 0x80045705 - WDIOC_SETOPTIONS = 0x80045704 - WORDSIZE = 0x40 - XCASE = 0x4 - XTABS = 0x1800 - _HIDIOCGRAWNAME = 0x80804804 - _HIDIOCGRAWPHYS = 0x80404805 - _HIDIOCGRAWUNIQ = 0x80404808 + B1000000 = 0x1008 + B115200 = 0x1002 + B1152000 = 0x1009 + B1500000 = 0x100a + B2000000 = 0x100b + B230400 = 0x1003 + B2500000 = 0x100c + B3000000 = 0x100d + B3500000 = 0x100e + B4000000 = 0x100f + B460800 = 0x1004 + B500000 = 0x1005 + B57600 = 0x1001 + B576000 = 0x1006 + B921600 = 0x1007 + BLKALIGNOFF = 0x127a + BLKBSZGET = 0x80081270 + BLKBSZSET = 0x40081271 + BLKDISCARD = 0x1277 + BLKDISCARDZEROES = 0x127c + BLKFLSBUF = 0x1261 + BLKFRAGET = 0x1265 + BLKFRASET = 0x1264 + BLKGETDISKSEQ = 0x80081280 + BLKGETSIZE = 0x1260 + BLKGETSIZE64 = 0x80081272 + BLKIOMIN = 0x1278 + BLKIOOPT = 0x1279 + BLKPBSZGET = 0x127b + BLKRAGET = 0x1263 + BLKRASET = 0x1262 + BLKROGET = 0x125e + BLKROSET = 0x125d + BLKROTATIONAL = 0x127e + BLKRRPART = 0x125f + BLKSECDISCARD = 0x127d + BLKSECTGET = 0x1267 + BLKSECTSET = 0x1266 + BLKSSZGET = 0x1268 + BLKZEROOUT = 0x127f + BOTHER = 0x1000 + BS1 = 0x2000 + BSDLY = 0x2000 + CBAUD = 0x100f + CBAUDEX = 0x1000 + CIBAUD = 0x100f0000 + CLOCAL = 0x800 + CR1 = 0x200 + CR2 = 0x400 + CR3 = 0x600 + CRDLY = 0x600 + CREAD = 0x80 + CS6 = 0x10 + CS7 = 0x20 + CS8 = 0x30 + CSIZE = 0x30 + CSTOPB = 0x40 + DM_MPATH_PROBE_PATHS = 0xfd12 + ECCGETLAYOUT = 0x81484d11 + ECCGETSTATS = 0x80104d12 + ECHOCTL = 0x200 + ECHOE = 0x10 + ECHOK = 0x20 + ECHOKE = 0x800 + ECHONL = 0x40 + ECHOPRT = 0x400 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x800 + EPIOCGPARAMS = 0x80088a02 + EPIOCSPARAMS = 0x40088a01 + EPOLL_CLOEXEC = 0x80000 + EXTPROC = 0x10000 + FF1 = 0x8000 + FFDLY = 0x8000 + FICLONE = 0x40049409 + FICLONERANGE = 0x4020940d + FLUSHO = 0x1000 + FS_IOC_ENABLE_VERITY = 0x40806685 + FS_IOC_GETFLAGS = 0x80086601 + FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b + FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615 + FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614 + FS_IOC_SETFLAGS = 0x40086602 + FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613 + F_GETLK = 0x5 + F_GETLK64 = 0x5 + F_GETOWN = 0x9 + F_RDLCK = 0x0 + F_SETLK = 0x6 + F_SETLK64 = 0x6 + F_SETLKW = 0x7 + F_SETLKW64 = 0x7 + F_SETOWN = 0x8 + F_UNLCK = 0x2 + F_WRLCK = 0x1 + HIDIOCGRAWINFO = 0x80084803 + HIDIOCGRDESC = 0x90044802 + HIDIOCGRDESCSIZE = 0x80044801 + HIDIOCREVOKE = 0x4004480d + HUPCL = 0x400 + ICANON = 0x2 + IEXTEN = 0x8000 + IN_CLOEXEC = 0x80000 + IN_NONBLOCK = 0x800 + IOCTL_MEI_NOTIFY_GET = 0x80044803 + IOCTL_MEI_NOTIFY_SET = 0x40044802 + IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 + IPV6_FLOWINFO_MASK = 0xffffff0f + IPV6_FLOWLABEL_MASK = 0xffff0f00 + ISIG = 0x1 + IUCLC = 0x200 + IXOFF = 0x1000 + IXON = 0x400 + MAP_ANON = 0x20 + MAP_ANONYMOUS = 0x20 + MAP_DENYWRITE = 0x800 + MAP_EXECUTABLE = 0x1000 + MAP_GROWSDOWN = 0x100 + MAP_HUGETLB = 0x40000 + MAP_LOCKED = 0x2000 + MAP_NONBLOCK = 0x10000 + MAP_NORESERVE = 0x4000 + MAP_POPULATE = 0x8000 + MAP_STACK = 0x20000 + MAP_SYNC = 0x80000 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MCL_ONFAULT = 0x4 + MEMERASE = 0x40084d02 + MEMERASE64 = 0x40104d14 + MEMGETBADBLOCK = 0x40084d0b + MEMGETINFO = 0x80204d01 + MEMGETOOBSEL = 0x80c84d0a + MEMGETREGIONCOUNT = 0x80044d07 + MEMISLOCKED = 0x80084d17 + MEMLOCK = 0x40084d05 + MEMREAD = 0xc0404d1a + MEMREADOOB = 0xc0104d04 + MEMSETBADBLOCK = 0x40084d0c + MEMUNLOCK = 0x40084d06 + MEMWRITEOOB = 0xc0104d03 + MTDFILEMODE = 0x4d13 + NFDBITS = 0x40 + NLDLY = 0x100 + NOFLSH = 0x80 + NS_GET_ID = 0x8008b70d + NS_GET_MNTNS_ID = 0x8008b705 + NS_GET_NSTYPE = 0xb703 + NS_GET_OWNER_UID = 0xb704 + NS_GET_PARENT = 0xb702 + NS_GET_PID_FROM_PIDNS = 0x8004b706 + NS_GET_PID_IN_PIDNS = 0x8004b708 + NS_GET_TGID_FROM_PIDNS = 0x8004b707 + NS_GET_TGID_IN_PIDNS = 0x8004b709 + NS_GET_USERNS = 0xb701 + OLCUC = 0x2 + ONLCR = 0x4 + OTPERASE = 0x400c4d19 + OTPGETREGIONCOUNT = 0x40044d0e + OTPGETREGIONINFO = 0x400c4d0f + OTPLOCK = 0x800c4d10 + OTPSELECT = 0x80044d0d + O_APPEND = 0x400 + O_ASYNC = 0x2000 + O_CLOEXEC = 0x80000 + O_CREAT = 0x40 + O_DIRECT = 0x4000 + O_DIRECTORY = 0x10000 + O_DSYNC = 0x1000 + O_EXCL = 0x80 + O_FSYNC = 0x101000 + O_LARGEFILE = 0x0 + O_NDELAY = 0x800 + O_NOATIME = 0x40000 + O_NOCTTY = 0x100 + O_NOFOLLOW = 0x20000 + O_NONBLOCK = 0x800 + O_PATH = 0x200000 + O_RSYNC = 0x101000 + O_SYNC = 0x101000 + O_TMPFILE = 0x410000 + O_TRUNC = 0x200 + PARENB = 0x100 + PARODD = 0x200 + PENDIN = 0x4000 + PERF_EVENT_IOC_DISABLE = 0x2401 + PERF_EVENT_IOC_ENABLE = 0x2400 + PERF_EVENT_IOC_ID = 0x80082407 + PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b + PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409 + PERF_EVENT_IOC_PERIOD = 0x40082404 + PERF_EVENT_IOC_QUERY_BPF = 0xc008240a + PERF_EVENT_IOC_REFRESH = 0x2402 + PERF_EVENT_IOC_RESET = 0x2403 + PERF_EVENT_IOC_SET_BPF = 0x40042408 + PERF_EVENT_IOC_SET_FILTER = 0x40082406 + PERF_EVENT_IOC_SET_OUTPUT = 0x2405 + PPPIOCATTACH = 0x4004743d + PPPIOCATTCHAN = 0x40047438 + PPPIOCBRIDGECHAN = 0x40047435 + PPPIOCCONNECT = 0x4004743a + PPPIOCDETACH = 0x4004743c + PPPIOCDISCONN = 0x7439 + PPPIOCGASYNCMAP = 0x80047458 + PPPIOCGCHAN = 0x80047437 + PPPIOCGDEBUG = 0x80047441 + PPPIOCGFLAGS = 0x8004745a + PPPIOCGIDLE = 0x8010743f + PPPIOCGIDLE32 = 0x8008743f + PPPIOCGIDLE64 = 0x8010743f + PPPIOCGL2TPSTATS = 0x80487436 + PPPIOCGMRU = 0x80047453 + PPPIOCGRASYNCMAP = 0x80047455 + PPPIOCGUNIT = 0x80047456 + PPPIOCGXASYNCMAP = 0x80207450 + PPPIOCSACTIVE = 0x40107446 + PPPIOCSASYNCMAP = 0x40047457 + PPPIOCSCOMPRESS = 0x4010744d + PPPIOCSDEBUG = 0x40047440 + PPPIOCSFLAGS = 0x40047459 + PPPIOCSMAXCID = 0x40047451 + PPPIOCSMRRU = 0x4004743b + PPPIOCSMRU = 0x40047452 + PPPIOCSNPMODE = 0x4008744b + PPPIOCSPASS = 0x40107447 + PPPIOCSRASYNCMAP = 0x40047454 + PPPIOCSXASYNCMAP = 0x4020744f + PPPIOCUNBRIDGECHAN = 0x7434 + PPPIOCXFERUNIT = 0x744e + PR_SET_PTRACER_ANY = 0xffffffffffffffff + PTP_CLOCK_GETCAPS = 0x80503d01 + PTP_CLOCK_GETCAPS2 = 0x80503d0a + PTP_ENABLE_PPS = 0x40043d04 + PTP_ENABLE_PPS2 = 0x40043d0d + PTP_EXTTS_REQUEST = 0x40103d02 + PTP_EXTTS_REQUEST2 = 0x40103d0b + PTP_MASK_CLEAR_ALL = 0x3d13 + PTP_MASK_EN_SINGLE = 0x40043d14 + PTP_PEROUT_REQUEST = 0x40383d03 + PTP_PEROUT_REQUEST2 = 0x40383d0c + PTP_PIN_SETFUNC = 0x40603d07 + PTP_PIN_SETFUNC2 = 0x40603d10 + PTP_SYS_OFFSET = 0x43403d05 + PTP_SYS_OFFSET2 = 0x43403d0e + PTRACE_CFI_BRANCH_EXPECTED_LANDING_PAD_BIT = 0x2 + PTRACE_CFI_BRANCH_EXPECTED_LANDING_PAD_STATE = 0x4 + PTRACE_CFI_BRANCH_LANDING_PAD_EN_BIT = 0x0 + PTRACE_CFI_BRANCH_LANDING_PAD_EN_STATE = 0x1 + PTRACE_CFI_BRANCH_LANDING_PAD_LOCK_BIT = 0x1 + PTRACE_CFI_BRANCH_LANDING_PAD_LOCK_STATE = 0x2 + PTRACE_CFI_SHADOW_STACK_EN_BIT = 0x3 + PTRACE_CFI_SHADOW_STACK_EN_STATE = 0x8 + PTRACE_CFI_SHADOW_STACK_LOCK_BIT = 0x4 + PTRACE_CFI_SHADOW_STACK_LOCK_STATE = 0x10 + PTRACE_CFI_SHADOW_STACK_PTR_BIT = 0x5 + PTRACE_CFI_SHADOW_STACK_PTR_STATE = 0x20 + PTRACE_CFI_STATE_INVALID_MASK = 0xffffffffffffffc0 + PTRACE_GETFDPIC = 0x21 + PTRACE_GETFDPIC_EXEC = 0x0 + PTRACE_GETFDPIC_INTERP = 0x1 + RLIMIT_AS = 0x9 + RLIMIT_MEMLOCK = 0x8 + RLIMIT_NOFILE = 0x7 + RLIMIT_NPROC = 0x6 + RLIMIT_RSS = 0x5 + RNDADDENTROPY = 0x40085203 + RNDADDTOENTCNT = 0x40045201 + RNDCLEARPOOL = 0x5206 + RNDGETENTCNT = 0x80045200 + RNDGETPOOL = 0x80085202 + RNDRESEEDCRNG = 0x5207 + RNDZAPENTCNT = 0x5204 + RTC_AIE_OFF = 0x7002 + RTC_AIE_ON = 0x7001 + RTC_ALM_READ = 0x80247008 + RTC_ALM_SET = 0x40247007 + RTC_EPOCH_READ = 0x8008700d + RTC_EPOCH_SET = 0x4008700e + RTC_IRQP_READ = 0x8008700b + RTC_IRQP_SET = 0x4008700c + RTC_PARAM_GET = 0x40187013 + RTC_PARAM_SET = 0x40187014 + RTC_PIE_OFF = 0x7006 + RTC_PIE_ON = 0x7005 + RTC_PLL_GET = 0x80207011 + RTC_PLL_SET = 0x40207012 + RTC_RD_TIME = 0x80247009 + RTC_SET_TIME = 0x4024700a + RTC_UIE_OFF = 0x7004 + RTC_UIE_ON = 0x7003 + RTC_VL_CLR = 0x7014 + RTC_VL_READ = 0x80047013 + RTC_WIE_OFF = 0x7010 + RTC_WIE_ON = 0x700f + RTC_WKALM_RD = 0x80287010 + RTC_WKALM_SET = 0x4028700f + SCM_DEVMEM_DMABUF = 0x4f + SCM_DEVMEM_LINEAR = 0x4e + SCM_INQ = 0x54 + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a + SCM_TIMESTAMPNS = 0x23 + SCM_TS_OPT_ID = 0x51 + SCM_TXTIME = 0x3d + SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104 + SFD_CLOEXEC = 0x80000 + SFD_NONBLOCK = 0x800 + SIOCATMARK = 0x8905 + SIOCGPGRP = 0x8904 + SIOCGSTAMPNS_NEW = 0x80108907 + SIOCGSTAMP_NEW = 0x80108906 + SIOCINQ = 0x541b + SIOCOUTQ = 0x5411 + SIOCSPGRP = 0x8902 + SOCK_CLOEXEC = 0x80000 + SOCK_DGRAM = 0x2 + SOCK_NONBLOCK = 0x800 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0x1 + SO_ACCEPTCONN = 0x1e + SO_ATTACH_BPF = 0x32 + SO_ATTACH_REUSEPORT_CBPF = 0x33 + SO_ATTACH_REUSEPORT_EBPF = 0x34 + SO_BINDTODEVICE = 0x19 + SO_BINDTOIFINDEX = 0x3e + SO_BPF_EXTENSIONS = 0x30 + SO_BROADCAST = 0x6 + SO_BSDCOMPAT = 0xe + SO_BUF_LOCK = 0x48 + SO_BUSY_POLL = 0x2e + SO_BUSY_POLL_BUDGET = 0x46 + SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 + SO_DETACH_REUSEPORT_BPF = 0x44 + SO_DEVMEM_DMABUF = 0x4f + SO_DEVMEM_DONTNEED = 0x50 + SO_DEVMEM_LINEAR = 0x4e + SO_DOMAIN = 0x27 + SO_DONTROUTE = 0x5 + SO_ERROR = 0x4 + SO_INCOMING_CPU = 0x31 + SO_INCOMING_NAPI_ID = 0x38 + SO_INQ = 0x54 + SO_KEEPALIVE = 0x9 + SO_LINGER = 0xd + SO_LOCK_FILTER = 0x2c + SO_MARK = 0x24 + SO_MAX_PACING_RATE = 0x2f + SO_MEMINFO = 0x37 + SO_NETNS_COOKIE = 0x47 + SO_NOFCS = 0x2b + SO_OOBINLINE = 0xa + SO_PASSCRED = 0x10 + SO_PASSPIDFD = 0x4c + SO_PASSRIGHTS = 0x53 + SO_PASSSEC = 0x22 + SO_PEEK_OFF = 0x2a + SO_PEERCRED = 0x11 + SO_PEERGROUPS = 0x3b + SO_PEERPIDFD = 0x4d + SO_PEERSEC = 0x1f + SO_PREFER_BUSY_POLL = 0x45 + SO_PROTOCOL = 0x26 + SO_RCVBUF = 0x8 + SO_RCVBUFFORCE = 0x21 + SO_RCVLOWAT = 0x12 + SO_RCVMARK = 0x4b + SO_RCVPRIORITY = 0x52 + SO_RCVTIMEO = 0x14 + SO_RCVTIMEO_NEW = 0x42 + SO_RCVTIMEO_OLD = 0x14 + SO_RESERVE_MEM = 0x49 + SO_REUSEADDR = 0x2 + SO_REUSEPORT = 0xf + SO_RXQ_OVFL = 0x28 + SO_SECURITY_AUTHENTICATION = 0x16 + SO_SECURITY_ENCRYPTION_NETWORK = 0x18 + SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 + SO_SELECT_ERR_QUEUE = 0x2d + SO_SNDBUF = 0x7 + SO_SNDBUFFORCE = 0x20 + SO_SNDLOWAT = 0x13 + SO_SNDTIMEO = 0x15 + SO_SNDTIMEO_NEW = 0x43 + SO_SNDTIMEO_OLD = 0x15 + SO_TIMESTAMPING = 0x25 + SO_TIMESTAMPING_NEW = 0x41 + SO_TIMESTAMPING_OLD = 0x25 + SO_TIMESTAMPNS = 0x23 + SO_TIMESTAMPNS_NEW = 0x40 + SO_TIMESTAMPNS_OLD = 0x23 + SO_TIMESTAMP_NEW = 0x3f + SO_TXREHASH = 0x4a + SO_TXTIME = 0x3d + SO_TYPE = 0x3 + SO_WIFI_STATUS = 0x29 + SO_ZEROCOPY = 0x3c + TAB1 = 0x800 + TAB2 = 0x1000 + TAB3 = 0x1800 + TABDLY = 0x1800 + TCFLSH = 0x540b + TCGETA = 0x5405 + TCGETS = 0x5401 + TCGETS2 = 0x802c542a + TCGETX = 0x5432 + TCSAFLUSH = 0x2 + TCSBRK = 0x5409 + TCSBRKP = 0x5425 + TCSETA = 0x5406 + TCSETAF = 0x5408 + TCSETAW = 0x5407 + TCSETS = 0x5402 + TCSETS2 = 0x402c542b + TCSETSF = 0x5404 + TCSETSF2 = 0x402c542d + TCSETSW = 0x5403 + TCSETSW2 = 0x402c542c + TCSETX = 0x5433 + TCSETXF = 0x5434 + TCSETXW = 0x5435 + TCXONC = 0x540a + TFD_CLOEXEC = 0x80000 + TFD_NONBLOCK = 0x800 + TIOCCBRK = 0x5428 + TIOCCONS = 0x541d + TIOCEXCL = 0x540c + TIOCGDEV = 0x80045432 + TIOCGETD = 0x5424 + TIOCGEXCL = 0x80045440 + TIOCGICOUNT = 0x545d + TIOCGISO7816 = 0x80285442 + TIOCGLCKTRMIOS = 0x5456 + TIOCGPGRP = 0x540f + TIOCGPKT = 0x80045438 + TIOCGPTLCK = 0x80045439 + TIOCGPTN = 0x80045430 + TIOCGPTPEER = 0x5441 + TIOCGRS485 = 0x542e + TIOCGSERIAL = 0x541e + TIOCGSID = 0x5429 + TIOCGSOFTCAR = 0x5419 + TIOCGWINSZ = 0x5413 + TIOCINQ = 0x541b + TIOCLINUX = 0x541c + TIOCMBIC = 0x5417 + TIOCMBIS = 0x5416 + TIOCMGET = 0x5415 + TIOCMIWAIT = 0x545c + TIOCMSET = 0x5418 + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x5422 + TIOCNXCL = 0x540d + TIOCOUTQ = 0x5411 + TIOCPKT = 0x5420 + TIOCSBRK = 0x5427 + TIOCSCTTY = 0x540e + TIOCSERCONFIG = 0x5453 + TIOCSERGETLSR = 0x5459 + TIOCSERGETMULTI = 0x545a + TIOCSERGSTRUCT = 0x5458 + TIOCSERGWILD = 0x5454 + TIOCSERSETMULTI = 0x545b + TIOCSERSWILD = 0x5455 + TIOCSER_TEMT = 0x1 + TIOCSETD = 0x5423 + TIOCSIG = 0x40045436 + TIOCSISO7816 = 0xc0285443 + TIOCSLCKTRMIOS = 0x5457 + TIOCSPGRP = 0x5410 + TIOCSPTLCK = 0x40045431 + TIOCSRS485 = 0x542f + TIOCSSERIAL = 0x541f + TIOCSSOFTCAR = 0x541a + TIOCSTI = 0x5412 + TIOCSWINSZ = 0x5414 + TIOCVHANGUP = 0x5437 + TOSTOP = 0x100 + TUNATTACHFILTER = 0x401054d5 + TUNDETACHFILTER = 0x401054d6 + TUNGETDEVNETNS = 0x54e3 + TUNGETFEATURES = 0x800454cf + TUNGETFILTER = 0x801054db + TUNGETIFF = 0x800454d2 + TUNGETSNDBUF = 0x800454d3 + TUNGETVNETBE = 0x800454df + TUNGETVNETHDRSZ = 0x800454d7 + TUNGETVNETLE = 0x800454dd + TUNSETCARRIER = 0x400454e2 + TUNSETDEBUG = 0x400454c9 + TUNSETFILTEREBPF = 0x800454e1 + TUNSETGROUP = 0x400454ce + TUNSETIFF = 0x400454ca + TUNSETIFINDEX = 0x400454da + TUNSETLINK = 0x400454cd + TUNSETNOCSUM = 0x400454c8 + TUNSETOFFLOAD = 0x400454d0 + TUNSETOWNER = 0x400454cc + TUNSETPERSIST = 0x400454cb + TUNSETQUEUE = 0x400454d9 + TUNSETSNDBUF = 0x400454d4 + TUNSETSTEERINGEBPF = 0x800454e0 + TUNSETTXFILTER = 0x400454d1 + TUNSETVNETBE = 0x400454de + TUNSETVNETHDRSZ = 0x400454d8 + TUNSETVNETLE = 0x400454dc + UBI_IOCATT = 0x40186f40 + UBI_IOCDET = 0x40046f41 + UBI_IOCEBCH = 0x40044f02 + UBI_IOCEBER = 0x40044f01 + UBI_IOCEBISMAP = 0x80044f05 + UBI_IOCEBMAP = 0x40084f03 + UBI_IOCEBUNMAP = 0x40044f04 + UBI_IOCMKVOL = 0x40986f00 + UBI_IOCRMVOL = 0x40046f01 + UBI_IOCRNVOL = 0x51106f03 + UBI_IOCRPEB = 0x40046f04 + UBI_IOCRSVOL = 0x400c6f02 + UBI_IOCSETVOLPROP = 0x40104f06 + UBI_IOCSPEB = 0x40046f05 + UBI_IOCVOLCRBLK = 0x40804f07 + UBI_IOCVOLRMBLK = 0x4f08 + UBI_IOCVOLUP = 0x40084f00 + VDISCARD = 0xd + VEOF = 0x4 + VEOL = 0xb + VEOL2 = 0x10 + VMIN = 0x6 + VREPRINT = 0xc + VSTART = 0x8 + VSTOP = 0x9 + VSUSP = 0xa + VSWTC = 0x7 + VT1 = 0x4000 + VTDLY = 0x4000 + VTIME = 0x5 + VWERASE = 0xe + WDIOC_GETBOOTSTATUS = 0x80045702 + WDIOC_GETPRETIMEOUT = 0x80045709 + WDIOC_GETSTATUS = 0x80045701 + WDIOC_GETSUPPORT = 0x80285700 + WDIOC_GETTEMP = 0x80045703 + WDIOC_GETTIMELEFT = 0x8004570a + WDIOC_GETTIMEOUT = 0x80045707 + WDIOC_KEEPALIVE = 0x80045705 + WDIOC_SETOPTIONS = 0x80045704 + WORDSIZE = 0x40 + XCASE = 0x4 + XTABS = 0x1800 + _HIDIOCGRAWNAME = 0x80804804 + _HIDIOCGRAWPHYS = 0x80404805 + _HIDIOCGRAWUNIQ = 0x80404808 ) // Errors @@ -585,6 +601,8 @@ const ( EDESTADDRREQ = syscall.Errno(0x59) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x7a) + EFSBADCRC = syscall.Errno(0x4a) + EFSCORRUPTED = syscall.Errno(0x75) EHOSTDOWN = syscall.Errno(0x70) EHOSTUNREACH = syscall.Errno(0x71) EHWPOISON = syscall.Errno(0x85) @@ -808,7 +826,7 @@ var errorList = [...]struct { {114, "EALREADY", "operation already in progress"}, {115, "EINPROGRESS", "operation now in progress"}, {116, "ESTALE", "stale file handle"}, - {117, "EUCLEAN", "structure needs cleaning"}, + {117, "EFSCORRUPTED", "structure needs cleaning"}, {118, "ENOTNAM", "not a XENIX named type file"}, {119, "ENAVAIL", "no XENIX semaphores available"}, {120, "EISNAM", "is a named type file"}, diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go index 64347eb35..6e87bd659 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go @@ -156,6 +156,7 @@ const ( NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_ID = 0x8008b70d NS_GET_MNTNS_ID = 0x8008b705 NS_GET_NSTYPE = 0xb703 NS_GET_OWNER_UID = 0xb704 @@ -367,6 +368,7 @@ const ( RTC_WKALM_SET = 0x4028700f SCM_DEVMEM_DMABUF = 0x4f SCM_DEVMEM_LINEAR = 0x4e + SCM_INQ = 0x54 SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a @@ -414,6 +416,7 @@ const ( SO_ERROR = 0x4 SO_INCOMING_CPU = 0x31 SO_INCOMING_NAPI_ID = 0x38 + SO_INQ = 0x54 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd SO_LOCK_FILTER = 0x2c @@ -657,6 +660,8 @@ const ( EDESTADDRREQ = syscall.Errno(0x59) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x7a) + EFSBADCRC = syscall.Errno(0x4a) + EFSCORRUPTED = syscall.Errno(0x75) EHOSTDOWN = syscall.Errno(0x70) EHOSTUNREACH = syscall.Errno(0x71) EHWPOISON = syscall.Errno(0x85) @@ -880,7 +885,7 @@ var errorList = [...]struct { {114, "EALREADY", "operation already in progress"}, {115, "EINPROGRESS", "operation now in progress"}, {116, "ESTALE", "stale file handle"}, - {117, "EUCLEAN", "structure needs cleaning"}, + {117, "EFSCORRUPTED", "structure needs cleaning"}, {118, "ENOTNAM", "not a XENIX named type file"}, {119, "ENAVAIL", "no XENIX semaphores available"}, {120, "EISNAM", "is a named type file"}, diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go index 7d7191171..7e2b2e8a6 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go @@ -161,6 +161,7 @@ const ( NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_ID = 0x4008b70d NS_GET_MNTNS_ID = 0x4008b705 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 @@ -358,6 +359,7 @@ const ( RTC_WKALM_SET = 0x8028700f SCM_DEVMEM_DMABUF = 0x58 SCM_DEVMEM_LINEAR = 0x57 + SCM_INQ = 0x5d SCM_TIMESTAMPING = 0x23 SCM_TIMESTAMPING_OPT_STATS = 0x38 SCM_TIMESTAMPING_PKTINFO = 0x3c @@ -453,6 +455,7 @@ const ( SO_ERROR = 0x1007 SO_INCOMING_CPU = 0x33 SO_INCOMING_NAPI_ID = 0x3a + SO_INQ = 0x5d SO_KEEPALIVE = 0x8 SO_LINGER = 0x80 SO_LOCK_FILTER = 0x28 @@ -694,6 +697,8 @@ const ( EDESTADDRREQ = syscall.Errno(0x27) EDOTDOT = syscall.Errno(0x58) EDQUOT = syscall.Errno(0x45) + EFSBADCRC = syscall.Errno(0x4c) + EFSCORRUPTED = syscall.Errno(0x75) EHOSTDOWN = syscall.Errno(0x40) EHOSTUNREACH = syscall.Errno(0x41) EHWPOISON = syscall.Errno(0x87) @@ -921,7 +926,7 @@ var errorList = [...]struct { {114, "ELIBACC", "can not access a needed shared library"}, {115, "ENOTUNIQ", "name not unique on network"}, {116, "ERESTART", "interrupted system call should be restarted"}, - {117, "EUCLEAN", "structure needs cleaning"}, + {117, "EFSCORRUPTED", "structure needs cleaning"}, {118, "ENOTNAM", "not a XENIX named type file"}, {119, "ENAVAIL", "no XENIX semaphores available"}, {120, "EISNAM", "is a named type file"}, diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux.go b/vendor/golang.org/x/sys/unix/zsyscall_linux.go index 8935d10a3..80f40e401 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux.go @@ -1785,7 +1785,7 @@ func writev(fd int, iovs []Iovec) (n int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) { +func preadvSyscall(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) { var _p0 unsafe.Pointer if len(iovs) > 0 { _p0 = unsafe.Pointer(&iovs[0]) @@ -1802,7 +1802,7 @@ func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err er // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) { +func pwritevSyscall(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) { var _p0 unsafe.Pointer if len(iovs) > 0 { _p0 = unsafe.Pointer(&iovs[0]) @@ -1819,7 +1819,7 @@ func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err e // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) { +func preadv2Syscall(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) { var _p0 unsafe.Pointer if len(iovs) > 0 { _p0 = unsafe.Pointer(&iovs[0]) @@ -1836,7 +1836,7 @@ func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) { +func pwritev2Syscall(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) { var _p0 unsafe.Pointer if len(iovs) > 0 { _p0 = unsafe.Pointer(&iovs[0]) @@ -2241,8 +2241,8 @@ func Mseal(b []byte, flags uint) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func setMemPolicy(mode int, mask *CPUSet, size int) (err error) { - _, _, e1 := Syscall(SYS_SET_MEMPOLICY, uintptr(mode), uintptr(unsafe.Pointer(mask)), uintptr(size)) +func setMemPolicy(mode int, mask unsafe.Pointer, size uintptr) (err error) { + _, _, e1 := Syscall(SYS_SET_MEMPOLICY, uintptr(mode), uintptr(mask), uintptr(size)) if e1 != 0 { err = errnoErr(e1) } diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go index 1851df14e..6487475f0 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go @@ -1633,6 +1633,90 @@ var libc_pwrite_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func readv(fd int, iovecs []Iovec) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovecs) > 0 { + _p0 = unsafe.Pointer(&iovecs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall(libc_readv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_readv_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_readv readv "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writev(fd int, iovecs []Iovec) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovecs) > 0 { + _p0 = unsafe.Pointer(&iovecs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall(libc_writev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_writev_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_writev writev "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func preadv(fd int, iovecs []Iovec, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovecs) > 0 { + _p0 = unsafe.Pointer(&iovecs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall6(libc_preadv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), uintptr(offset), uintptr(offset>>32), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_preadv_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_preadv preadv "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pwritev(fd int, iovecs []Iovec, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovecs) > 0 { + _p0 = unsafe.Pointer(&iovecs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall6(libc_pwritev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), uintptr(offset), uintptr(offset>>32), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_pwritev_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pwritev pwritev "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func read(fd int, p []byte) (n int, err error) { var _p0 unsafe.Pointer if len(p) > 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s index 0b43c6936..f10201dac 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s @@ -498,6 +498,26 @@ TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $4 DATA ·libc_pwrite_trampoline_addr(SB)/4, $libc_pwrite_trampoline<>(SB) +TEXT libc_readv_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_readv(SB) +GLOBL ·libc_readv_trampoline_addr(SB), RODATA, $4 +DATA ·libc_readv_trampoline_addr(SB)/4, $libc_readv_trampoline<>(SB) + +TEXT libc_writev_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_writev(SB) +GLOBL ·libc_writev_trampoline_addr(SB), RODATA, $4 +DATA ·libc_writev_trampoline_addr(SB)/4, $libc_writev_trampoline<>(SB) + +TEXT libc_preadv_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_preadv(SB) +GLOBL ·libc_preadv_trampoline_addr(SB), RODATA, $4 +DATA ·libc_preadv_trampoline_addr(SB)/4, $libc_preadv_trampoline<>(SB) + +TEXT libc_pwritev_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pwritev(SB) +GLOBL ·libc_pwritev_trampoline_addr(SB), RODATA, $4 +DATA ·libc_pwritev_trampoline_addr(SB)/4, $libc_pwritev_trampoline<>(SB) + TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_read(SB) GLOBL ·libc_read_trampoline_addr(SB), RODATA, $4 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go index e1ec0dbe4..50980475d 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go @@ -1633,6 +1633,90 @@ var libc_pwrite_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func readv(fd int, iovecs []Iovec) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovecs) > 0 { + _p0 = unsafe.Pointer(&iovecs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall(libc_readv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_readv_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_readv readv "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writev(fd int, iovecs []Iovec) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovecs) > 0 { + _p0 = unsafe.Pointer(&iovecs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall(libc_writev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_writev_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_writev writev "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func preadv(fd int, iovecs []Iovec, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovecs) > 0 { + _p0 = unsafe.Pointer(&iovecs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall6(libc_preadv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_preadv_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_preadv preadv "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pwritev(fd int, iovecs []Iovec, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovecs) > 0 { + _p0 = unsafe.Pointer(&iovecs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall6(libc_pwritev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_pwritev_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pwritev pwritev "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func read(fd int, p []byte) (n int, err error) { var _p0 unsafe.Pointer if len(p) > 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s index 880c6d6e3..9de2cbaa4 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s @@ -498,6 +498,26 @@ TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8 DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB) +TEXT libc_readv_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_readv(SB) +GLOBL ·libc_readv_trampoline_addr(SB), RODATA, $8 +DATA ·libc_readv_trampoline_addr(SB)/8, $libc_readv_trampoline<>(SB) + +TEXT libc_writev_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_writev(SB) +GLOBL ·libc_writev_trampoline_addr(SB), RODATA, $8 +DATA ·libc_writev_trampoline_addr(SB)/8, $libc_writev_trampoline<>(SB) + +TEXT libc_preadv_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_preadv(SB) +GLOBL ·libc_preadv_trampoline_addr(SB), RODATA, $8 +DATA ·libc_preadv_trampoline_addr(SB)/8, $libc_preadv_trampoline<>(SB) + +TEXT libc_pwritev_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pwritev(SB) +GLOBL ·libc_pwritev_trampoline_addr(SB), RODATA, $8 +DATA ·libc_pwritev_trampoline_addr(SB)/8, $libc_pwritev_trampoline<>(SB) + TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_read(SB) GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go index 7c8452a63..33c9c3a43 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go @@ -1633,6 +1633,90 @@ var libc_pwrite_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func readv(fd int, iovecs []Iovec) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovecs) > 0 { + _p0 = unsafe.Pointer(&iovecs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall(libc_readv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_readv_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_readv readv "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writev(fd int, iovecs []Iovec) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovecs) > 0 { + _p0 = unsafe.Pointer(&iovecs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall(libc_writev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_writev_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_writev writev "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func preadv(fd int, iovecs []Iovec, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovecs) > 0 { + _p0 = unsafe.Pointer(&iovecs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall6(libc_preadv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), 0, uintptr(offset), uintptr(offset>>32)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_preadv_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_preadv preadv "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pwritev(fd int, iovecs []Iovec, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovecs) > 0 { + _p0 = unsafe.Pointer(&iovecs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall6(libc_pwritev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), 0, uintptr(offset), uintptr(offset>>32)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_pwritev_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pwritev pwritev "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func read(fd int, p []byte) (n int, err error) { var _p0 unsafe.Pointer if len(p) > 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s index b8ef95b0f..c6b9175a6 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s @@ -498,6 +498,26 @@ TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $4 DATA ·libc_pwrite_trampoline_addr(SB)/4, $libc_pwrite_trampoline<>(SB) +TEXT libc_readv_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_readv(SB) +GLOBL ·libc_readv_trampoline_addr(SB), RODATA, $4 +DATA ·libc_readv_trampoline_addr(SB)/4, $libc_readv_trampoline<>(SB) + +TEXT libc_writev_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_writev(SB) +GLOBL ·libc_writev_trampoline_addr(SB), RODATA, $4 +DATA ·libc_writev_trampoline_addr(SB)/4, $libc_writev_trampoline<>(SB) + +TEXT libc_preadv_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_preadv(SB) +GLOBL ·libc_preadv_trampoline_addr(SB), RODATA, $4 +DATA ·libc_preadv_trampoline_addr(SB)/4, $libc_preadv_trampoline<>(SB) + +TEXT libc_pwritev_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pwritev(SB) +GLOBL ·libc_pwritev_trampoline_addr(SB), RODATA, $4 +DATA ·libc_pwritev_trampoline_addr(SB)/4, $libc_pwritev_trampoline<>(SB) + TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_read(SB) GLOBL ·libc_read_trampoline_addr(SB), RODATA, $4 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go index 2ffdf861f..d3410262e 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go @@ -1633,6 +1633,90 @@ var libc_pwrite_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func readv(fd int, iovecs []Iovec) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovecs) > 0 { + _p0 = unsafe.Pointer(&iovecs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall(libc_readv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_readv_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_readv readv "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writev(fd int, iovecs []Iovec) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovecs) > 0 { + _p0 = unsafe.Pointer(&iovecs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall(libc_writev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_writev_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_writev writev "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func preadv(fd int, iovecs []Iovec, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovecs) > 0 { + _p0 = unsafe.Pointer(&iovecs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall6(libc_preadv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_preadv_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_preadv preadv "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pwritev(fd int, iovecs []Iovec, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovecs) > 0 { + _p0 = unsafe.Pointer(&iovecs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall6(libc_pwritev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_pwritev_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pwritev pwritev "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func read(fd int, p []byte) (n int, err error) { var _p0 unsafe.Pointer if len(p) > 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s index 2af3b5c76..1be10bb45 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s @@ -498,6 +498,26 @@ TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8 DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB) +TEXT libc_readv_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_readv(SB) +GLOBL ·libc_readv_trampoline_addr(SB), RODATA, $8 +DATA ·libc_readv_trampoline_addr(SB)/8, $libc_readv_trampoline<>(SB) + +TEXT libc_writev_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_writev(SB) +GLOBL ·libc_writev_trampoline_addr(SB), RODATA, $8 +DATA ·libc_writev_trampoline_addr(SB)/8, $libc_writev_trampoline<>(SB) + +TEXT libc_preadv_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_preadv(SB) +GLOBL ·libc_preadv_trampoline_addr(SB), RODATA, $8 +DATA ·libc_preadv_trampoline_addr(SB)/8, $libc_preadv_trampoline<>(SB) + +TEXT libc_pwritev_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pwritev(SB) +GLOBL ·libc_pwritev_trampoline_addr(SB), RODATA, $8 +DATA ·libc_pwritev_trampoline_addr(SB)/8, $libc_pwritev_trampoline<>(SB) + TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_read(SB) GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go index 1da08d526..dea19d54e 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go @@ -1633,6 +1633,90 @@ var libc_pwrite_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func readv(fd int, iovecs []Iovec) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovecs) > 0 { + _p0 = unsafe.Pointer(&iovecs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall(libc_readv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_readv_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_readv readv "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writev(fd int, iovecs []Iovec) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovecs) > 0 { + _p0 = unsafe.Pointer(&iovecs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall(libc_writev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_writev_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_writev writev "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func preadv(fd int, iovecs []Iovec, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovecs) > 0 { + _p0 = unsafe.Pointer(&iovecs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall6(libc_preadv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_preadv_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_preadv preadv "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pwritev(fd int, iovecs []Iovec, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovecs) > 0 { + _p0 = unsafe.Pointer(&iovecs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall6(libc_pwritev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_pwritev_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pwritev pwritev "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func read(fd int, p []byte) (n int, err error) { var _p0 unsafe.Pointer if len(p) > 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s index b7a251353..a9fec24d9 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s @@ -498,6 +498,26 @@ TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8 DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB) +TEXT libc_readv_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_readv(SB) +GLOBL ·libc_readv_trampoline_addr(SB), RODATA, $8 +DATA ·libc_readv_trampoline_addr(SB)/8, $libc_readv_trampoline<>(SB) + +TEXT libc_writev_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_writev(SB) +GLOBL ·libc_writev_trampoline_addr(SB), RODATA, $8 +DATA ·libc_writev_trampoline_addr(SB)/8, $libc_writev_trampoline<>(SB) + +TEXT libc_preadv_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_preadv(SB) +GLOBL ·libc_preadv_trampoline_addr(SB), RODATA, $8 +DATA ·libc_preadv_trampoline_addr(SB)/8, $libc_preadv_trampoline<>(SB) + +TEXT libc_pwritev_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pwritev(SB) +GLOBL ·libc_pwritev_trampoline_addr(SB), RODATA, $8 +DATA ·libc_pwritev_trampoline_addr(SB)/8, $libc_pwritev_trampoline<>(SB) + TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_read(SB) GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go index 6e85b0aac..436efb586 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go @@ -1633,6 +1633,90 @@ var libc_pwrite_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func readv(fd int, iovecs []Iovec) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovecs) > 0 { + _p0 = unsafe.Pointer(&iovecs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall(libc_readv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_readv_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_readv readv "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writev(fd int, iovecs []Iovec) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovecs) > 0 { + _p0 = unsafe.Pointer(&iovecs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall(libc_writev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_writev_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_writev writev "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func preadv(fd int, iovecs []Iovec, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovecs) > 0 { + _p0 = unsafe.Pointer(&iovecs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall6(libc_preadv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_preadv_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_preadv preadv "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pwritev(fd int, iovecs []Iovec, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovecs) > 0 { + _p0 = unsafe.Pointer(&iovecs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall6(libc_pwritev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_pwritev_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pwritev pwritev "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func read(fd int, p []byte) (n int, err error) { var _p0 unsafe.Pointer if len(p) > 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s index f15dadf05..441ed4e40 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s @@ -597,6 +597,30 @@ TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8 DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB) +TEXT libc_readv_trampoline<>(SB),NOSPLIT,$0-0 + CALL libc_readv(SB) + RET +GLOBL ·libc_readv_trampoline_addr(SB), RODATA, $8 +DATA ·libc_readv_trampoline_addr(SB)/8, $libc_readv_trampoline<>(SB) + +TEXT libc_writev_trampoline<>(SB),NOSPLIT,$0-0 + CALL libc_writev(SB) + RET +GLOBL ·libc_writev_trampoline_addr(SB), RODATA, $8 +DATA ·libc_writev_trampoline_addr(SB)/8, $libc_writev_trampoline<>(SB) + +TEXT libc_preadv_trampoline<>(SB),NOSPLIT,$0-0 + CALL libc_preadv(SB) + RET +GLOBL ·libc_preadv_trampoline_addr(SB), RODATA, $8 +DATA ·libc_preadv_trampoline_addr(SB)/8, $libc_preadv_trampoline<>(SB) + +TEXT libc_pwritev_trampoline<>(SB),NOSPLIT,$0-0 + CALL libc_pwritev(SB) + RET +GLOBL ·libc_pwritev_trampoline_addr(SB), RODATA, $8 +DATA ·libc_pwritev_trampoline_addr(SB)/8, $libc_pwritev_trampoline<>(SB) + TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_read(SB) RET diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go index 28b487df2..d801e4b4e 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go @@ -1633,6 +1633,90 @@ var libc_pwrite_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func readv(fd int, iovecs []Iovec) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovecs) > 0 { + _p0 = unsafe.Pointer(&iovecs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall(libc_readv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_readv_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_readv readv "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writev(fd int, iovecs []Iovec) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovecs) > 0 { + _p0 = unsafe.Pointer(&iovecs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall(libc_writev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_writev_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_writev writev "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func preadv(fd int, iovecs []Iovec, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovecs) > 0 { + _p0 = unsafe.Pointer(&iovecs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall6(libc_preadv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_preadv_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_preadv preadv "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pwritev(fd int, iovecs []Iovec, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovecs) > 0 { + _p0 = unsafe.Pointer(&iovecs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall6(libc_pwritev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_pwritev_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pwritev pwritev "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func read(fd int, p []byte) (n int, err error) { var _p0 unsafe.Pointer if len(p) > 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s index 1e7f321e4..b15cc0174 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s @@ -498,6 +498,26 @@ TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8 DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB) +TEXT libc_readv_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_readv(SB) +GLOBL ·libc_readv_trampoline_addr(SB), RODATA, $8 +DATA ·libc_readv_trampoline_addr(SB)/8, $libc_readv_trampoline<>(SB) + +TEXT libc_writev_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_writev(SB) +GLOBL ·libc_writev_trampoline_addr(SB), RODATA, $8 +DATA ·libc_writev_trampoline_addr(SB)/8, $libc_writev_trampoline<>(SB) + +TEXT libc_preadv_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_preadv(SB) +GLOBL ·libc_preadv_trampoline_addr(SB), RODATA, $8 +DATA ·libc_preadv_trampoline_addr(SB)/8, $libc_preadv_trampoline<>(SB) + +TEXT libc_pwritev_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pwritev(SB) +GLOBL ·libc_pwritev_trampoline_addr(SB), RODATA, $8 +DATA ·libc_pwritev_trampoline_addr(SB)/8, $libc_pwritev_trampoline<>(SB) + TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_read(SB) GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8 diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go index aca56ee49..49d1b8803 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go @@ -463,4 +463,8 @@ const ( SYS_LISTXATTRAT = 465 SYS_REMOVEXATTRAT = 466 SYS_OPEN_TREE_ATTR = 467 + SYS_FILE_GETATTR = 468 + SYS_FILE_SETATTR = 469 + SYS_LISTNS = 470 + SYS_RSEQ_SLICE_YIELD = 471 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go index 2ea1ef58c..f11f1de77 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go @@ -342,6 +342,7 @@ const ( SYS_IO_PGETEVENTS = 333 SYS_RSEQ = 334 SYS_URETPROBE = 335 + SYS_UPROBE = 336 SYS_PIDFD_SEND_SIGNAL = 424 SYS_IO_URING_SETUP = 425 SYS_IO_URING_ENTER = 426 @@ -386,4 +387,8 @@ const ( SYS_LISTXATTRAT = 465 SYS_REMOVEXATTRAT = 466 SYS_OPEN_TREE_ATTR = 467 + SYS_FILE_GETATTR = 468 + SYS_FILE_SETATTR = 469 + SYS_LISTNS = 470 + SYS_RSEQ_SLICE_YIELD = 471 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go index d22c8af31..bad740b79 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go @@ -427,4 +427,8 @@ const ( SYS_LISTXATTRAT = 465 SYS_REMOVEXATTRAT = 466 SYS_OPEN_TREE_ATTR = 467 + SYS_FILE_GETATTR = 468 + SYS_FILE_SETATTR = 469 + SYS_LISTNS = 470 + SYS_RSEQ_SLICE_YIELD = 471 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go index 5ee264ae9..fe646d18e 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go @@ -330,4 +330,8 @@ const ( SYS_LISTXATTRAT = 465 SYS_REMOVEXATTRAT = 466 SYS_OPEN_TREE_ATTR = 467 + SYS_FILE_GETATTR = 468 + SYS_FILE_SETATTR = 469 + SYS_LISTNS = 470 + SYS_RSEQ_SLICE_YIELD = 471 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go index f9f03ebf5..4362f6d55 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go @@ -306,6 +306,7 @@ const ( SYS_LANDLOCK_CREATE_RULESET = 444 SYS_LANDLOCK_ADD_RULE = 445 SYS_LANDLOCK_RESTRICT_SELF = 446 + SYS_MEMFD_SECRET = 447 SYS_PROCESS_MRELEASE = 448 SYS_FUTEX_WAITV = 449 SYS_SET_MEMPOLICY_HOME_NODE = 450 @@ -326,4 +327,8 @@ const ( SYS_LISTXATTRAT = 465 SYS_REMOVEXATTRAT = 466 SYS_OPEN_TREE_ATTR = 467 + SYS_FILE_GETATTR = 468 + SYS_FILE_SETATTR = 469 + SYS_LISTNS = 470 + SYS_RSEQ_SLICE_YIELD = 471 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go index 87c2118e8..b63d155ae 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go @@ -447,4 +447,8 @@ const ( SYS_LISTXATTRAT = 4465 SYS_REMOVEXATTRAT = 4466 SYS_OPEN_TREE_ATTR = 4467 + SYS_FILE_GETATTR = 4468 + SYS_FILE_SETATTR = 4469 + SYS_LISTNS = 4470 + SYS_RSEQ_SLICE_YIELD = 4471 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go index 391ad102f..435d43319 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go @@ -377,4 +377,8 @@ const ( SYS_LISTXATTRAT = 5465 SYS_REMOVEXATTRAT = 5466 SYS_OPEN_TREE_ATTR = 5467 + SYS_FILE_GETATTR = 5468 + SYS_FILE_SETATTR = 5469 + SYS_LISTNS = 5470 + SYS_RSEQ_SLICE_YIELD = 5471 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go index 565615775..dcc0468d6 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go @@ -377,4 +377,8 @@ const ( SYS_LISTXATTRAT = 5465 SYS_REMOVEXATTRAT = 5466 SYS_OPEN_TREE_ATTR = 5467 + SYS_FILE_GETATTR = 5468 + SYS_FILE_SETATTR = 5469 + SYS_LISTNS = 5470 + SYS_RSEQ_SLICE_YIELD = 5471 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go index 0482b52e3..b96f85ebd 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go @@ -447,4 +447,8 @@ const ( SYS_LISTXATTRAT = 4465 SYS_REMOVEXATTRAT = 4466 SYS_OPEN_TREE_ATTR = 4467 + SYS_FILE_GETATTR = 4468 + SYS_FILE_SETATTR = 4469 + SYS_LISTNS = 4470 + SYS_RSEQ_SLICE_YIELD = 4471 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go index 71806f08f..bffa2bd1e 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go @@ -454,4 +454,8 @@ const ( SYS_LISTXATTRAT = 465 SYS_REMOVEXATTRAT = 466 SYS_OPEN_TREE_ATTR = 467 + SYS_FILE_GETATTR = 468 + SYS_FILE_SETATTR = 469 + SYS_LISTNS = 470 + SYS_RSEQ_SLICE_YIELD = 471 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go index e35a71058..57bfc6b26 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go @@ -426,4 +426,8 @@ const ( SYS_LISTXATTRAT = 465 SYS_REMOVEXATTRAT = 466 SYS_OPEN_TREE_ATTR = 467 + SYS_FILE_GETATTR = 468 + SYS_FILE_SETATTR = 469 + SYS_LISTNS = 470 + SYS_RSEQ_SLICE_YIELD = 471 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go index 2aea47670..750f706d5 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go @@ -426,4 +426,8 @@ const ( SYS_LISTXATTRAT = 465 SYS_REMOVEXATTRAT = 466 SYS_OPEN_TREE_ATTR = 467 + SYS_FILE_GETATTR = 468 + SYS_FILE_SETATTR = 469 + SYS_LISTNS = 470 + SYS_RSEQ_SLICE_YIELD = 471 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go index 6c9bb4e56..303ccbf46 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go @@ -331,4 +331,8 @@ const ( SYS_LISTXATTRAT = 465 SYS_REMOVEXATTRAT = 466 SYS_OPEN_TREE_ATTR = 467 + SYS_FILE_GETATTR = 468 + SYS_FILE_SETATTR = 469 + SYS_LISTNS = 470 + SYS_RSEQ_SLICE_YIELD = 471 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go index 680bc9915..5e5dd4ccb 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go @@ -392,4 +392,8 @@ const ( SYS_LISTXATTRAT = 465 SYS_REMOVEXATTRAT = 466 SYS_OPEN_TREE_ATTR = 467 + SYS_FILE_GETATTR = 468 + SYS_FILE_SETATTR = 469 + SYS_LISTNS = 470 + SYS_RSEQ_SLICE_YIELD = 471 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go index 620f27105..f7c4fb3df 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go @@ -374,6 +374,7 @@ const ( SYS_FSMOUNT = 432 SYS_FSPICK = 433 SYS_PIDFD_OPEN = 434 + SYS_CLONE3 = 435 SYS_CLOSE_RANGE = 436 SYS_OPENAT2 = 437 SYS_PIDFD_GETFD = 438 @@ -405,4 +406,8 @@ const ( SYS_LISTXATTRAT = 465 SYS_REMOVEXATTRAT = 466 SYS_OPEN_TREE_ATTR = 467 + SYS_FILE_GETATTR = 468 + SYS_FILE_SETATTR = 469 + SYS_LISTNS = 470 + SYS_RSEQ_SLICE_YIELD = 471 ) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux.go b/vendor/golang.org/x/sys/unix/ztypes_linux.go index 45476a73c..d11d5b96a 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux.go @@ -18,6 +18,11 @@ type ( _C_long_long int64 ) +type KernelTimespec struct { + Sec int64 + Nsec int64 +} + type ItimerSpec struct { Interval Timespec Value Timespec @@ -521,6 +526,14 @@ type TCPInfo struct { Total_rto uint16 Total_rto_recoveries uint16 Total_rto_time uint32 + Received_ce uint32 + Delivered_e1_bytes uint32 + Delivered_e0_bytes uint32 + Delivered_ce_bytes uint32 + Received_e1_bytes uint32 + Received_e0_bytes uint32 + Received_ce_bytes uint32 + _ [4]byte } type TCPVegasInfo struct { @@ -586,7 +599,7 @@ const ( SizeofIPv6MTUInfo = 0x20 SizeofICMPv6Filter = 0x20 SizeofUcred = 0xc - SizeofTCPInfo = 0xf8 + SizeofTCPInfo = 0x118 SizeofTCPCCInfo = 0x14 SizeofCanFilter = 0x8 SizeofTCPRepairOpt = 0x8 @@ -1324,7 +1337,7 @@ const ( PERF_RECORD_CGROUP = 0x13 PERF_RECORD_TEXT_POKE = 0x14 PERF_RECORD_AUX_OUTPUT_HW_ID = 0x15 - PERF_RECORD_MAX = 0x16 + PERF_RECORD_MAX = 0x17 PERF_RECORD_KSYMBOL_TYPE_UNKNOWN = 0x0 PERF_RECORD_KSYMBOL_TYPE_BPF = 0x1 PERF_RECORD_KSYMBOL_TYPE_OOL = 0x2 @@ -3566,7 +3579,7 @@ const ( DEVLINK_ATTR_LINECARD_SUPPORTED_TYPES = 0xae DEVLINK_ATTR_NESTED_DEVLINK = 0xaf DEVLINK_ATTR_SELFTESTS = 0xb0 - DEVLINK_ATTR_MAX = 0xb3 + DEVLINK_ATTR_MAX = 0xb7 DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0 DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1 DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0 @@ -3888,7 +3901,7 @@ const ( ETHTOOL_MSG_PHY_GET = 0x2d ETHTOOL_MSG_TSCONFIG_GET = 0x2e ETHTOOL_MSG_TSCONFIG_SET = 0x2f - ETHTOOL_MSG_USER_MAX = 0x2f + ETHTOOL_MSG_USER_MAX = 0x33 ETHTOOL_MSG_KERNEL_NONE = 0x0 ETHTOOL_MSG_STRSET_GET_REPLY = 0x1 ETHTOOL_MSG_LINKINFO_GET_REPLY = 0x2 @@ -3938,7 +3951,7 @@ const ( ETHTOOL_MSG_PHY_NTF = 0x2e ETHTOOL_MSG_TSCONFIG_GET_REPLY = 0x2f ETHTOOL_MSG_TSCONFIG_SET_REPLY = 0x30 - ETHTOOL_MSG_KERNEL_MAX = 0x30 + ETHTOOL_MSG_KERNEL_MAX = 0x36 ETHTOOL_FLAG_COMPACT_BITSETS = 0x1 ETHTOOL_FLAG_OMIT_REPLY = 0x2 ETHTOOL_FLAG_STATS = 0x4 @@ -4867,7 +4880,7 @@ const ( NL80211_ATTR_MAC_HINT = 0xc8 NL80211_ATTR_MAC_MASK = 0xd7 NL80211_ATTR_MAX_AP_ASSOC_STA = 0xca - NL80211_ATTR_MAX = 0x151 + NL80211_ATTR_MAX = 0x15c NL80211_ATTR_MAX_CRIT_PROT_DURATION = 0xb4 NL80211_ATTR_MAX_CSA_COUNTERS = 0xce NL80211_ATTR_MAX_HW_TIMESTAMP_PEERS = 0x143 @@ -5082,12 +5095,12 @@ const ( NL80211_ATTR_WOWLAN_TRIGGERS = 0x75 NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED = 0x76 NL80211_ATTR_WPA_VERSIONS = 0x4b - NL80211_AUTHTYPE_AUTOMATIC = 0x8 + NL80211_AUTHTYPE_AUTOMATIC = 0x9 NL80211_AUTHTYPE_FILS_PK = 0x7 NL80211_AUTHTYPE_FILS_SK = 0x5 NL80211_AUTHTYPE_FILS_SK_PFS = 0x6 NL80211_AUTHTYPE_FT = 0x2 - NL80211_AUTHTYPE_MAX = 0x7 + NL80211_AUTHTYPE_MAX = 0x8 NL80211_AUTHTYPE_NETWORK_EAP = 0x3 NL80211_AUTHTYPE_OPEN_SYSTEM = 0x0 NL80211_AUTHTYPE_SAE = 0x4 @@ -5120,7 +5133,7 @@ const ( NL80211_BAND_IFTYPE_ATTR_HE_CAP_PHY = 0x3 NL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE = 0x5 NL80211_BAND_IFTYPE_ATTR_IFTYPES = 0x1 - NL80211_BAND_IFTYPE_ATTR_MAX = 0xb + NL80211_BAND_IFTYPE_ATTR_MAX = 0xd NL80211_BAND_IFTYPE_ATTR_VENDOR_ELEMS = 0x7 NL80211_BAND_LC = 0x5 NL80211_BAND_S1GHZ = 0x4 @@ -5255,7 +5268,7 @@ const ( NL80211_CMD_LEAVE_MESH = 0x45 NL80211_CMD_LEAVE_OCB = 0x6d NL80211_CMD_LINKS_REMOVED = 0x9a - NL80211_CMD_MAX = 0x9d + NL80211_CMD_MAX = 0x9f NL80211_CMD_MICHAEL_MIC_FAILURE = 0x29 NL80211_CMD_MODIFY_LINK_STA = 0x97 NL80211_CMD_NAN_MATCH = 0x78 @@ -5501,7 +5514,7 @@ const ( NL80211_FREQUENCY_ATTR_GO_CONCURRENT = 0xf NL80211_FREQUENCY_ATTR_INDOOR_ONLY = 0xe NL80211_FREQUENCY_ATTR_IR_CONCURRENT = 0xf - NL80211_FREQUENCY_ATTR_MAX = 0x22 + NL80211_FREQUENCY_ATTR_MAX = 0x27 NL80211_FREQUENCY_ATTR_MAX_TX_POWER = 0x6 NL80211_FREQUENCY_ATTR_NO_10MHZ = 0x11 NL80211_FREQUENCY_ATTR_NO_160MHZ = 0xc @@ -5766,7 +5779,7 @@ const ( NL80211_PMSR_FTM_CAPA_ATTR_ASAP = 0x1 NL80211_PMSR_FTM_CAPA_ATTR_BANDWIDTHS = 0x6 NL80211_PMSR_FTM_CAPA_ATTR_MAX_BURSTS_EXPONENT = 0x7 - NL80211_PMSR_FTM_CAPA_ATTR_MAX = 0xa + NL80211_PMSR_FTM_CAPA_ATTR_MAX = 0x12 NL80211_PMSR_FTM_CAPA_ATTR_MAX_FTMS_PER_BURST = 0x8 NL80211_PMSR_FTM_CAPA_ATTR_NON_ASAP = 0x2 NL80211_PMSR_FTM_CAPA_ATTR_NON_TRIGGER_BASED = 0xa @@ -5788,7 +5801,7 @@ const ( NL80211_PMSR_FTM_REQ_ATTR_BURST_PERIOD = 0x4 NL80211_PMSR_FTM_REQ_ATTR_FTMS_PER_BURST = 0x6 NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK = 0xc - NL80211_PMSR_FTM_REQ_ATTR_MAX = 0xd + NL80211_PMSR_FTM_REQ_ATTR_MAX = 0xe NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED = 0xb NL80211_PMSR_FTM_REQ_ATTR_NUM_BURSTS_EXP = 0x3 NL80211_PMSR_FTM_REQ_ATTR_NUM_FTMR_RETRIES = 0x7 @@ -5806,7 +5819,7 @@ const ( NL80211_PMSR_FTM_RESP_ATTR_FAIL_REASON = 0x1 NL80211_PMSR_FTM_RESP_ATTR_FTMS_PER_BURST = 0x8 NL80211_PMSR_FTM_RESP_ATTR_LCI = 0x13 - NL80211_PMSR_FTM_RESP_ATTR_MAX = 0x15 + NL80211_PMSR_FTM_RESP_ATTR_MAX = 0x16 NL80211_PMSR_FTM_RESP_ATTR_NUM_BURSTS_EXP = 0x6 NL80211_PMSR_FTM_RESP_ATTR_NUM_FTMR_ATTEMPTS = 0x3 NL80211_PMSR_FTM_RESP_ATTR_NUM_FTMR_SUCCESSES = 0x4 @@ -5913,7 +5926,7 @@ const ( NL80211_RATE_INFO_HE_RU_ALLOC_52 = 0x1 NL80211_RATE_INFO_HE_RU_ALLOC_996 = 0x5 NL80211_RATE_INFO_HE_RU_ALLOC = 0x11 - NL80211_RATE_INFO_MAX = 0x1d + NL80211_RATE_INFO_MAX = 0x20 NL80211_RATE_INFO_MCS = 0x2 NL80211_RATE_INFO_S1G_MCS = 0x17 NL80211_RATE_INFO_S1G_NSS = 0x18 @@ -6167,7 +6180,7 @@ const ( NL80211_TXRATE_HT = 0x2 NL80211_TXRATE_LEGACY = 0x1 NL80211_TX_RATE_LIMITED = 0x1 - NL80211_TXRATE_MAX = 0x7 + NL80211_TXRATE_MAX = 0xa NL80211_TXRATE_MCS = 0x2 NL80211_TXRATE_VHT = 0x3 NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INT = 0x1 @@ -6183,7 +6196,7 @@ const ( NL80211_WIPHY_RADIO_ATTR_FREQ_RANGE = 0x2 NL80211_WIPHY_RADIO_ATTR_INDEX = 0x1 NL80211_WIPHY_RADIO_ATTR_INTERFACE_COMBINATION = 0x3 - NL80211_WIPHY_RADIO_ATTR_MAX = 0x4 + NL80211_WIPHY_RADIO_ATTR_MAX = 0x5 NL80211_WIPHY_RADIO_FREQ_ATTR_END = 0x2 NL80211_WIPHY_RADIO_FREQ_ATTR_MAX = 0x2 NL80211_WIPHY_RADIO_FREQ_ATTR_START = 0x1 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go index 485f2d3a1..97ef790de 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go @@ -354,6 +354,14 @@ type Taskstats struct { Wpcopy_delay_min uint64 Irq_delay_max uint64 Irq_delay_min uint64 + Cpu_delay_max_ts KernelTimespec + Blkio_delay_max_ts KernelTimespec + Swapin_delay_max_ts KernelTimespec + Freepages_delay_max_ts KernelTimespec + Thrashing_delay_max_ts KernelTimespec + Compact_delay_max_ts KernelTimespec + Wpcopy_delay_max_ts KernelTimespec + Irq_delay_max_ts KernelTimespec } type cpuMask uint32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go index ecbd1ad8b..90b50da68 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go @@ -367,6 +367,14 @@ type Taskstats struct { Wpcopy_delay_min uint64 Irq_delay_max uint64 Irq_delay_min uint64 + Cpu_delay_max_ts KernelTimespec + Blkio_delay_max_ts KernelTimespec + Swapin_delay_max_ts KernelTimespec + Freepages_delay_max_ts KernelTimespec + Thrashing_delay_max_ts KernelTimespec + Compact_delay_max_ts KernelTimespec + Wpcopy_delay_max_ts KernelTimespec + Irq_delay_max_ts KernelTimespec } type cpuMask uint64 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go index 02f0463a4..acda13685 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go @@ -345,6 +345,14 @@ type Taskstats struct { Wpcopy_delay_min uint64 Irq_delay_max uint64 Irq_delay_min uint64 + Cpu_delay_max_ts KernelTimespec + Blkio_delay_max_ts KernelTimespec + Swapin_delay_max_ts KernelTimespec + Freepages_delay_max_ts KernelTimespec + Thrashing_delay_max_ts KernelTimespec + Compact_delay_max_ts KernelTimespec + Wpcopy_delay_max_ts KernelTimespec + Irq_delay_max_ts KernelTimespec } type cpuMask uint32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go index 6f4d400d2..ef7a99e1f 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go @@ -346,6 +346,14 @@ type Taskstats struct { Wpcopy_delay_min uint64 Irq_delay_max uint64 Irq_delay_min uint64 + Cpu_delay_max_ts KernelTimespec + Blkio_delay_max_ts KernelTimespec + Swapin_delay_max_ts KernelTimespec + Freepages_delay_max_ts KernelTimespec + Thrashing_delay_max_ts KernelTimespec + Compact_delay_max_ts KernelTimespec + Wpcopy_delay_max_ts KernelTimespec + Irq_delay_max_ts KernelTimespec } type cpuMask uint64 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go index cd532cfa5..966063dfc 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go @@ -347,6 +347,14 @@ type Taskstats struct { Wpcopy_delay_min uint64 Irq_delay_max uint64 Irq_delay_min uint64 + Cpu_delay_max_ts KernelTimespec + Blkio_delay_max_ts KernelTimespec + Swapin_delay_max_ts KernelTimespec + Freepages_delay_max_ts KernelTimespec + Thrashing_delay_max_ts KernelTimespec + Compact_delay_max_ts KernelTimespec + Wpcopy_delay_max_ts KernelTimespec + Irq_delay_max_ts KernelTimespec } type cpuMask uint64 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go index 413362085..dc53b20b7 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go @@ -350,6 +350,14 @@ type Taskstats struct { Wpcopy_delay_min uint64 Irq_delay_max uint64 Irq_delay_min uint64 + Cpu_delay_max_ts KernelTimespec + Blkio_delay_max_ts KernelTimespec + Swapin_delay_max_ts KernelTimespec + Freepages_delay_max_ts KernelTimespec + Thrashing_delay_max_ts KernelTimespec + Compact_delay_max_ts KernelTimespec + Wpcopy_delay_max_ts KernelTimespec + Irq_delay_max_ts KernelTimespec } type cpuMask uint32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go index eaa37eb71..9ad0aa8c3 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go @@ -349,6 +349,14 @@ type Taskstats struct { Wpcopy_delay_min uint64 Irq_delay_max uint64 Irq_delay_min uint64 + Cpu_delay_max_ts KernelTimespec + Blkio_delay_max_ts KernelTimespec + Swapin_delay_max_ts KernelTimespec + Freepages_delay_max_ts KernelTimespec + Thrashing_delay_max_ts KernelTimespec + Compact_delay_max_ts KernelTimespec + Wpcopy_delay_max_ts KernelTimespec + Irq_delay_max_ts KernelTimespec } type cpuMask uint64 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go index 98ae6a1e4..29d55493d 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go @@ -349,6 +349,14 @@ type Taskstats struct { Wpcopy_delay_min uint64 Irq_delay_max uint64 Irq_delay_min uint64 + Cpu_delay_max_ts KernelTimespec + Blkio_delay_max_ts KernelTimespec + Swapin_delay_max_ts KernelTimespec + Freepages_delay_max_ts KernelTimespec + Thrashing_delay_max_ts KernelTimespec + Compact_delay_max_ts KernelTimespec + Wpcopy_delay_max_ts KernelTimespec + Irq_delay_max_ts KernelTimespec } type cpuMask uint64 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go index cae196159..a4d9e1584 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go @@ -350,6 +350,14 @@ type Taskstats struct { Wpcopy_delay_min uint64 Irq_delay_max uint64 Irq_delay_min uint64 + Cpu_delay_max_ts KernelTimespec + Blkio_delay_max_ts KernelTimespec + Swapin_delay_max_ts KernelTimespec + Freepages_delay_max_ts KernelTimespec + Thrashing_delay_max_ts KernelTimespec + Compact_delay_max_ts KernelTimespec + Wpcopy_delay_max_ts KernelTimespec + Irq_delay_max_ts KernelTimespec } type cpuMask uint32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go index 6ce3b4e02..f8a297771 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go @@ -357,6 +357,14 @@ type Taskstats struct { Wpcopy_delay_min uint64 Irq_delay_max uint64 Irq_delay_min uint64 + Cpu_delay_max_ts KernelTimespec + Blkio_delay_max_ts KernelTimespec + Swapin_delay_max_ts KernelTimespec + Freepages_delay_max_ts KernelTimespec + Thrashing_delay_max_ts KernelTimespec + Compact_delay_max_ts KernelTimespec + Wpcopy_delay_max_ts KernelTimespec + Irq_delay_max_ts KernelTimespec } type cpuMask uint32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go index c7429c6a1..4158d6c4e 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go @@ -356,6 +356,14 @@ type Taskstats struct { Wpcopy_delay_min uint64 Irq_delay_max uint64 Irq_delay_min uint64 + Cpu_delay_max_ts KernelTimespec + Blkio_delay_max_ts KernelTimespec + Swapin_delay_max_ts KernelTimespec + Freepages_delay_max_ts KernelTimespec + Thrashing_delay_max_ts KernelTimespec + Compact_delay_max_ts KernelTimespec + Wpcopy_delay_max_ts KernelTimespec + Irq_delay_max_ts KernelTimespec } type cpuMask uint64 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go index 4bf4baf4c..1035af49f 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go @@ -356,6 +356,14 @@ type Taskstats struct { Wpcopy_delay_min uint64 Irq_delay_max uint64 Irq_delay_min uint64 + Cpu_delay_max_ts KernelTimespec + Blkio_delay_max_ts KernelTimespec + Swapin_delay_max_ts KernelTimespec + Freepages_delay_max_ts KernelTimespec + Thrashing_delay_max_ts KernelTimespec + Compact_delay_max_ts KernelTimespec + Wpcopy_delay_max_ts KernelTimespec + Irq_delay_max_ts KernelTimespec } type cpuMask uint64 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go index e9709d70a..2297125d3 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go @@ -374,6 +374,14 @@ type Taskstats struct { Wpcopy_delay_min uint64 Irq_delay_max uint64 Irq_delay_min uint64 + Cpu_delay_max_ts KernelTimespec + Blkio_delay_max_ts KernelTimespec + Swapin_delay_max_ts KernelTimespec + Freepages_delay_max_ts KernelTimespec + Thrashing_delay_max_ts KernelTimespec + Compact_delay_max_ts KernelTimespec + Wpcopy_delay_max_ts KernelTimespec + Irq_delay_max_ts KernelTimespec } type cpuMask uint64 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go index fb44268ca..8481e9bd9 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go @@ -369,6 +369,14 @@ type Taskstats struct { Wpcopy_delay_min uint64 Irq_delay_max uint64 Irq_delay_min uint64 + Cpu_delay_max_ts KernelTimespec + Blkio_delay_max_ts KernelTimespec + Swapin_delay_max_ts KernelTimespec + Freepages_delay_max_ts KernelTimespec + Thrashing_delay_max_ts KernelTimespec + Compact_delay_max_ts KernelTimespec + Wpcopy_delay_max_ts KernelTimespec + Irq_delay_max_ts KernelTimespec } type cpuMask uint64 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go index 9c38265c7..a6828a031 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go @@ -351,6 +351,14 @@ type Taskstats struct { Wpcopy_delay_min uint64 Irq_delay_max uint64 Irq_delay_min uint64 + Cpu_delay_max_ts KernelTimespec + Blkio_delay_max_ts KernelTimespec + Swapin_delay_max_ts KernelTimespec + Freepages_delay_max_ts KernelTimespec + Thrashing_delay_max_ts KernelTimespec + Compact_delay_max_ts KernelTimespec + Wpcopy_delay_max_ts KernelTimespec + Irq_delay_max_ts KernelTimespec } type cpuMask uint64 diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go index d76643658..9755bca9f 100644 --- a/vendor/golang.org/x/sys/windows/syscall_windows.go +++ b/vendor/golang.org/x/sys/windows/syscall_windows.go @@ -452,6 +452,7 @@ func NewCallbackCDecl(fn interface{}) uintptr { //sys RtlInitString(destinationString *NTString, sourceString *byte) = ntdll.RtlInitString //sys NtCreateFile(handle *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, allocationSize *int64, attributes uint32, share uint32, disposition uint32, options uint32, eabuffer uintptr, ealength uint32) (ntstatus error) = ntdll.NtCreateFile //sys NtCreateNamedPipeFile(pipe *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, share uint32, disposition uint32, options uint32, typ uint32, readMode uint32, completionMode uint32, maxInstances uint32, inboundQuota uint32, outputQuota uint32, timeout *int64) (ntstatus error) = ntdll.NtCreateNamedPipeFile +//sys NtQueryInformationFile(handle Handle, iosb *IO_STATUS_BLOCK, outBuffer *byte, outBufferLen uint32, class uint32) (ntstatus error) = ntdll.NtQueryInformationFile //sys NtSetInformationFile(handle Handle, iosb *IO_STATUS_BLOCK, inBuffer *byte, inBufferLen uint32, class uint32) (ntstatus error) = ntdll.NtSetInformationFile //sys RtlDosPathNameToNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) = ntdll.RtlDosPathNameToNtPathName_U_WithStatus //sys RtlDosPathNameToRelativeNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) = ntdll.RtlDosPathNameToRelativeNtPathName_U_WithStatus @@ -460,6 +461,8 @@ func NewCallbackCDecl(fn interface{}) uintptr { //sys NtSetInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32) (ntstatus error) = ntdll.NtSetInformationProcess //sys NtQuerySystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32, retLen *uint32) (ntstatus error) = ntdll.NtQuerySystemInformation //sys NtSetSystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32) (ntstatus error) = ntdll.NtSetSystemInformation +//sys NtQueryEaFile(handle Handle, iosb *IO_STATUS_BLOCK, outBuffer *byte, outBufferLen uint32, returnSingleEntry bool, eaList *byte, eaListLen uint32, eaIndex *uint32, restartScan bool) (ntstatus error) = ntdll.NtQueryEaFile +//sys NtSetEaFile(handle Handle, iosb *IO_STATUS_BLOCK, inBuffer *byte, inBufferLen uint32) (ntstatus error) = ntdll.NtSetEaFile //sys RtlAddFunctionTable(functionTable *RUNTIME_FUNCTION, entryCount uint32, baseAddress uintptr) (ret bool) = ntdll.RtlAddFunctionTable //sys RtlDeleteFunctionTable(functionTable *RUNTIME_FUNCTION) (ret bool) = ntdll.RtlDeleteFunctionTable @@ -892,9 +895,13 @@ const socket_error = uintptr(^uint32(0)) //sys MultiByteToWideChar(codePage uint32, dwFlags uint32, str *byte, nstr int32, wchar *uint16, nwchar int32) (nwrite int32, err error) = kernel32.MultiByteToWideChar //sys getBestInterfaceEx(sockaddr unsafe.Pointer, pdwBestIfIndex *uint32) (errcode error) = iphlpapi.GetBestInterfaceEx //sys GetIfEntry2Ex(level uint32, row *MibIfRow2) (errcode error) = iphlpapi.GetIfEntry2Ex +//sys GetIfTable2Ex(level uint32, table **MibIfTable2) (errcode error) = iphlpapi.GetIfTable2Ex //sys GetIpForwardEntry2(row *MibIpForwardRow2) (errcode error) = iphlpapi.GetIpForwardEntry2 //sys GetIpForwardTable2(family uint16, table **MibIpForwardTable2) (errcode error) = iphlpapi.GetIpForwardTable2 +//sys GetIpInterfaceEntry(row *MibIpInterfaceRow) (errcode error) = iphlpapi.GetIpInterfaceEntry +//sys GetIpInterfaceTable(family uint16, table **MibIpInterfaceTable) (errcode error) = iphlpapi.GetIpInterfaceTable //sys GetUnicastIpAddressEntry(row *MibUnicastIpAddressRow) (errcode error) = iphlpapi.GetUnicastIpAddressEntry +//sys GetUnicastIpAddressTable(family uint16, table **MibUnicastIpAddressTable) (errcode error) = iphlpapi.GetUnicastIpAddressTable //sys FreeMibTable(memory unsafe.Pointer) = iphlpapi.FreeMibTable //sys NotifyIpInterfaceChange(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) = iphlpapi.NotifyIpInterfaceChange //sys NotifyRouteChange2(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) = iphlpapi.NotifyRouteChange2 @@ -1693,10 +1700,13 @@ func NewNTUnicodeString(s string) (*NTUnicodeString, error) { if err != nil { return nil, err } - n := uint16(len(s16) * 2) + n := len(s16) * 2 + if n > (1<<16)-1 { + return nil, syscall.EINVAL + } return &NTUnicodeString{ - Length: n - 2, // subtract 2 bytes for the NULL terminator - MaximumLength: n, + Length: uint16(n) - 2, // subtract 2 bytes for the NULL terminator + MaximumLength: uint16(n), Buffer: &s16[0], }, nil } diff --git a/vendor/golang.org/x/sys/windows/types_windows.go b/vendor/golang.org/x/sys/windows/types_windows.go index d5658a138..d2574a73e 100644 --- a/vendor/golang.org/x/sys/windows/types_windows.go +++ b/vendor/golang.org/x/sys/windows/types_windows.go @@ -2320,6 +2320,21 @@ type MibIfRow2 struct { OutQLen uint64 } +// MIB_IF_TABLE_LEVEL enumeration from netioapi.h or +// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ne-netioapi-mib_if_table_level. +const ( + MibIfTableNormal = 0 + MibIfTableRaw = 1 + MibIfTableNormalWithoutStatistics = 2 +) + +// MibIfTable2 contains a table of logical and physical interface entries. See +// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ns-netioapi-mib_if_table2. +type MibIfTable2 struct { + NumEntries uint32 + Table [1]MibIfRow2 +} + // IP_ADDRESS_PREFIX stores an IP address prefix. See // https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ns-netioapi-ip_address_prefix. type IpAddressPrefix struct { @@ -2413,6 +2428,13 @@ type MibUnicastIpAddressRow struct { CreationTimeStamp Filetime } +// MibUnicastIpAddressTable contains a table of unicast IP address entries. See +// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ns-netioapi-mib_unicastipaddress_table. +type MibUnicastIpAddressTable struct { + NumEntries uint32 + Table [1]MibUnicastIpAddressRow +} + const ScopeLevelCount = 16 // MIB_IPINTERFACE_ROW stores interface management information for a particular IP address family on a network interface. @@ -2455,6 +2477,13 @@ type MibIpInterfaceRow struct { DisableDefaultRoutes uint8 } +// MibIpInterfaceTable contains a table of IP interface entries. See +// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ns-netioapi-mib_ipinterface_table. +type MibIpInterfaceTable struct { + NumEntries uint32 + Table [1]MibIpInterfaceRow +} + // Console related constants used for the mode parameter to SetConsoleMode. See // https://docs.microsoft.com/en-us/windows/console/setconsolemode for details. @@ -3014,8 +3043,10 @@ const ( ) const ( - // FileInformationClass for NtSetInformationFile + // FileInformationClass for NtSetInformationFile/NtQueryInformationFile, see + // https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/ne-wdm-_file_information_class FileBasicInformation = 4 + FileEaInformation = 7 FileRenameInformation = 10 FileDispositionInformation = 13 FilePositionInformation = 14 diff --git a/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/zsyscall_windows.go index fe7a4ea12..192d19300 100644 --- a/vendor/golang.org/x/sys/windows/zsyscall_windows.go +++ b/vendor/golang.org/x/sys/windows/zsyscall_windows.go @@ -188,9 +188,13 @@ var ( procGetBestInterfaceEx = modiphlpapi.NewProc("GetBestInterfaceEx") procGetIfEntry = modiphlpapi.NewProc("GetIfEntry") procGetIfEntry2Ex = modiphlpapi.NewProc("GetIfEntry2Ex") + procGetIfTable2Ex = modiphlpapi.NewProc("GetIfTable2Ex") procGetIpForwardEntry2 = modiphlpapi.NewProc("GetIpForwardEntry2") procGetIpForwardTable2 = modiphlpapi.NewProc("GetIpForwardTable2") + procGetIpInterfaceEntry = modiphlpapi.NewProc("GetIpInterfaceEntry") + procGetIpInterfaceTable = modiphlpapi.NewProc("GetIpInterfaceTable") procGetUnicastIpAddressEntry = modiphlpapi.NewProc("GetUnicastIpAddressEntry") + procGetUnicastIpAddressTable = modiphlpapi.NewProc("GetUnicastIpAddressTable") procNotifyIpInterfaceChange = modiphlpapi.NewProc("NotifyIpInterfaceChange") procNotifyRouteChange2 = modiphlpapi.NewProc("NotifyRouteChange2") procNotifyUnicastIpAddressChange = modiphlpapi.NewProc("NotifyUnicastIpAddressChange") @@ -424,8 +428,11 @@ var ( procNetUserGetInfo = modnetapi32.NewProc("NetUserGetInfo") procNtCreateFile = modntdll.NewProc("NtCreateFile") procNtCreateNamedPipeFile = modntdll.NewProc("NtCreateNamedPipeFile") + procNtQueryEaFile = modntdll.NewProc("NtQueryEaFile") + procNtQueryInformationFile = modntdll.NewProc("NtQueryInformationFile") procNtQueryInformationProcess = modntdll.NewProc("NtQueryInformationProcess") procNtQuerySystemInformation = modntdll.NewProc("NtQuerySystemInformation") + procNtSetEaFile = modntdll.NewProc("NtSetEaFile") procNtSetInformationFile = modntdll.NewProc("NtSetInformationFile") procNtSetInformationProcess = modntdll.NewProc("NtSetInformationProcess") procNtSetSystemInformation = modntdll.NewProc("NtSetSystemInformation") @@ -1674,6 +1681,14 @@ func GetIfEntry2Ex(level uint32, row *MibIfRow2) (errcode error) { return } +func GetIfTable2Ex(level uint32, table **MibIfTable2) (errcode error) { + r0, _, _ := syscall.SyscallN(procGetIfTable2Ex.Addr(), uintptr(level), uintptr(unsafe.Pointer(table))) + if r0 != 0 { + errcode = syscall.Errno(r0) + } + return +} + func GetIpForwardEntry2(row *MibIpForwardRow2) (errcode error) { r0, _, _ := syscall.SyscallN(procGetIpForwardEntry2.Addr(), uintptr(unsafe.Pointer(row))) if r0 != 0 { @@ -1690,6 +1705,22 @@ func GetIpForwardTable2(family uint16, table **MibIpForwardTable2) (errcode erro return } +func GetIpInterfaceEntry(row *MibIpInterfaceRow) (errcode error) { + r0, _, _ := syscall.SyscallN(procGetIpInterfaceEntry.Addr(), uintptr(unsafe.Pointer(row))) + if r0 != 0 { + errcode = syscall.Errno(r0) + } + return +} + +func GetIpInterfaceTable(family uint16, table **MibIpInterfaceTable) (errcode error) { + r0, _, _ := syscall.SyscallN(procGetIpInterfaceTable.Addr(), uintptr(family), uintptr(unsafe.Pointer(table))) + if r0 != 0 { + errcode = syscall.Errno(r0) + } + return +} + func GetUnicastIpAddressEntry(row *MibUnicastIpAddressRow) (errcode error) { r0, _, _ := syscall.SyscallN(procGetUnicastIpAddressEntry.Addr(), uintptr(unsafe.Pointer(row))) if r0 != 0 { @@ -1698,6 +1729,14 @@ func GetUnicastIpAddressEntry(row *MibUnicastIpAddressRow) (errcode error) { return } +func GetUnicastIpAddressTable(family uint16, table **MibUnicastIpAddressTable) (errcode error) { + r0, _, _ := syscall.SyscallN(procGetUnicastIpAddressTable.Addr(), uintptr(family), uintptr(unsafe.Pointer(table))) + if r0 != 0 { + errcode = syscall.Errno(r0) + } + return +} + func NotifyIpInterfaceChange(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) { var _p0 uint32 if initialNotification { @@ -3704,6 +3743,30 @@ func NtCreateNamedPipeFile(pipe *Handle, access uint32, oa *OBJECT_ATTRIBUTES, i return } +func NtQueryEaFile(handle Handle, iosb *IO_STATUS_BLOCK, outBuffer *byte, outBufferLen uint32, returnSingleEntry bool, eaList *byte, eaListLen uint32, eaIndex *uint32, restartScan bool) (ntstatus error) { + var _p0 uint32 + if returnSingleEntry { + _p0 = 1 + } + var _p1 uint32 + if restartScan { + _p1 = 1 + } + r0, _, _ := syscall.SyscallN(procNtQueryEaFile.Addr(), uintptr(handle), uintptr(unsafe.Pointer(iosb)), uintptr(unsafe.Pointer(outBuffer)), uintptr(outBufferLen), uintptr(_p0), uintptr(unsafe.Pointer(eaList)), uintptr(eaListLen), uintptr(unsafe.Pointer(eaIndex)), uintptr(_p1)) + if r0 != 0 { + ntstatus = NTStatus(r0) + } + return +} + +func NtQueryInformationFile(handle Handle, iosb *IO_STATUS_BLOCK, outBuffer *byte, outBufferLen uint32, class uint32) (ntstatus error) { + r0, _, _ := syscall.SyscallN(procNtQueryInformationFile.Addr(), uintptr(handle), uintptr(unsafe.Pointer(iosb)), uintptr(unsafe.Pointer(outBuffer)), uintptr(outBufferLen), uintptr(class)) + if r0 != 0 { + ntstatus = NTStatus(r0) + } + return +} + func NtQueryInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32, retLen *uint32) (ntstatus error) { r0, _, _ := syscall.SyscallN(procNtQueryInformationProcess.Addr(), uintptr(proc), uintptr(procInfoClass), uintptr(procInfo), uintptr(procInfoLen), uintptr(unsafe.Pointer(retLen))) if r0 != 0 { @@ -3720,6 +3783,14 @@ func NtQuerySystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInf return } +func NtSetEaFile(handle Handle, iosb *IO_STATUS_BLOCK, inBuffer *byte, inBufferLen uint32) (ntstatus error) { + r0, _, _ := syscall.SyscallN(procNtSetEaFile.Addr(), uintptr(handle), uintptr(unsafe.Pointer(iosb)), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferLen)) + if r0 != 0 { + ntstatus = NTStatus(r0) + } + return +} + func NtSetInformationFile(handle Handle, iosb *IO_STATUS_BLOCK, inBuffer *byte, inBufferLen uint32, class uint32) (ntstatus error) { r0, _, _ := syscall.SyscallN(procNtSetInformationFile.Addr(), uintptr(handle), uintptr(unsafe.Pointer(iosb)), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferLen), uintptr(class)) if r0 != 0 { diff --git a/vendor/modules.txt b/vendor/modules.txt index f8339ee1c..1bbec971b 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,6 +1,10 @@ # github.com/Masterminds/semver/v3 v3.5.0 ## explicit; go 1.21 github.com/Masterminds/semver/v3 +# github.com/NVIDIA/go-nvfm v0.0.0-20260528194329-0a8cb60d7cb1 => github.com/varunrsekar/go-nvfm v0.0.0-20260528194329-0a8cb60d7cb1 +## explicit; go 1.24 +github.com/NVIDIA/go-nvfm/pkg/dl +github.com/NVIDIA/go-nvfm/pkg/nvfm # github.com/NVIDIA/go-nvlib v0.10.0 ## explicit; go 1.20 github.com/NVIDIA/go-nvlib/pkg/nvlib/device @@ -293,7 +297,7 @@ golang.org/x/oauth2/internal # golang.org/x/sync v0.20.0 ## explicit; go 1.25.0 golang.org/x/sync/errgroup -# golang.org/x/sys v0.43.0 +# golang.org/x/sys v0.45.0 ## explicit; go 1.25.0 golang.org/x/sys/plan9 golang.org/x/sys/unix @@ -954,3 +958,4 @@ tags.cncf.io/container-device-interface/pkg/parser # tags.cncf.io/container-device-interface/specs-go v1.1.0 ## explicit; go 1.19 tags.cncf.io/container-device-interface/specs-go +# github.com/NVIDIA/go-nvfm => github.com/varunrsekar/go-nvfm v0.0.0-20260528194329-0a8cb60d7cb1