diff options
author | Hans Dedecker <dedeckeh@gmail.com> | 2015-05-12 13:11:52 +0200 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2015-05-12 19:24:53 +0200 |
commit | 6906beee9df0942fc4e8f27faa8dd3c6ef32cfd7 (patch) | |
tree | 7e84dea00b647e5c256c59aa8e53e1d8b96f0cff /config.c | |
parent | d0dcf744ba054c9b572be63519b1415685353c8d (diff) |
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>
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -306,6 +306,12 @@ config_init_globals(void) const char *ula_prefix = uci_lookup_option_string( uci_ctx, globals, "ula_prefix"); interface_ip_set_ula_prefix(ula_prefix); + + const char *default_ps = uci_lookup_option_string( + uci_ctx, globals, "default_ps"); + + if (default_ps) + device_set_default_ps(strcmp(default_ps, "1") ? false : true); } static void |