How to add support for my custom vpp plugin to vpp-agent? #1624
-
Hi. I have completed the following tasks so far.
I found that when I did the above, my custom vpp's binapi was compatible with vpp-agent v3 HEAD (vpp-ver 20.01). I would like to know how you are adding support for plugins for each vpp version. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 6 replies
-
Hello @DreamerKMP, The proper way to implement support for custom VPP plugin(s) functionality depends on a way you use the VPP Agent project. Ways to use VPP AgentThe VPP Agent can be used in various different ways:
1. Using the official vpp-agentThis option is used and recommended only for testing or during development. This option can be skipped for your use-case, because adding support for custom VPP plugin to VPP Agent is NOT possible without code modifications. However, it might be possible in the future. 2. Using a forked vpp-agentFork the vpp-agent repository and modify its code to build customized vpp-agent. This option is NOT a recommend way to use VPP Agent, because it might complicate project maintenance due possible conflicts when updating the fork.
Here are PRs you can use this as reference for all the changes required to add support of some VPP functionality: Adding support of new VPP interface types:
Adding support for existing VPP functionality:
3. Using the vpp-agent as a libraryDevelop your own Go app/agent/program/.. using dependency on If you currently do not use the VPP Agent as a library and if its possible in your case (see: 2. option why), I suggest to consider switching to this way of using VPP Agent, because it will allow you to only use parts (plugins) of VPP Agent that you really need without modifying existing code, while also making updates (Go module dependencies) very straight-forward. |
Beta Was this translation helpful? Give feedback.
-
As you say, the 3rd option may apply to me. So I'm going to use vpp-agent as a library. In this case it sounds like I should make my custom-vpp-agent by referring to In fact, I'm not sure where and how to start it. I'm new to vpp-agent. So I wonder if you can give me a very simple example or a supplement to the 3rd option. |
Beta Was this translation helpful? Give feedback.
-
You could start with something like this: https://github.com/ligato/vpp-agent/blob/master/examples/tutorials/101_custom-vppagent/main.go |
Beta Was this translation helpful? Give feedback.
-
To add support for your VPP plugin, you will need to:
I think I mentioned most of the required steps, but might have missed something. |
Beta Was this translation helpful? Give feedback.
-
Example for custom VPP plugin has been added recently: https://github.com/ligato/vpp-agent/blob/master/examples/customize/custom_vpp_plugin/README.md |
Beta Was this translation helpful? Give feedback.
Hello @DreamerKMP,
The proper way to implement support for custom VPP plugin(s) functionality depends on a way you use the VPP Agent project.
Ways to use VPP Agent
The VPP Agent can be used in various different ways:
1. Using the official vpp-agent
This option is used and recommended only for testing or during development.
This option can be skipped for your use-case, because adding support for custom VPP plugin to VPP Agent is NOT possible without code modifications. However, it mig…