Commit graph

47 commits

Author SHA1 Message Date
Andreas Gnau
d2b9140468 treewide: Add PKG_MIRROR_HASH:=skip to pkgs downloaded from git
OpenWrt 21.02 will redownload from git over and over if PKG_MIRROR_HASH
is not set. Set it to skip to prevent it from happening.
2021-03-15 10:57:13 +01:00
Rahul
4f820cd74c qosmngr: fix bug #4389 on devel
More generic fix to extract port index from port itself.
2021-02-16 15:30:28 +05:30
Rahul
a8e48ca428 qosmngr: fix 4323 on devel
Although no devel panther or FT is not supported as yet but that
might be the case in near future so keeping it same here plus,
bs alias should be replaced with proper bdmf_shell command anyway
so this is done here as well. No regression, no harm.
2021-02-16 13:29:06 +05:30
Shubham Sharma
613ef10273 qosmngr: C daemon for gathering queue stats 2021-01-12 14:17:06 +05:30
Rahul
01cf113338 qosmngr: fix regression
Changes to resolve bug #4010 and #4011 are moved to devel as well.

Test: regression run on dg400prime devel, all test pass now
2020-12-12 16:23:58 +05:30
Rahul
17fd0ab28a qosmngr: update default config
Precedence value update to map with tr181 in default config,
now goes from 1 to 8, 8 meaning queue has lowest priority and 1
meaning that the queue has highest priority.

The broadcom script takes care of reversing this and mapping this
to 0 to 7 before configuring actual queues.
2020-12-03 17:50:45 +01:00
Rahul
14e54fbf04 qosmngr: fix regression
latest patch to resolve precedence issue causes regression.
Bug: queues for any port not configured at boot
fix: create the folders which store queue precedence
2020-12-02 19:10:16 +05:30
jjoseph
38f737fa20 qosmngr: Bug #3822: TR-181: Some Device.QoS.Queue parameters are returning invalid values 2020-12-02 06:26:48 +00:00
Rahul
4b707a26f4 Fix Bug #3822: BurstSize default value updated
The default value of burst size in config is set to -1 which is one
part of the problem. The other part of the problem is that the check
in tr181 is not good enough to disallow negative values. That will
be fixed in a seprate patch.
2020-11-17 16:32:29 +05:30
Sukru Senli
c9b2973ac8 qosmngr: correct cpu_model check 2020-11-13 22:51:13 +01:00
Sukru Senli
6f15e7ff27 qos: skip policer config for BCM6755 2020-11-13 22:37:38 +01:00
Rahul
bbbbdf9650 qosmngr: add log
Syslog added to log non-availability of traffic policing on the wan
port on 63138, this is a chip level limitation.
2020-10-14 15:13:50 +05:30
Rahul
98071d157d qosmngr: add support for dhcp options as classification params
DHCP option value 60, 61 and 77 can now be used to identify lan
clients. Details of UCI as follows:

config classify
    option src_vendor_class_id 'abc' // DHCP option 60.
    option dst_vendor_class_id 'abc' // DHCP option 60.
    option src_client_id 'xyz'       // DHCP option 61
    option dst_client_id 'xyz'       // DHCP option 61
    option src_user_class_id 'dfg'   // DHCP option 77
    option dst_user_class_id 'dfg'   // DHCP option 77
2020-10-14 11:31:48 +05:30
Rahul
54cc458a2d qosmngr: add support for upstream policing on dg400prime 2020-10-12 22:32:39 +05:30
Rahul
208b2cc8e5 qosmngr: add support for traffic policing
Support for traffic policing added to allow configuration of
ingress rate limiting.

Test (on panther):
- ingress rate limiting on per lan port basis for US traffic.
- ingress rate limiting on wan port for DS traffic.
- when ingress rate limiting is applied on traffic in one direction,
  then traffic in other direction remains un-affected, that is, if
  ingress rate limiting is applied in DS, then US traffic on the port
  is unaffected

Note: Autotest are ready and will be merge for now with the tag not_ready.
Once devel is ready or if we decide to merge this to release-5.3, the same
can be tagged ready and executed as part of nightly suite.
2020-09-29 19:36:03 +05:30
Rahul
90c5c5c52c qosmngr: add support for mixed mode
A couple of bugs detected during autotest are resolved, details as
follows:
1. Assumes precedence is qid, which is incorrect, does not allow config
of WRR queues which require precedence to be 0 for all queues.

