0
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-11-27 23:34:30 +00:00
openwrt/package/base-files/files/lib/preinit
Til Kaiser 503596b8ce base-files: add ucidef_set_network_device_path_port function
The already existing uci function ucidef_set_network_device_path
can be used to specify a unique PCI address to name a network interface.
However, I noticed that some NIC ports share the same PCI address
but are still distinguishable by the dev_port value of the network
interface's sysfs entry.

This commit adds a new uci function ucidef_set_network_device_path_port,
which is similar to ucidef_set_network_device_path but takes an
additional argument where the user can specify the dev_port value.
The internal function preinit_config_port loops through
all network interfaces at the given PCI address and chooses the one
where the dev_port value matches.

This was tested on an x86_64 device using a Mellanox ConnectX-3 card.

Signed-off-by: Til Kaiser <mail@tk154.de>
Link: https://github.com/openwrt/openwrt/pull/16560
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-19 19:10:56 +02:00
..
02_default_set_state treewide: drop shebang from non-executable lib files 2021-01-29 14:29:41 +01:00
02_sysinfo treewide: populate boardname and model earlier 2017-07-15 23:13:34 +02:00
10_indicate_failsafe failsafe: fix console failsafe shell 2024-08-19 18:55:00 +02:00
10_indicate_preinit base-files: add ucidef_set_network_device_path_port function 2024-10-19 19:10:56 +02:00
30_failsafe_wait failsafe: fix console failsafe shell 2024-08-19 18:55:00 +02:00
40_run_failsafe_hook treewide: drop shebang from non-executable lib files 2021-01-29 14:29:41 +01:00
50_indicate_regular_preinit treewide: drop shebang from non-executable lib files 2021-01-29 14:29:41 +01:00
70_initramfs_test treewide: drop shebang from non-executable lib files 2021-01-29 14:29:41 +01:00
80_mount_root base-files: fix merge of passwd/shadow/group lines with trailing colons 2024-08-29 21:07:15 +02:00
99_10_failsafe_login failsafe: fix console failsafe shell 2024-08-19 18:55:00 +02:00
99_10_run_init treewide: drop shebang from non-executable lib files 2021-01-29 14:29:41 +01:00