Hoi folks,

On 2026-01-20 00:50, Benoit Ganne (bganne) via lists.fd.io wrote:
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.

Thanks Pim, I have a couple of comments but maybe this specific one warrants a bit more discussions: if I am not mistaken, moving from device-input to ip-unicast changes the policer accounting: the policer uses vlib_buffer_length_in_chain() to get the packet length which is dependent upon b->current_length and this gets updated when me move b->current_data, so the length you get on device-input should take into account the ethernet header whereas the length you get on ip-unicast should not. This is not a big change for big packets, but it can be for smaller ones. Now, I do not know if we want to take into account the Ethernet header or not when policing.
I haven't heard back - so I've went ahead and uploaded PS6 which will make the accounting be the same in all eight cases (l2,l3) x (ingress, egress) x (PHY, SUB) https://gerrit.fd.io/r/c/vpp/+/44654 now takes into account the ethernet header, with a slight regression on L3 ingress path only. PTAL

groet,
Pim

--
Pim van Pelt <[email protected]>
PBVP1-RIPE https://ipng.ch/
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#26734): https://lists.fd.io/g/vpp-dev/message/26734
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