As a consequence, the logic to configure and read queue stats had to be
updated, no change in behaviour though, that is, no regression.

As a neat outcome of this change, mixed mode scheduling can now be configured
on upstream queues, for which autotests are also being added now.

To verify that no regression is caused by this change, QoS L2 and L3 suite
were executed on both platform and were found to pass, hence, this change
is ready to submit.
2020-09-06 09:43:42 +05:30
Rahul
847b27c879 qosmngr: flush flows
After every QoS config, it is required that flows are flushed. Instead
of doing this as an extrenal step, its good to integrate this in the
qosmngr itself so that each config is atomically competent enough to
take effect with any further steps needed manually.
2020-08-31 15:42:30 +05:30
Rahul
a06ffa00ce qosmngr: clean shaper config
Bug identified: if a shaper config is removed from the UCI file,
it still remains active on the port since the logic to clean shaper
config is missing in the qosmngr.

Resolution: clean shapers on each reload so that fresh config takes
place as per the UCI file.
2020-08-28 14:19:06 +05:30
Rahul
c1e7c8f103 qosmngr: improve l2 classification logic
I noticed that there is a potential improvement in the way the
ebtables rules are generated from the UCI file. The thing is,
a restart of the firewall does not flush the ebtables, so, the
ebtables have to flushed by adding the ebtables -t broute -F
command in the firewall.qos (or any other script) to remove the
rules generated by firewall.qos. This also flushes the rule that
directed the lookup of the qos chain. Now, to the rule to lookup
qos chain needs to be manually added which I think is not the best
thing to do. The qosmngr should be independent in this regard, hence,
this improvement.
2020-08-26 17:03:59 +05:30
Rahul
a8960be7b5 qosmngr: cumulative counters on dg400prime and eg400
The runner hardware on both the chips are different due to which
the operation of counter read on dg400prime and eg400 units is
actually a read and reset. As a result cumulative counter values
are not available.

To uniformalise the behaviour of qosmngr across platforms, handling
is added to represent cumulative value of counters.

Test:
Scripts that were earlier failing on dg400prime and passing on panther
in the QoS L3 suite were executed and with this fix scripts pass on both
the platforms. This is a good enough indicator beside the manual tests,
that the issue now stands resolved.

Note: pending scripts can now be closed with this fix.
2020-08-24 16:35:05 +05:30
Rahul
36e9c3a3d7 mcastmngr: updates
- Default filter value updated as per requirements.
- Logic added to modify filter ip address as accepted in /var/mcpd.conf
  in broadcom.sh

Noticed one hard coding in qos, fixed that too.
2020-06-09 13:31:33 +05:30
Rahul
c2b993b494 qosmngr: improvements
- ubus call for reloading each individual service as well as all of
  qos added.
- init script modified to call ubus call and also to have a boot and
  restart section.
- to have separate uci parameters for detination mask and source mask
  make no sense, both destination/source ip and mask in tr181 should
  map to destination/source ip uci parameter, updated.
- firewall rules added by qos are moved to a separate chain, flushing
  is hence restricted to this chain only.
