I found a problem that it seems that the storm policer for CPU port doesnot work.
According to the document LS1028ARM, flooding frames can be policed by the storm policers, inculding frames that are flooded to the CPU port.
As known, a unicast frame whoes DMAC is not learned by the machine will be flooded to all ports except the source port. According to the kernel code, the CPU port is set in the unicast flooding PGID:
To test that, I send unknown unicast frames to the machine, and the CPU is indeed occupied by 100% usage.
To avoide this, I want to use the storm policer to limite the rate of packes flooding to the CPU. So I configered the register STORMLIMIT_CFG like this:
The result of this test tells that this configuration seems not work, because the usage of CPU is still 100%. But when I set the field STORM_MODE of this register to 3(so that both the CPU port and the front port flooding rate will be limited). This time, the result show that the front port flooding rate do limited to 1 frame/sec, but the CPU usage is still almost 100%.
It seems that the storm policer for CPU port does not work. Could you please have a look of this problem? It will be very kind of you if you can give some guidance of how to limit the rate of frames flooding to the CPU port.
Thanks a lot.
Frames where the DMAC lookup returned a PGID with the CPU port set are always forwarded to the CPU even when the frame is policed by the storm policers.
So this storm policers should not work for the CPU port.