]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: felix: use vcap policer to set flow meter for psfp
authorXiaoliang Yang <xiaoliang.yang_1@nxp.com>
Thu, 18 Nov 2021 10:12:03 +0000 (18:12 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 Nov 2021 12:07:24 +0000 (12:07 +0000)
commit09fbd6a382e9b9f21ce72b6397942f413987435f
tree96521f5bb457933c4a2e533ffe2513a0d26711a3
parent7730789594a7741ccf2b97848aa2fd9005d42a11
net: dsa: felix: use vcap policer to set flow meter for psfp

This patch add police action to set flow meter table which is defined
in IEEE802.1Qci. Flow metering is two rates two buckets and three color
marker to policing the frames, we only enable one rate one bucket in
this patch.

Flow metering shares a same policer pool with VCAP policers, so the PSFP
policer calls ocelot_vcap_policer_add() and ocelot_vcap_policer_del() to
set flow meter police.

Signed-off-by: Xiaoliang Yang <xiaoliang.yang_1@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/ocelot/felix_vsc9959.c