Hello VPP community,

I have a few small API improvements and bug fixes related to policers that I would like to submit for review (and obviously expecting merge).

0. Patches 1 & 3 also fixes the init of policer_index_by_sw_if_index[] to ~0 as 0 is a significant value.

1. Improvement: Querying applied policers
As far as I know, there is no way to determine which policer is currently applied to an interface.
I’ve added a CLI command and an API to retrieve this information.
https://gerrit.fd.io/r/c/vpp/+/44693

2. Fix: Out-of-bounds write when removing a policer
Attempting to (incorrectly) remove a policer from an interface can cause an out-of-bounds write on policer_index_by_sw_if_index[], which may lead to a VPP crash.
https://gerrit.fd.io/r/c/vpp/+/44843
I also created an issue for this: https://github.com/FDio/vpp/issues/3681

3. Fix: Multiple policers on a single interface
Currently, multiple policers can be applied to an interface, overwriting the previous index in policer_index_by_sw_if_index[] and leaving nodes on the graph. This patch prevents that behavior by requiring users to unapply a policer before applying another, ensuring consistency.
https://gerrit.fd.io/r/c/vpp/+/44844

4. Improvement: API safeguard against crashes when deleting policers
A policer applied to an interface can still be deleted, which may cause a VPP crash when traffic later arrives on that interface. I’ve introduced a new API call to unapply a policer from any interface it may be associated with, providing a safeguard against this risk.
https://gerrit.fd.io/r/c/vpp/+/44849

Since this is my first set of patches proposed, I would greatly appreciate any feedback you might have.
Looking forward to hearing from you!

Thanks, have a nice day.
Jérôme

____________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations 
confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce 
message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages 
electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou 
falsifie. Merci.

This message and its attachments may contain confidential or privileged 
information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete 
this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been 
modified, changed or falsified.
Thank you.
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#26790): https://lists.fd.io/g/vpp-dev/message/26790
Mute This Topic: https://lists.fd.io/mt/117668657/21656
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/14379924/21656/631435203/xyzzy 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to