Hoi folks,

I've noticed a while ago [1] that policer, when applied to an interface (input/output), only works for L3, and it only works on PHY, not sub-interfaces.

I've written https://gerrit.fd.io/r/c/vpp/+/44654 which allows policer to be attached to L3 sub-interfaces, by applying the policer-input in front of ip4-unicast/ip6-unicast in the same way that currently policer-output applies to the ip4-output/ip6-output nodes. For L2, I've added a feature bitmap L2INPUT_FEAT_POLICER and L2OUTPUT_FEAT_POLICER. In the node, we now check for the interface being in L2 mode (additional cost is ~3 cycles). I've also added a test which checks for input/output for sub-interfaces in both L2/L3 modes.

Please take a look.

[1] https://ipng.ch/s/articles/2023/10/21/vpp-ixp-gateway-part-1/

--
Pim van Pelt <[email protected]>
PBVP1-RIPE https://ipng.ch/

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#26719): https://lists.fd.io/g/vpp-dev/message/26719
Mute This Topic: https://lists.fd.io/mt/117359534/21656
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/14379924/21656/631435203/xyzzy 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to