forked from k8snetworkplumbingwg/sriov-network-device-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Using udev rule to change Netdev name
- Loading branch information
Showing
2 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# Additional documentation | ||
This page contains supplimentary documention that users may find useful for various use-cases with SR-IOV network device plugin. | ||
|
||
* [Running DPDK application in Kubernetes](dpdk/) | ||
* [Running DPDK application in Kubernetes](dpdk/) | ||
* [Using UDEV Rules for changing NIC's network device name](udev/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Using UDEV Rules for changing NIC's network device name | ||
|
||
To allow "pfNames" selector to consistently select a specific device across nodes it is required to define a fixed network device name. UDEV rules allow the user to change the NIC's network device name every time the node get rebooted: | ||
|
||
1. Add a new rule: | ||
``` | ||
# vi /etc/udev/rules.d/90-netnames.rules | ||
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", KERNELS=="0000:02:00.0", NAME="pf0s0f1" | ||
``` | ||
|
||
`SUBSYSTEM` Match against the subsystem of the device | ||
`ACTION` Action to be done at the next reboot | ||
`DRIVER` Match against the name of the driver backing the device | ||
`KERNELS` Match against the kernel name for the device, here the pci address | ||
`NAME` The new name for the NIC | ||
|
||
2. Run udev commands | ||
``` | ||
# udevadm control --reload | ||
# udevadm trigger --action=add -attr-match=subsystem=net | ||
``` | ||
|
||
3. Reboot the machine or reload the driver for the NIC |