k8snetworkplumbingwg / sriovnet Goto Github PK
View Code? Open in Web Editor NEWGo library/package to configure SRIOV networking devices
License: Apache License 2.0
Go library/package to configure SRIOV networking devices
License: Apache License 2.0
need to make sure this method functions properly when there are mediated devices in the system
a mediated device shares the same uplink physical port name as the uplink which may cause issues when determining the uplink pf name
cat /sys/class/net/enp3s0f0s0/phys_port_name
p0
cat /sys/class/net/p0/phys_port_name
p0
root@k8s-dpu-worker-2:~/dpu-operator/operator# devlink dev
pci/0000:03:00.0
pci/0000:03:00.1
auxiliary/mlx5_core.sf.2
auxiliary/mlx5_core.sf.3
root@k8s-dpu-worker-2:~/dpu-operator/operator# devlink port
pci/0000:03:00.0/262143: type eth netdev p0 flavour physical port 0
pci/0000:03:00.0/196608: type eth netdev pf0hpf flavour pcipf pfnum 0
pci/0000:03:00.1/327679: type eth netdev p1 flavour physical port 1
pci/0000:03:00.1/262144: type eth netdev pf1hpf flavour pcipf pfnum 1
auxiliary/mlx5_core.sf.2/6619136: type eth netdev enp3s0f0s0 flavour physical port 0
auxiliary/mlx5_core.sf.3/8716288: type eth netdev enp3s0f1s0 flavour physical port 0
Current Behavior:
To Bind or Unbind the Vf, UnbindVf()
, need the pfHandler and Vf Object.
Need Behavior:
To do the bind or unbind without one parameter (pci-address or netdev name) using any of the following:
1- echo > /sys/bus/pci/devices//driver/unbind
2- echo > /sys/class/net//device/driver/unbind
3- echo > /sys/bus/pci/drivers/mlx5_core/unbind
Cited code [1] missed to detect uplink rep netdev correctly.
It doesn't read the physical port name to prove that if its uplink rep or not. (p0/p1) etc.
Hence fix it to do
(a) Use devlink port APIs (once its available)
until than,
(b) Read the phys_port_name; compare it with p0,p1,p2,p3.
If (b) fails on older kernel,
default to current way to find out if its uplink or not.
(b) and (c) is still needed as this code may run on kernel that may not have the devlink output.
Hi ,
I'm getting the following error when importing the lib
go: finding module for package github.com/k8snetworkplumbingwg/sriovnet
go: found github.com/k8snetworkplumbingwg/sriovnet in github.com/k8snetworkplumbingwg/sriovnet v1.1.0
go: github.com/gavmckee80/mlx6 imports
github.com/k8snetworkplumbingwg/sriovnet: github.com/k8snetworkplumbingwg/[email protected]: parsing go.mod:
module declares its path as: github.com/Mellanox/sriovnet
but was required as: github.com/k8snetworkplumbingwg/sriovnet
Can someone advise ?
its been a while since we last release.
in addition we did not release after moving this project to k8snetworkplumbingwg.
At the moment the code base only supports sysfs
We need to add integration for devlink
/mlxdevm
as well.
Adding docs + API links:
https://github.com/Mellanox/scalablefunctions/wiki
https://github.com/Mellanox/libmlxdevm
https://github.com/Mellanox/mlxdevm-go
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.