luci-mod-network: manage new packet steering script
authorPaul Donald <newtwen+github@gmail.com>
Tue, 30 Apr 2024 13:15:58 +0000 (15:15 +0200)
committerPaul Donald <newtwen+github@gmail.com>
Tue, 30 Apr 2024 13:16:37 +0000 (15:16 +0200)
Due to the changing on script from this commit https://github.com/openwrt/openwrt/commit/7ebcf2fb9c5db8b75666761f5e767c91abb1f437 I suggest
these changing to select "old style" or "new style" with steering_flow

Signed-off-by: Andrea Pesaresi <andreapesaresi82@gmail.com>
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js

index 8825b5201cb06a0272837a7b9cda62b896039849..3163b5515be434ba9fa56ebbd018b0ce1a339aa3 100644 (file)
@@ -1595,9 +1595,23 @@ return view.extend({
                        _('This prefix is randomly generated at first install.'));
                o.datatype = 'cidr6';
 
-               o = s.option(form.Flag, 'packet_steering', _('Packet Steering'), _('Enable packet steering across all CPUs. May help or hinder network speed.'));
+               o = s.option(form.ListValue, 'packet_steering', _('Packet Steering'), _('Enable packet steering across CPUs. May help or hinder network speed.'));
+               o.value('', _('Disabled'));
+               o.value('1',_('Enabled'));
+               o.value('2',_('Enabled (all CPUs)'));
                o.optional = true;
-
+                               
+               var steer_flow = uci.get('network', 'globals', 'steering_flows');       
+               
+               o = s.option(form.Value, 'steering_flows', _('Steering flows (<abbr title="Receive Packet Steering">RPS</abbr>)'),
+                       _('Directs packet flows to specific CPUs where the local socket owner listens (the local service).') + ' ' +
+                       _('Note: this setting is for local services on the device only (not for forwarding).'));
+               o.value('', _('Standard: none'));
+               o.value('128', _('Suggested: 128'));
+               o.value('256', _('256'));
+               o.depends('packet_steering', '1');
+               o.depends('packet_steering', '2');
+               o.default = steer_flow;
 
                if (dslModemType != null) {
                        s = m.section(form.TypedSection, 'dsl', _('DSL'));