Option 3.5, if one plans to use any of the transport protocols, would be to write a builtin application, as opposed to using vcl/raw session layer apis.
Florin > On Nov 12, 2018, at 11:47 PM, Ole Troan <otr...@employees.org> wrote: > > Hi again, > >> yes, we have a control plane, and the protocols I mentioned below run in the >> control plane. >> when these protocols want to send packets, they organize their own protocol >> data then call inet raw socket to set the IP header and link header. when >> received a packet from the interface, first we will stripe the link header >> and ip header then hand over to the corresponding modules through inet raw >> socket. Now can you know what I want to do? > > There are a number of ways a control plane can (or could) integrate with VPP. > Which one is most suitable for you depends. > > 1) Mirror interfaces. As described in > https://wiki.fd.io/view/VPP_Sandbox/router > Each VPP interface is mirrored as a Linux TAP interface. Any traffic destined > to an interface address in VPP is forwarded to the TAP interface. > Any packet received on the TAP interface is shipped out the physical > interface. > All Linux tools and applications work unchanged. Including use of raw sockets. > A all or nothing approach. And might not be suitable for cases with lots of > (virtual) interfaces. > > 2) Separate punt interface. Transport using memif and/or Unix domain socket. > Control plane registeres with VPP which protoocols it wants. E.g. a DHCP > server registeres for UDP port 69, > an IPv6 ND daemon registres for a set of ICMPv6 types. > Raw packets sent over transport with meta data. Likewise when CP sends > packet, it includes meta-data to specify outgoing interface and/or VPP > processing graph node. > See https://git.fd.io/vpp/tree/src/vnet/ip/punt.h#n44 > This is currently only used by https://pypi.org/project/dhcpkit-vpp/ > Gaps: > - Missing selectors (only UDP supported) > - Missing transports (only UDS) > - Missing throttling and QoS > > 3) Integrate with VPP host stack. > For TCP VPP exposes an API that control plane applications can use. > I plan to put a Python wrapper on top of VCL and integrate with exaBGP. > This approach is of course limited to whatever VCL supports. > But in theory VCL could give a full socket-like API. > > 4) Integrated in VPP > Write the control plane functions as VPP plugins. > This is how ND, ARP, DHCP and a few others are done. > > Any others? > > Personally I would like to do more work on 2. > What’s your view? > > Best regards, > Ole > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > > View/Reply Online (#11212): https://lists.fd.io/g/vpp-dev/message/11212 > Mute This Topic: https://lists.fd.io/mt/27857220/675152 > Group Owner: vpp-dev+ow...@lists.fd.io > Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [fcoras.li...@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=-
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#11229): https://lists.fd.io/g/vpp-dev/message/11229 Mute This Topic: https://lists.fd.io/mt/27857220/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-