Skip to content
This repository has been archived by the owner on Apr 3, 2018. It is now read-only.

WIP: Add support for macvlan and ipvlan networking modes #447

Closed

Conversation

mcastelino
Copy link
Collaborator

This a PoC branch that shows that with minor changes clear containers can support the docker macvlan network plugin

This needs a minor change to how we manage mac address allocations.
It also needs the link discovery logic to be generic.

Revendor the netlink library to pick up changes required to
support macvtap creation within a network namespace.

Signed-off-by: Manohar Castelino <[email protected]>
Provide multiple methods to connect the Virtual machine
to the container network. The current implementation allows
this to be chosen at a node level. In the future we can
enhance this to be dynamic, where the container interface
type is used to determine the optimal interconnection method.

Add support for multi-queue macvtap as an alternate means to
connect the container network interface to the virtual machine.

Include a workaround for kernel limitation around macvtap index
generation logic when interfaces are created within a namespace.

The switch from bridge+tap to macvtap brings in support for
  - multiqueue
  - lower latency
  - lower jitter
  - lower cpu consumption

Longer term this need to be configurable and the runtime should
be able to choose the networking model at a per pod level.

Signed-off-by: Manohar Castelino <[email protected]>
@coveralls
Copy link

coveralls commented Oct 26, 2017

Coverage Status

Coverage decreased (-1.4%) to 64.183% when pulling d7a58d5 on mcastelino:topic/docker_macvlan_ipvlan into 68f1c9e on containers:master.

@coveralls
Copy link

coveralls commented Oct 26, 2017

Coverage Status

Coverage decreased (-1.3%) to 64.283% when pulling d7a58d5 on mcastelino:topic/docker_macvlan_ipvlan into 68f1c9e on containers:master.

@sboeuf
Copy link
Collaborator

sboeuf commented Oct 27, 2017

@mcastelino all the CRI-O tests are failing... Do they pass on your machine ?

@sboeuf
Copy link
Collaborator

sboeuf commented Nov 13, 2017

@mcastelino this PR can be closed right ?

@mcastelino
Copy link
Collaborator Author

@sboeuf no. This is for another new feature. Today we do not support macvlan docker/CNI plugins. This PR will be updated once your PR and @amshinde networking changes land to support macvlan CNM and CNI plugins.

This PR is to support plugins like
Docker CNM macvlan: https://docs.docker.com/engine/userguide/networking/get-started-macvlan/
and
CNI macvlan: https://github.com/containernetworking/plugins/tree/master/plugins/main/macvlan

@mcastelino
Copy link
Collaborator Author

@sboeuf also this is why I wanted the type field in the endpoint data. This type field will help us determine the right inter-connectivity framework to use based on the type of interface placed in the network namespace.

So if we see a

  • macvlan interace we use this method
  • veth we use the standard macvlan implementation
  • SRIOV we use VFIO
  • vhost-user we will use vhost-user socket
  • tap interface we directly connect it to the VM

@mcastelino mcastelino changed the title WIP: Add support for macvlan and iplan networking modes WIP: Add support for macvlan and ipvlan networking modes Nov 13, 2017
@sameo
Copy link
Collaborator

sameo commented Dec 11, 2017

@mcastelino Retriggering the jenkins jobs fixed the CI. Is this ready to be be merged?

@egernst
Copy link
Collaborator

egernst commented Mar 7, 2018

This fixes #248

@sboeuf
Copy link
Collaborator

sboeuf commented Mar 15, 2018

@mcastelino Need to be closed and moved to https://github.com/kata-containers/runtime/virtcontainers

@sboeuf sboeuf closed this Mar 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants