]> git.baikalelectronics.ru Git - kernel.git/commit
prestera: acl: add action hw_stats support
authorVolodymyr Mytnyk <vmytnyk@marvell.com>
Tue, 5 Apr 2022 13:20:14 +0000 (16:20 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 7 Apr 2022 05:47:38 +0000 (22:47 -0700)
commit4f269faa2b2ff14d7c694e87b74eff1ddca25a0b
tree5610fc8121b8f647fb335133cfa808882008a446
parent4b8dff93b73057328f94d0ecc4ac378c0e084d28
prestera: acl: add action hw_stats support

Currently, when user adds a tc action and the action gets offloaded,
the user expects the HW stats to be counted also. This limits the
amount of supported offloaded filters, as HW counter resources may
be quite limited. Without counter assigned, the HW is capable to
carry much more filters.

To resolve the issue above, the following types of HW stats are
offloaded and supported by the driver:

any       - current default, user does not care about the type.
delayed   - polled from HW periodically.
disabled  - no HW stats needed.
immediate - not supported.

Example:
  tc filter add dev PORT ingress proto ip flower skip_sw ip_proto 0x11 \
    action drop
  tc filter add dev PORT ingress proto ip flower skip_sw ip_proto 0x12 \
    action drop hw_stats disabled
  tc filter add dev sw1p1 ingress proto ip flower skip_sw ip_proto 0x14 \
    action drop hw_stats delayed

Signed-off-by: Volodymyr Mytnyk <vmytnyk@marvell.com>
Link: https://lore.kernel.org/r/1649164814-18731-1-git-send-email-volodymyr.mytnyk@plvision.eu
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/marvell/prestera/prestera_acl.c
drivers/net/ethernet/marvell/prestera/prestera_flower.c