Skip to content

aloknnikhil/dockervpp

Repository files navigation

dockervpp

A docker network plugin for interfacing w/ VPP

Thanks @araxus for bootstrapping the driver code.

Current Network Topology

//
// +------------------------------------------+                                        +-------------------------------------------+
// |                  DOCKER                  |                                        |                    DOCKER                 |
// |                                          |                                        |                                           |
// +-----------------------+                  |                                        +-----------------------+                   |
// |                       |                  |                                        |                       |                   |
// |           Peer 1      <-------+          |                                        |           Peer 2      <--------+          |
// |                       |       |          |                                        |                       |        |          |
// +-----------------------+       |          |                                        +-----------------------+        |          |
// |                               |          |                                        |                                |          |
// |                               |          |                                        |                                |          |
// |                               |          |                                        |                                |          |
// |                               |          |                                        |                                |          |
// |                             +-v------+   |                                        |                              +-v-------+  |
// |                             |        |   |                                        |                              |         |  |
// |                             |  VETH  |   |                                        |                              |  VETH   |  |
// |                             |        |   |                                        |                              |         |  |
// |                             +------^-+   |                                        |                              +-------^-+  |
// +------------------------------------------+                                        +-------------------------------------------+
//                                      |                                                                                     |
//        +-----------------------------+                                                                                     |
//        |                                                                                                                   |
// +---------------------------------------+--------+                               +--------+-------------------------------------+
// |      |                                |        |                               |        |                                |    |
// | +----v--+-----------+---------+       |        |                               |        |       +---------+---------+----v--+ |
// | |       |           |         |       |        |                               |        |       |         |         |       | |
// | | VHOST <-----------> BVI GWY <------->  DPDK  <------------------------------->  DPDK  <-------> BVI GWY <---------> VHOST | |
// | |       |  L2   BD  |         |       |        |                               |        |       |         | L2   BD |       | |
// | +-----------------------------+       |        |                               |        |       +---------------------------+ |
// +---------------------------------------+--------+                               +--------+-------------------------------------+

TODO: Use VCL (when it's stable) to bypass the kernel completely and use the TCP host stack on VPP through the memif interface

// 
// +------------------------------------------+                                        +-------------------------------------------+
// |                  DOCKER                  |                                        |                   DOCKER                  |
// |                                          |                                        |                                           |
// +-----------------------+                  |                                        +-----------------------+                   |
// |                       |                  |                                        |                       |                   |
// |           Peer 1      <-------+          |                                        |           Peer 2      <--------+          |
// |                       |       |          |                                        |                       |        |          |
// +-----------------------+       |          |                                        +-----------------------+        |          |
// |                               |          |                                        |                                |          |
// |                               |          |                                        |                                |          |
// |                               |          |                                        |                                |          |
// |                               |          |                                        |                                |          |
// |                             +-v------+   |                                        |                              +-v-------+  |
// |                             |        |   |                                        |                              |         |  |
// |                             | VCL-ABI|   |                                        |                              | VCL-ABI |  |
// |                             |        |   |                                        |                              |         |  |
// |                             +------^-+   |                                        |                              +-------^-+  |
// +------------------------------------------+                                        +-------------------------------------------+
//                                      |                                                                                     |
//        +------CIRCULAR BUFFERS-------+                                                                             CIRCULAR BUFFERS
//        |                                                                                                                   |
// +---------------------------------------+--------+                               +--------+-------------------------------------+
// |      |                                |        |                               |        |                                |    |
// | +----v--+-----------+---------+       |        |                               |        |       +---------+---------+----v--+ |
// | |       |           |         |       |        |                               |        |       |         |         |       | |
// | | MEMIF <-----------> BVI GWY <------->  DPDK  <------------------------------->  DPDK  <-------> BVI GWY <---------> MEMIF | |
// | |       |  L2   BD  |         |       |        |                               |        |       |         | L2   BD |       | |
// | +-----------------------------+       |        |                               |        |       +---------------------------+ |
// +---------------------------------------+--------+                               +--------+-------------------------------------+

Build Instructions

Copy/Integrate the vpp.Makefile & gen.go templates into your project build

make -f vpp.Makefile api

Testing

# Root permissions for elevating privileges to setup the docker plugin/modify network interfaces
# Alternately, grant NETCAP_ADMIN privileges and grant user permissions to read/write the docker plugin directory
# Also, grant user permissions to read/write to the VPP client sock/shared mem
sudo /usr/bin/go test -v -timeout 0s dockervpp -run ^TestRun

About

A docker network plugin for interfacing w/ VPP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages