Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Add support for ipvlan network driver #852

Merged
merged 1 commit into from
Oct 29, 2018

Conversation

amshinde
Copy link
Member

Ipvlan is supported using tc filtering rules to redirect traffic between the ipvlan interface and tap interface.

@amshinde
Copy link
Member Author

Needs to be merged after the PR for tc-filter.

@jodh-intel
Copy link
Contributor

Is this related to #827? It would help if you could add a full PR reference if that's the case to make it easier to track what is going on :)

@amshinde
Copy link
Member Author

cc @mcastelino

"github.com/containernetworking/plugins/pkg/ns"
)

// IPVlanEndpoint represents a macvlan endpoint that is bridged to the VM
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amshinde copy paste error here

IPVlanEndpoint represents a macvlan endpoint

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

return &IPVlanEndpoint{}, fmt.Errorf("invalid network endpoint index: %d", idx)
}

// Use tc filtering for ipvlan, since the other inter networking models will
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amshinde are there any other cases you know of where macvlan or bridge does not work. Ideally you need to have a check that sees if the current interworkingModel works for this type of interface. This function can return what interworkingModel will support it, if the user selected one does not. This will make the code generic.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mcastelino Yes, I need to handle this for macvlan as well. I agree this code needs to be generic.
I think it will make sense to have an interface for each endpoint that advertises the internetworking models it supports. I will add that for every endpoint so that we can make a decision to fallback to a model that works for an endpoint.
I'll do this in a separate PR.

Copy link
Contributor

@mcastelino mcastelino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor feedback. But looks good overall.

@amshinde
Copy link
Member Author

@jodh-intel I shall add a reference going forward :)
Now that #827 is merged, this is ready for review :) PTAL.

@amshinde
Copy link
Member Author

/retest

@amshinde amshinde requested a review from sboeuf October 26, 2018 01:33
Support ipvlan interfaces by setting up tc redirect rules.

Fixes kata-containers#591

Signed-off-by: Archana Shinde <[email protected]>
@amshinde
Copy link
Member Author

/retest

@codecov
Copy link

codecov bot commented Oct 26, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@c7a9e45). Click here to learn what that means.
The diff coverage is 12.5%.

@@            Coverage Diff            @@
##             master     #852   +/-   ##
=========================================
  Coverage          ?   66.87%           
=========================================
  Files             ?       87           
  Lines             ?    11766           
  Branches          ?        0           
=========================================
  Hits              ?     7868           
  Misses            ?     3082           
  Partials          ?      816

@bergwolf
Copy link
Member

bergwolf commented Oct 29, 2018

LGTM!

Approved with PullApprove

@bergwolf bergwolf merged commit 6d17e27 into kata-containers:master Oct 29, 2018
GabyCT added a commit to GabyCT/tests-1 that referenced this pull request Oct 31, 2018
Now that kata-containers/runtime#852 has been merged,
we need to test docker integration tests with ipvlan driver with l2 and l3 mode.

Fixes kata-containers#861

Signed-off-by: Gabriela Cervantes <[email protected]>
GabyCT added a commit to GabyCT/tests-1 that referenced this pull request Oct 31, 2018
Now that kata-containers/runtime#852 has been merged,
we need to test docker integration tests with ipvlan driver with l2 and l3 mode.

Fixes kata-containers#861

Signed-off-by: Gabriela Cervantes <[email protected]>
GabyCT added a commit to GabyCT/tests-1 that referenced this pull request Oct 31, 2018
Now that kata-containers/runtime#852 has been merged,
we need to test docker integration tests with ipvlan driver with l2 and l3 mode.

Fixes kata-containers#861

Signed-off-by: Gabriela Cervantes <[email protected]>
GabyCT added a commit to GabyCT/tests-1 that referenced this pull request Nov 1, 2018
Now that kata-containers/runtime#852 has been merged,
we need to test docker integration tests with ipvlan driver with l2 and l3 mode.

Fixes kata-containers#861

Signed-off-by: Gabriela Cervantes <[email protected]>
GabyCT added a commit to GabyCT/tests-1 that referenced this pull request Nov 9, 2018
Now that macvlan and ipvlan has been merged
kata-containers/runtime#852 and
kata-containers/runtime#506, we
can enable the test to run in our CI.

Fixes kata-containers#899

Signed-off-by: Gabriela Cervantes <[email protected]>
GabyCT added a commit to GabyCT/tests-1 that referenced this pull request Nov 9, 2018
Now that macvlan and ipvlan has been merged
kata-containers/runtime#852 and
kata-containers/runtime#506, we
can enable the test to run in our CI.

Fixes kata-containers#899

Signed-off-by: Gabriela Cervantes <[email protected]>
GabyCT added a commit to GabyCT/tests-1 that referenced this pull request Nov 9, 2018
Now that macvlan and ipvlan has been merged
kata-containers/runtime#852 and
kata-containers/runtime#506, we
can enable the test to run in our CI.

Fixes kata-containers#899

Signed-off-by: Gabriela Cervantes <[email protected]>
GabyCT added a commit to GabyCT/tests-1 that referenced this pull request Nov 9, 2018
Now that macvlan and ipvlan has been merged
kata-containers/runtime#852 and
kata-containers/runtime#506, we
can enable the test to run in our CI.

Fixes kata-containers#899

Signed-off-by: Gabriela Cervantes <[email protected]>
GabyCT added a commit to GabyCT/tests-1 that referenced this pull request Nov 9, 2018
Now that macvlan and ipvlan has been merged
kata-containers/runtime#852 and
kata-containers/runtime#506, we
can enable the test to run in our CI.

Fixes kata-containers#899

Signed-off-by: Gabriela Cervantes <[email protected]>
GabyCT added a commit to GabyCT/tests-1 that referenced this pull request Nov 9, 2018
Now that macvlan and ipvlan has been merged
kata-containers/runtime#852 and
kata-containers/runtime#506, we
can enable the test to run in our CI.

Fixes kata-containers#899

Signed-off-by: Gabriela Cervantes <[email protected]>
GabyCT added a commit to GabyCT/tests-1 that referenced this pull request Nov 9, 2018
Now that macvlan and ipvlan has been merged
kata-containers/runtime#852 and
kata-containers/runtime#506, we
can enable the test to run in our CI.

Fixes kata-containers#899

Signed-off-by: Gabriela Cervantes <[email protected]>
GabyCT added a commit to GabyCT/tests-1 that referenced this pull request Nov 9, 2018
Now that macvlan and ipvlan has been merged
kata-containers/runtime#852 and
kata-containers/runtime#506, we
can enable the test to run in our CI.

Fixes kata-containers#899

Signed-off-by: Gabriela Cervantes <[email protected]>
GabyCT added a commit to GabyCT/tests-1 that referenced this pull request Nov 9, 2018
Now that macvlan and ipvlan has been merged
kata-containers/runtime#852 and
kata-containers/runtime#506, we
can enable the test to run in our CI.

Fixes kata-containers#899

Signed-off-by: Gabriela Cervantes <[email protected]>
GabyCT added a commit to GabyCT/tests-1 that referenced this pull request Nov 9, 2018
Now that macvlan and ipvlan has been merged
kata-containers/runtime#852 and
kata-containers/runtime#506, we
can enable the test to run in our CI.

Fixes kata-containers#899

Signed-off-by: Gabriela Cervantes <[email protected]>
GabyCT added a commit to GabyCT/tests-1 that referenced this pull request Nov 12, 2018
Now that macvlan and ipvlan has been merged
kata-containers/runtime#852 and
kata-containers/runtime#506, we
can enable the test to run in our CI.

Fixes kata-containers#899

Signed-off-by: Gabriela Cervantes <[email protected]>
GabyCT added a commit to GabyCT/tests-1 that referenced this pull request Nov 12, 2018
Now that macvlan and ipvlan has been merged
kata-containers/runtime#852 and
kata-containers/runtime#506, we
can enable the test to run in our CI.

Fixes kata-containers#899

Signed-off-by: Gabriela Cervantes <[email protected]>
GabyCT added a commit to GabyCT/tests-1 that referenced this pull request Nov 13, 2018
Now that macvlan and ipvlan has been merged
kata-containers/runtime#852 and
kata-containers/runtime#506, we
can enable the test to run in our CI.

Fixes kata-containers#899

Signed-off-by: Gabriela Cervantes <[email protected]>
GabyCT added a commit to GabyCT/tests-1 that referenced this pull request Nov 13, 2018
Now that macvlan and ipvlan has been merged
kata-containers/runtime#852 and
kata-containers/runtime#506, we
can enable the test to run in our CI.

Fixes kata-containers#899

Signed-off-by: Gabriela Cervantes <[email protected]>
GabyCT added a commit to GabyCT/tests-1 that referenced this pull request Nov 13, 2018
Now that macvlan and ipvlan has been merged
kata-containers/runtime#852 and
kata-containers/runtime#506, we
can enable the test to run in our CI.

Fixes kata-containers#899

Signed-off-by: Gabriela Cervantes <[email protected]>
@amshinde amshinde deleted the ipvlan branch July 11, 2019 22:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants