l3 iptables rule with ethx was not matching this was causing incorrect classification to wrong queue.
ebtables rule correction done with ethertype,protocol and port to classify packet for destination queue.
When using the runner accelerator we need to check how to
map between ethernet interfaces (i.e eth0) and the internal
names used by the runner (i.e. port/index=lan2). Depending on
the hardware the mapping is not always 1:1 as assumed earlier.
This commit also fixes a minor bug with resetting traffic
shaping for the archer accelerator.
In 5.04, broadcom seems to have removed the support for skbvlan extension
from the kernel, although its presence still in the userspace application
is confusing, ideally, it should be removed from the userspace application
as well. Instead of skbvlan, the vlan extension is used for configuring the
vlan qos.
Hence, the qosmngr is updated to use vlan extension instead of skbvlan.
We need to use 'brcm_fw_tool' instead of /proc/cpuinfo
to check the hardware platform. The /proc/cpuinfo API
is not stable. It only works as expected for BCM96846.
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.
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.
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
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.
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.
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.