At least in concept, it would be possible to write plugins in languages other than C or C++.
With respect to golang...: cgo might just about work, but the last time I tested it, it cost around 300 clock cycles to cross the c <---> golang boundary. When processing packets at speed, that’s the entire clock cycle budget available to process one packet, and then some. If the go runtime garbage collector decides to run, vpp will surely drop a bunch of packets. That’s a non-starter. Let’s stipulate that if you’re close personal friends with the unsafe package and you’re willing to write ersatz c-code in golang, you might be able to avoid that one. That wouldn’t help mitigate the c <---> golang function call tax problem. Golang is well-suited to the task of building control-plane agents – see the Ligato project - but I think you’ll have more fun than you want trying to build data plane nodes in any language other than C / C++. HTH... Dave From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> On Behalf Of OMER AHARONIAN Sent: Wednesday, March 13, 2019 2:42 PM To: vpp-dev@lists.fd.io Subject: [vpp-dev] VPP plugins development in Go Hi, My name is Omer and I'm planning to start using VPP as part of a project I'm working on. I was trying to find an answer to the following question but without much success. I was hoping you might have the answer. VPP provides the I/S for developing custom plugins that can be hooked into a graph of nodes. I've only seen examples for such plugins written in the C language and was wondering whether other languages Go, for instance, can also be used to write such plugins. Waiting to hear from you, Omer.
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#12518): https://lists.fd.io/g/vpp-dev/message/12518 Mute This Topic: https://lists.fd.io/mt/30419605/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-