remove rps/xps configuration support It is overly complex, yet does not cover common scenarios very well. It will be replaced with a simpler shell script that provides a better default policy Signed-off-by: Felix Fietkau <nbd@nbd.name>
config: suppress error if no wireless config present (FS#1030) Wireless config is optional as not all targets have a wireless interface; therefore don't report an error if the wireless config is missing so network reload is not reporting an error to the user. While at it use netifd_log_message to print an error if the config cannot be loaded. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
allow setting rps/xps defualt values via uci Signed-off-by: John Crispin <john@phrozen.org>
netifd: propagate error code on netifd_reload() The context is that we generate some of the UCI config for netifd via scripts/programs. Every once in a while, there's a goof when doing that UCI generation, and netifd prints out the error at stderr, but returns 0 (success) err-code. This change will fail the ubus call if UCI config is invalid or missing for /etc/config/network. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com> Acked-by: Hans Dedecker <dedeckeh@gmail.com>
device: add device handler list Device handlers now also declare if they have bridge capabilities and include a string to prefix device names for their types. Signed-off-by: Arne Kappen <akappen@inet.tu-berlin.de> Signed-off-by: Felix Fietkau <nbd@nbd.name> [cleanup/fixes]
device: prepare for adding device handlers dynamically - remove const from device handler struct - pass device handler type to create function Signed-off-by: Arne Kappen <akappen@inet.tu-berlin.de> Signed-off-by: Felix Fietkau <nbd@nbd.name> [cleanup]
netifd: Support for configurable default packet steering behavior The default packet steering behavior can be configured via the parameter default_ps in the global section; the default value is true to keep backwards compatibility. Device packet steering (rps/xps) config can still be used to override the default behavior. This allows you to disable packet steering for all devices without the need to define a device config list which disables receive/transmit packet steering Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
interface: remove obsolete device config apply code Signed-off-by: Felix Fietkau <nbd@openwrt.org>
netifd:Make sure interface device config is also cached Fixes issue interface device config is not applied in some cases. As the interface device config was applied but not always cached; an interface device config diff was not always detected. Simplify device config setting by exposing as api only device_apply_config Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
netifd: Set interface device config when device has old settings If interface device settings are removed in UCI they were not removed in the device settings; calling device_set_config when device settings are present solves this. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Revert "interface: do not set device_config where only the ifname option matches" This reverts commit 8dd2eedafccc9f898d391b93a59efb1412c5b5e9. This commit was reported to cause a regression with setting MTU on interfaces. Signed-off-by: Felix Fietkau <nbd@openwrt.org>
netifd: Remove unnecessary default_config check in config_parse_interface No need to check default_config twice as it's already checked in config_parse_interface Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
netifd: set current_config for simple devices when parsing device config If currrent_config is not set when the simple device config is applied the device will be deleted in device_reset_old Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
interface: suppress unnecessary device config overrides Signed-off-by: Felix Fietkau <nbd@openwrt.org>
device: simplify config blob memory allocation handling Signed-off-by: Felix Fietkau <nbd@openwrt.org>
interface: do not set device_config where only the ifname option matches Signed-off-by: Felix Fietkau <nbd@openwrt.org>
device: apply config changes from device sections Signed-off-by: Felix Fietkau <nbd@openwrt.org>
device: set dev->default_config to false for devices parsed from config Signed-off-by: Felix Fietkau <nbd@openwrt.org>
device: add support for specifying a configuration for simple vlan devices Signed-off-by: Felix Fietkau <nbd@openwrt.org>
config: use sprintf instead of asprintf Signed-off-by: Felix Fietkau <nbd@openwrt.org>