]> git.baikalelectronics.ru Git - kernel.git/commit
net: mscc: ocelot: don't use magic numbers for OCELOT_POLICER_DISCARD
authorVladimir Oltean <vladimir.oltean@nxp.com>
Tue, 3 May 2022 12:01:50 +0000 (15:01 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 5 May 2022 03:42:15 +0000 (20:42 -0700)
commit0e37e28820fda5badb83d821fff97ab20e5c139d
tree32eac9e804685fee26efda0de3b19c9dc99630aa
parent63d7718b5b28cbdadcfb68c5e7c6de2885cb7ee1
net: mscc: ocelot: don't use magic numbers for OCELOT_POLICER_DISCARD

OCELOT_POLICER_DISCARD helps "kill dropped packets dead" since a
PERMIT/DENY mask mode with a port mask of 0 isn't enough to stop the CPU
port from receiving packets removed from the forwarding path.

The hardcoded initialization done for it in ocelot_vcap_init() is
confusing. All we need from it is to have a rate and a burst size of 0.

Reuse qos_policer_conf_set() for that purpose.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mscc/ocelot_vcap.c