2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-29 05:18:13 +00:00

9 Commits

Author SHA1 Message Date
Bhanuprakash Bodireddy
fae145ca7c dpif-netlink-rtnl: Fix dead store reported by clang.
Clang reports variable 'ifmsg' never been used in the function.

Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodireddy@intel.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2017-07-11 21:03:44 -07:00
Joe Stringer
b50fcaa0d9 dpif-netlink-rtnl: Use OVS_NOT_REACHED in verify.
The vport_type_to_kind() call at the top of dpif_netlink_rtnl_verify()
ensures that these cases can never be hit, so use OVS_NOT_REACHED()
instead of setting the err to EOPNOTSUPP.

Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Greg Rose <gvrose8192@gmail.com>
Acked-by: Eric Garver <e@erig.me>
2017-05-23 15:44:27 -07:00
Joe Stringer
caeda3489e dpif-netlink-rtnl: Use getlink() in common verify path.
The calls here were duplicated across each tunnel protocol.

Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Greg Rose <gvrose8192@gmail.com>
Acked-by: Eric Garver <e@erig.me>
2017-05-23 15:44:27 -07:00
Joe Stringer
9db6b04e66 dpif-netlink-rtnl: Tidy up some code.
Simplify and refactor a couple of bits of code for improved readability.

Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Eric Garver <e@erig.me>
2017-05-23 15:44:27 -07:00
Eric Garver
921c370a9d dpif-netlink: Probe for out-of-tree tunnels, decides used interface
On dpif init, probe for whether tunnels are created using in-tree
(upstream linux) or out-of-tree (OVS). This is done by probing for the
existence of "ovs_geneve" via rtnetlink. This is used to determine how
to create the tunnel devices.

For out-of-tree tunnels, only try genetlink/compat.
For in-tree kernel tunnels, try rtnetlink then fallback to genetlink.

Signed-off-by: Eric Garver <e@erig.me>
Signed-off-by: Joe Stringer <joe@ovn.org>
2017-05-19 12:51:58 -07:00
Eric Garver
b6d6830d29 dpif-netlink-rtnl: Support GENEVE creation
Creates GENEVE devices using rtnetlink and tunnel metadata.

Co-Authored-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Signed-off-by: Eric Garver <e@erig.me>
Signed-off-by: Joe Stringer <joe@ovn.org>
2017-05-19 12:51:58 -07:00
Eric Garver
f658f95e73 dpif-netlink-rtnl: Support GRE creation
Creates GRE devices using rtnetlink and tunnel metadata.

Co-Authored-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Signed-off-by: Eric Garver <e@erig.me>
Signed-off-by: Joe Stringer <joe@ovn.org>
2017-05-19 12:51:58 -07:00
Eric Garver
825e45e010 dpif-netlink-rtnl: Support VXLAN creation
Creates VXLAN devices using rtnetlink and tunnel metadata.

Co-Authored-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Signed-off-by: Eric Garver <e@erig.me>
Signed-off-by: Joe Stringer <joe@ovn.org>
2017-05-19 12:51:58 -07:00
Eric Garver
c4e087530e dpif-netlink: Support rtnetlink port creation.
In order to be able to add those tunnels, we need to add code to create
the tunnels and add them as NETDEV vports. And when there is no support
to create them, we need to fallback to compatibility code and add them
as tunnel vports.

When removing those tunnels, we need to remove the interfaces as well,
and detecting the right type might be important, at least to distinguish
the tunnel vports that we should remove and the interfaces that we
shouldn't.

Co-authored-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Signed-off-by: Eric Garver <e@erig.me>
Signed-off-by: Joe Stringer <joe@ovn.org>
2017-05-19 12:51:57 -07:00