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.
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.
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.
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.
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.
- 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.
- 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.
- Enhance support to cover ipv6 rules
- Add support to differentiate between l2 and l3 rules
- Resolve bug related to source interface for output chain
- All params apart from ifname converted to intergers.
- Output of stats for a particular interface now available.
- The ubus call accepts qid as integer.
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.
* 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.
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.