- the hotplug is not really required, hence removed.
2020-06-08 18:44:51 +05:30
Rahul
776dc46d49 qosmngr: fix start up issues
Fixes the issue related to queue setup at boot.
Also resolved classification when source port is used as the
criteria.
2020-05-31 20:36:05 +05:30
Sukru Senli
182b08fcbf qosmngr: broadcom needs qsize set 2020-05-30 13:43:51 +02:00
Rahul
5e41b8c3bc qosmngr: enhance support plus fix some bugs
- Enhance support to cover ipv6 rules
- Add support to differentiate between l2 and l3 rules
- Resolve bug related to source interface for output chain
2020-05-29 18:02:09 +05:30
Rohit Topno
4652ec7399 qosmngr: Added support for ip6tables and other change for ifname uci option 2020-05-29 15:24:49 +05:30
Rahul
123e2df9fa qosmngr: update qos stats as per feedback
- All params apart from ifname converted to intergers.
- Output of stats for a particular interface now available.
- The ubus call accepts qid as integer.
2020-05-28 08:44:16 +05:30
Rahul
ef4570dd83 qosmngr: fix port related config issue
Bug found in specifying input port as classification criteria,
fixed with this change.
2020-05-23 19:33:11 +05:30
Rohit Topno
56273668d6 qosmngr: Simplified code for writing iptables rules 2020-05-22 16:10:39 +05:30
Rahul
413c86b854 qosmngr: fix uci param name
The uci parameter name for destination mac address is incorrect.
It should be dst_mac and dest_mac, the same is rectified with this
change.
2020-05-22 13:34:56 +05:30
Rohit Topno
53d9ff537d qosmngr: Made iptables rule addition through single function and other changes 2020-05-21 14:00:06 +05:30
Rohit Topno
024d1bf061 qosmngr: Support for mapping internal packets to queue based on packet length 2020-05-20 21:15:17 +05:30
Rahul
9108848387 qosmngr: update ubus call for queue stats
Update the rpcd to enable fetching stats for particular queue of an
interface.
Also, move all broadcom specific functions to broadcom.sh so that the
rpcd is soc agnostic.
2020-05-20 17:12:50 +05:30
Rohit Topno
81fb5ff455 qosmngr: Support for mapping IP packets to queue based on packet length. 2020-05-20 15:12:16 +05:30
Rahul
53a52bc455 qosmngr: Add service trigger
The service trigger was missing from the init file, added.
2020-05-18 09:49:41 +05:30
Rahul
895cfbc4f0 qosmngr: Add support for L2 classification
* Support of the QoS.Classify object parameters is extended to cover
L2 scenarios.
* There was a mistake in the way p-bit to queue mapping was configured,
that has been corrected now.

For now, qosmngr write L2 classification rules into /tmp/qos/classify.ebtables
file and then executes this script to apply the classification rules.

Decision on whether to go for this or to add this script to firewall uci
default config will be taken at the time of integration.

Note: before enabling qosmngr in devel, firewall.qos should be removed.
All QoS handling should be done from qosmngr.
2020-05-14 16:49:39 +05:30
Rohit Topno
e8ddd67747 qosmngr: 4.4.4.25: Support for DSCP mark and remark based on L3 classifier supported by the system 2020-05-14 14:40:53 +05:30
Sukru Senli
ec443bbb91 qosmngr: remove reference to db layer2 option 2020-04-22 11:40:35 +02:00
Sukru Senli
2afe82e86b qosmngr: depend on existence of tool 2020-04-19 20:08:59 +02:00
Rahul
71ee9e3311 qosmngr: introduce enable in queue and shaper section
Introduce enable in the queue and shaper section in qos config, if
disabled, configuration not done for that instance.

Fixed some bugs in the broadcom.sh script.

Note: The broadcom.sh script has not been updated to take into account
the fact that the board 6846 does not have enough queues available.
This script is kept so for the same of flexibility. The number of queues
per port can be controlled from the uci file now which easily available
and configurable.
2020-04-09 14:26:49 +05:30
Rahul
78bab83bed qosmngr: rename the queue section name
rename the queue section name from q<0-4? to queue numbers being per
interface, so it is now for example q<0-7>_eth<0-5>
2020-04-07 20:58:17 +05:30
Rahul
9745a16694 qosmngr: fix default queue config generation
In case there is a valid config in the uci file, the script should
do nothing.
2020-04-07 13:14:35 +05:30
Sukru Senli
158f1d94a6 qosmngr: qos init script is platform unaware 2020-04-07 08:39:05 +02:00
Rahul
bdb29afd54 qosmngr: generating queue config dynamically
Changes done to generate uci config for queue from uci-defaults script
instead of using hard coded values.
2020-04-07 12:02:36 +05:30
Rohit Topno
2c18313c13 qosmngr: updated UCI file for eth3, eth4 and eth5 2020-04-06 18:49:24 +05:30
Rohit Topno
5ddc513d5d Changed the way the UCI file is read. now using functions defined in /lib/functions.sh 2020-04-04 18:24:35 +05:30
Rahul
dd00b7eb2e qosmngr: merging qosmngr to devel 2020-02-13 18:57:16 +05:30