[ovs-dev] [PATCH v2] openvswitch: Userspace tunneling.
Pravin Shelar
pshelar at nicira.com
Wed Nov 5 23:17:56 UTC 2014
On Wed, Nov 5, 2014 at 5:59 AM, Flavio Leitner <fbl at redhat.com> wrote:
> On Sun, Nov 02, 2014 at 09:29:28PM -0800, Pravin B Shelar wrote:
>> Following patch adds support for userspace tunneling. Tunneling
>> needs three more component first is routing table which is configured by
>> caching kernel routes and second is ARP cache which build automatically
>> by snooping arp. And third is tunnel protocol table which list all
>> listening protocols which is populated by vswitchd as tunnel ports
>> are added. GRE and VXLAN protocol support is added in this patch.
>>
>> Tunneling works as follows:
>> On packet receive vswitchd check if this packet is targeted to tunnel
>> port. If it is then vswitchd inserts tunnel pop action which pops
>> header and sends packet to tunnel port.
>> On packet xmit rather than generating Set tunnel action it generate
>> tunnel push action which has tunnel header data. datapath can use
>> tunnel-push action data to generate header for each packet and
>> forward this packet to output port. Since tunnel-push action
>> contains most of packet header vswitchd needs to lookup routing
>> table and arp table to build this action.
>>
>> Signed-off-by: Pravin B Shelar <pshelar at nicira.com>
>> Acked-by: Jarno Rajahalme <jrajahalme at nicira.com>
>> ---
>> Fixed according to comments from Jarno and Ben.
>> Added test cases.
>> ---
>> Makefile.am | 1 +
>> NEWS | 1 +
>> README-native-tunneling.md | 82 ++++
>> datapath/linux/compat/include/linux/openvswitch.h | 15 +
>> debian/openvswitch-common.docs | 1 +
>> lib/automake.mk | 4 +
>> lib/dpif-netdev.c | 104 +++++-
>> lib/dpif-netlink.c | 3 +-
>> lib/dpif-provider.h | 5 +-
>> lib/dpif.c | 18 +-
>> lib/dpif.h | 4 +-
>> lib/netdev-bsd.c | 3 +
>> lib/netdev-dpdk.c | 3 +
>> lib/netdev-dummy.c | 68 +++-
>> lib/netdev-linux.c | 3 +
>> lib/netdev-provider.h | 9 +
>> lib/netdev-vport.c | 486 ++++++++++++++++++++-
>> lib/netdev.c | 34 ++
>> lib/netdev.h | 9 +
>> lib/odp-execute.c | 2 +
>> lib/odp-util.c | 243 ++++++++++
>> lib/odp-util.h | 2 +
>> lib/ofpbuf.h | 8 +
>> lib/ovs-router.c | 4 +
>> lib/packets.c | 35 ++
>> lib/packets.h | 32 ++-
>> lib/tnl-arp-cache.c | 215 +++++++++
>> lib/tnl-arp-cache.h | 40 ++
>> lib/tnl-ports.c | 193 ++++++++
>> lib/tnl-ports.h | 41 ++
>> ofproto/ofproto-dpif-xlate.c | 190 ++++++++-
>> ofproto/ofproto-dpif.c | 96 ++++-
>> ofproto/ofproto-dpif.h | 1 +
>> ofproto/tunnel.c | 73 +++-
>> ofproto/tunnel.h | 11 +-
>> rhel/openvswitch.spec.in | 2 +-
>> tests/automake.mk | 1 +
>> tests/ofproto-macros.at | 7 +
>> tests/testsuite.at | 1 +
>> tests/tunnel-push-pop.at | 66 +++
>> tests/tunnel.at | 8 +
>> 41 files changed, 2063 insertions(+), 61 deletions(-)
>> create mode 100644 README-native-tunneling.md
>> create mode 100644 lib/tnl-arp-cache.c
>> create mode 100644 lib/tnl-arp-cache.h
>> create mode 100644 lib/tnl-ports.c
>> create mode 100644 lib/tnl-ports.h
>> create mode 100644 tests/tunnel-push-pop.at
>>
>> diff --git a/Makefile.am b/Makefile.am
>> index 343dffa..f734af4 100644
>> --- a/Makefile.am
>> +++ b/Makefile.am
>> @@ -85,6 +85,7 @@ EXTRA_DIST = \
>> PORTING.md \
>> README.md \
>> README-lisp.md \
>> + README-native-tunneling.md \
>> REPORTING-BUGS.md \
>> TODO.md \
>> .travis.yml \
>> diff --git a/NEWS b/NEWS
>> index d271188..3128ac4 100644
>> --- a/NEWS
>> +++ b/NEWS
>> @@ -45,6 +45,7 @@ Post-v2.3.0
>> - A simple wrapper script, 'ovs-docker', to integrate OVS with Docker
>> containers. If and when there is a native integration of Open vSwitch
>> with Docker, the wrapper script will be retired.
>> + - Added support for DPDK Tunneling. VXLAN and GRE are supported protocols.
>
> I think the above is misleading since the patch is userspace generic.
>
This work is implemented as generic tunnel work but will be used
mostly over DPDK. Since NEWS is targeted for users I explicitly
mentioned the main usecase. Anyways I will update it to mention it is
generic mechanism.
More information about the dev
mailing list