Commits
Murali Karicheri committed dcd8b5253b6
net: ethernet: prueth: add support for storm prevention control Layer 2 broadcast (bc) storm is defined as an excessive amount of broadcast frames at the ingress of the Ethernet interface. It may occur in a network due to invalid configuration or some other reason. This patch introduces a credit based storm prevention control scheme. The firmware can be configured to allow a certain amount of broadcast traffic in a 100 msec window to the Host or ARM. Once this feature is enabled, firmware on receiving a bc frame, decrements the credit value. As soon as the credit value becomes zero, firmware starts drop the broadcast frames until it becomes non zero again. So firmware limits the number of broadcast frames send to Host or ARM during a 100 msec window to the credit value. Driver refreshes the counter every 100 msec thereby restarting the 100 msec cycle. User can set the credit value using the sysfs file /sys/devices/platform/prussX_eth/ethY/nsp_credit where X is 1 for ICSS1 and 2 for ICSS2 and Y is 2-5 Signed-off-by: Murali Karicheri <m-karicheri2@ti.com> Signed-off-by: Aaron Kramer <a-kramer@ti.com>