# Flow Translation

> Episode of [OVS Orbit](https://podistic.com/podcast/ovs-orbit.md) · Published April 29, 2018 · Duration 52:23 · Episode 56, season 1

- **Listen on Podistic:** https://podistic.com/episode/flow-translation
- **Audio:** https://ovsorbit.org/episode-56.mp3 (audio/mpeg)

## About this episode

This is the third in a series of Open vSwitch tech talks that we are starting to run internally at VMware every week or two. This episode is about flow translation, the process that OVS follows when a packet arrives in the software switch that does not match any already established entry in the OVS datapath cache (the megaflow cache). 

The translation process has two goals. First, it figures out what to do with the particular packet being processed Second, it determines what class of packets similar to this packet can be treated the same way. The former determination is generally applied directly to the packet in question, and the latter is used to add a new cache entry (megaflow) to the datapath. 

The main source files involved in translation are [ofproto-dpif-xlate.c](https://github.com/openvswitch/ovs/blob/master/ofproto/ofproto-dpif-xlate.c) and [ofproto-dpif-xlate.h](https://github.com/openvswitch/ovs/blob/master/ofproto/ofproto-dpif-xlate.h). 

In addition to the translation process itself, the talk covers some uses of relevant tools: `ovs-dpctl dump-flows` and `ovs-appctl       dpctl/dump-flows` for viewing datapath cache entries, and `ovs-appctl ofproto/trace` for understanding how cache entries are devised and populated and playing "what-if?" games. These are documented in the `ovs-vswitchd` and `ovs-dpctl` manpages. 

The NSDI 2015 paper [The Design and Implementation of Open vSwitch](https://www.usenix.org/conference/nsdi15/technical-sessions/presentation/pfaff) covers in detail how Open vSwitch caches translations. 

OVS Orbit is produced by [Ben Pfaff](mailto:blp@ovn.org). The intro music in this episode is [Drive](http://dig.ccmixter.org/files/AlexBeroza/43098), featuring cdk and DarrylJ, copyright 2013, 2016 by Alex. The bumper music is [Yeah Ant](http://dig.ccmixter.org/files/speck/42100) featuring Wired Ant and Javolenus, copyright 2013 by Speck. The outro music is [Space Bazooka](http://dig.ccmixter.org/files/Kirkoid/43005) featuring Doxen Zsigmond, copyright 2013 by Kirkoid. All content is licensed under a Creative Commons [Attribution 3.0 Unported (CC BY 3.0)](http://creativecommons.org/licenses/by/3.0/) license.
