to my understanding the device is a dual CPU with a Marvell 88E6352 switch and thus wondering whether each CPU switch facing port (eth0 | eth2) is actually connected to the switch or like the Turris Omnia without a Multi-CPU-DSA patch only one CPU port is connected to the switch?
I am not sure what counts as vlan bug in this thread? VLAN tag/untag with the downstream ports (LAN X) works for me (on the Turris Omnia) with the bridge v command and WAN facing VLAN egress tagging with the ip l command (or via UCI iface settings).
What does not work for me without the Multi-CPU-DSA patch, aside from one CPU switch facing port not being connected to the switch, is VLAN filtering (ip l s dev <device name> ty bridge vlan_filtering 1)
Following through the kernel mailing list thread it seems the discussion to have fizzled out but not being rejected.
Nonetheless, the patch works for the TO.
And apparently the matter would have to be sorted, not sure how many devices with such Multi-CPU-DSA device tree are currently supported by OpenWrt, probably predominately the mvebu target tree, or how many more might spring up.
Can someone explain to me how DSA with only one CPU can even work?
I thought one CPU Port is used for the LAN Ports and the other one is used for the WAN Port.
The problem is on WRT1200 (and on the other WRT* devices too, I guess) that DSA uses the CPU Port that has no hardware mac assigned. So on each reboot a random mac is assigned.
I tried to modify the DTS file to use the CPU Port with the static mac.
But that didn't work. The Links come online (lan1-4,wan) but no communication is possible.
Only the TX packet counters do increase.
Atleast, I was able to disable one CPU Port.
So the unused CPU Port doesn't show up anymore in the system.
Can someone explain why DSA can use one CPU Port and use all ports lan1-4+wan and when using the other CPU Port nothing works, please?
The CPU port that is used by DSA, uses SGMII isn't that limited to 2 RX / 2 TX Queues?
The other one uses RGMII which is limited to 4 RX / 4 TX Queues?
Are those queues, the queues that the driver set ups and uses (and can be viewied with tc)?
So it makes even less sense that both CPU Ports have 8 RX / 8 TX queues?
//edit 3
got it working with the help of dengqf6.
DSA now uses the CPU Port with the hardware mac and the left over CPU port is removed/disabled.
Next I will try to modify mvneta, so it only uses 4 RX/TX (because the CPU port uses rgmii) queues and see how this goes...
//edit 4
Okaayyy that also works, needs some testing but here are the patches:
Reduce tx/rx queues to 4 to match RGMII interface capabilities:
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -637,8 +637,8 @@ static enum cpuhp_state online_hpstate;
/* The hardware supports eight (8) rx queues, but we are only allowing
* the first one to be used. Therefore, let's just allocate one queue.
*/
-static int rxq_number = 8;
-static int txq_number = 8;
+static int rxq_number = 4;
+static int txq_number = 4;
static int rxq_def;
Switch CPU Ports.
Use the CPU Port with hardware mac and faster RGMII interface (over SGMII)
And disable the left over CPU Port.
The same way it works on all the (usually cheaper-) routers which only have a single CPU port to the switch to begin with, by using VLANs to distinguish WAN and LAN traffic over the (trunked) CPU port, splitting and untagging it in the switch fabric.
The RX / TX queues of the various (*)RMII implementations....
Are those the actual "hardware lines"?
So it makes sense to have RGMII with 4 RX/TX Queues attached to the switch (because of 4 ports)
And the SGMII attached to WAN interface (2 RX/TX Queues vs 1 interface)
Are those queues the ones that the driver utilizes?
Is it better to reduce the "driver queues" to 2. So each CPU can handle its own queue?
I think the queues used by (*)MII are not the actual queues used by the nic.
But the (8) queues are pretty much useless anyway.
Because it is not possible to configure them with ethtool.
ethtool -l eth0
Channel parameters for eth0:
Cannot get device channel parameters
: Not supported
This means that your driver has not implemented the ethtool get_channels operation. This could be because the NIC doesn’t support adjusting the number of queues, doesn’t support RSS / multiqueue, or your driver has not been updated to handle this feature.
ethtool -x eth0 (RX flow indirection table)
RX flow hash indirection table for eth0 with 4 RX ring(s):
0: 0
RSS hash key:
Operation not supported
RSS hash function:
toeplitz: on
xor: off
crc32: off
ethtool -n eth0 (RX network flow classification)
4 RX rings available
rxclass: Cannot get RX class rule count: Not supported
RX classification rule retrieval failed
ethtool -k eth0 | grep 'ntuple' ntuple-filters: off [fixed]
So configuring RX/RSS queues doesn't work?
I currently have a build running with only 2 queues (Well actually, 4 queues 2 RX / 2 TX). (one queue for each CPU.)
Then enable XPS, one queue assign to each CPU.
And don't use RPS (and don't see any significant change in CPU utilization anyway), I have read that it can introduce unwanted latency and RSS is the better choice.
But unfortunately, it isn't possible to configure RSS. (I think this is also the reason why one CPU core gets maxed out all the time when there is much traffic load)
//edit
2 queues also work fine.
One "strange" thing to add...
With the packet steering script disabled and 4 queues enabled, the XPS mapping is as follows:
Queue/CPU Mask:
1:1
2:2
3:0
4:1
Why is XPS automatically disabled for one Queue?
With the packet steering script disabled and 2 queues enabled, the XPS mapping is as follows:
Queue/CPU Mask:
1:1
2:2
Hmm...
The first queue shows: 15081 packets transmitted
maxpacket: 0 (max packet size?) how can this be 0?
The second queue shows: 1900689 packets transmitted
maxpacket: 1522, makes more sense...
new_flow_count: 4, seems a bit low to me....
And when I search the forum for some tc output, for example here:
Its the same, most queues show a maxpacket value of 0.
I will try a build with 1 queue, with swconfig that didn't work. maybe it works with DSA...
//edit
Nope.. doesn't work. Interfaces come up but no communication is possible.
The interface(s) packet counter shows a large amount of RX packets..
Hmm...
//edit 3
updated once more...
classify doesn't seem to work either...
Next bet, skbedit...
// edit 4
skbedit also not working...
Maybe it only works with mqprio qdisc but mqprio also doesn't work (also tried hw 0).
So back to the connmark match approach...
The hierarchy looks like this
root/parent 1:0
mq class 1:1 -> leaf 110: fq_codel
mq class 1:2 -> leaf 120: fq_codel
It is not possible to attach filters to root/parent 1: or class 1:1 / 1:2
It is only possible to attach filters to 110: / 120:
Matching for fw mark 1 in 110: makes no sense because it is already in there.
So match for fw mark 2 in 110: and redirect it to 1:2 and the other way around...
But actually I'm not sure if this works properly...